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:
Given my goal (as close to distro agnostic as possible), which route would you recommend?
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.