Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7194227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T20:19:43+00:00 2026-05-28T20:19:43+00:00

I’ve been building a C++ library that I want to distribute as a single.so

  • 0

I’ve been building a C++ library that I want to distribute as a single.so file to my users, and hopefully have that .so file be, for the most part, distro agnostic. Thus, I’ve been linking 3rd party libraries statically (but still dynamically linking to the standard library)

Right now it builds fine with g++ on CentOS 6.2 (64 bit), but it is having issues building on CentOS 5.3. Compilation goes through fine, but I get a linker error:

cpu_timer.cpp:(.text+0x288): undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::basic_ostream<char, std::char_traits<char> >::_M_insert<long double>(long double)'

I’ve done some searching on the error and it seems to be an issue with versioning of the standard library itself. My code, or rather boost::thread’s code, is trying to make a call to a newer version of something that doesn’t exist in the standard library included on CentOS 5.3.

Understandable. So I need to either:

  • Link statically against the C++ standard library (I’ve done some research about this and it is a huge pain on 64 bit systems. The libstdc++.a included with most 64 bit systems is not built with -fPIC, and -fPIC is actually a necessity to do static linking on 64 bit systems. I would have to actually build libstdc++.a myself. Ugh…
  • Revert boost::timer to some more compatible version. I’m mostly using it for portable mutexes, so I’m not in any need of bleeding-edge boost::thread features. But this comes with its own issue: Where on the boost website do they document their dependencies to the standard library (and which versions). Do they document it at all? I can’t seem to find the information. Also, is this a wise choice? What other nasty surprises could the standard library have for me?

Given my goal (as close to distro agnostic as possible), which route would you recommend?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T20:19:44+00:00Added an answer on May 28, 2026 at 8:19 pm

    I’d say use a version of Boost that’s old enough to be compatible with all the distros you want it to be compatible with.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have a jquery bug and I've been looking for hours now, I can't
I have just tried to save a simple *.rtf file with some websites and
I have a small JavaScript validation script that validates inputs based on Regex. I
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have been unable to fix a problem with Java Unicode and encoding. The
I have a reasonable size flat file database of text documents mostly saved in
I'm trying to create an if statement in PHP that prevents a single post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.