John - 2013-04-05

I was attempting a compile and link using Boost 1.53.0:

I got the resulting linking problems within the Boost library with an explicit locator to libboost_system on my command line and the results were:

johnl@chilirelleno:~/src/Messaging/Message_Client_example$  g++ -m32 -I/usr/share/jps-audioproc-third-party/boost/include -L/usr/share/jps-audioproc-third-party/boost/lib -lboost_system   -o testClient testClient.cpp
/tmp/cc1YzhwI.o: In function `__static_initialization_and_destruction_0(int, int)':
testClient.cpp:(.text+0x52a): undefined reference to `boost::system::generic_category()'
testClient.cpp:(.text+0x534): undefined reference to `boost::system::generic_category()'
testClient.cpp:(.text+0x53e): undefined reference to `boost::system::system_category()'
/tmp/cc1YzhwI.o: In function `boost::system::error_code::error_code()':
testClient.cpp:(.text._ZN5boost6system10error_codeC2Ev+0x10): undefined reference to `boost::system::system_category()'
/tmp/cc1YzhwI.o: In function `boost::asio::error::get_system_category()':
testClient.cpp:(.text._ZN5boost4asio5error19get_system_categoryEv+0x7): undefined reference to `boost::system::system_category()'
/tmp/cc1YzhwI.o: In function `boost::asio::detail::posix_thread::~posix_thread()':
testClient.cpp:(.text._ZN5boost4asio6detail12posix_threadD2Ev+0x1d): undefined reference to `pthread_detach'
/tmp/cc1YzhwI.o: In function `boost::asio::detail::posix_thread::join()':
testClient.cpp:(.text._ZN5boost4asio6detail12posix_thread4joinEv+0x25): undefined reference to `pthread_join'
/tmp/cc1YzhwI.o: In function `boost::asio::detail::posix_thread::start_thread(boost::asio::detail::posix_thread::func_base*)':
testClient.cpp:(.text._ZN5boost4asio6detail12posix_thread12start_threadEPNS2_9func_baseE+0x24): undefined reference to `pthread_create'
collect2: ld returned 1 exit status

Last night, I got home and fired up my VM (it works at home, not here, hmmm) and downloaded Boost 1.53.0 and built EVERYTHING and located it to the typical /usr/local/… locations.. Took the client file and attempted to build it and got the same errors, so it has nothing to do with how we are set up on Chilirelleno. Found a few squawks online about similar stuff surrounding asio and other classes.

'nm' gives me the information on libboost_system.so which is a link to libboost_system.so.1.53.0:

johnl@chilirelleno:/usr/share/jps-audioproc-third-party/boost/lib$ ls -l libboost_system.so
lrwxrwxrwx 1 root root 25 Feb 25 11:44 libboost_system.so -> libboost_system.so.1.53.0
johnl@chilirelleno:/usr/share/jps-audioproc-third-party/boost/lib$ nm -C -g -D libboost_system.so.1.53.0
         w _Jv_RegisterClasses
         U _Unwind_Resume
000017e0 W boost::system::error_category::~error_category()
00001700 W boost::system::error_category::~error_category()
00001700 W boost::system::error_category::~error_category()
00000f80 T boost::system::system_category()
00001010 T boost::system::generic_category()
00003048 B boost::system::throws
000017b0 W boost::system::error_category::equivalent(boost::system::error_code const&, int) const
00001740 W boost::system::error_category::equivalent(int, boost::system::error_condition const&) const
00001720 W boost::system::error_category::default_error_condition(int) const
         U std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)
         U std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)
         U std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()
00002edc V typeinfo for boost::noncopyable_::noncopyable
00002e00 V typeinfo for boost::system::error_category
00001b80 V typeinfo name for boost::noncopyable_::noncopyable
00001b60 V typeinfo name for boost::system::error_category
         U vtable for __cxxabiv1::__class_type_info
         U vtable for __cxxabiv1::__si_class_type_info
00002e20 V vtable for boost::system::error_category
         U operator delete(void*)
00003040 A __bss_start
         U __cxa_atexit
         w __cxa_finalize
         U __cxa_guard_abort
         U __cxa_guard_acquire
         U __cxa_guard_release
         U __cxa_pure_virtual
         w __gmon_start__
         U __gxx_personality_v0
         U __stack_chk_fail
00003040 A _edata
00003088 A _end
00001868 T _fini
00000b44 T _init
         U strerror_r
johnl@chilirelleno:/usr/share/jps-audioproc-third-party/boost/lib$

The two function names exist but we can't tell if they are public.