smanders / externpro

build external projects with cmake
MIT License
13 stars 12 forks source link

Boost::thread link errors #262

Closed smanders closed 5 years ago

smanders commented 5 years ago

palam build issues on CentOS (development branch -- version 1.5.0.5)

[ 12%] Linking CXX executable asyncTest
CMakeFiles/asyncTest.dir/include/deprecated/ThreadSafeQueueTest.cpp.o: In function `void boost::this_thread::sleep<boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000l> >(boost::date_time::subsecond_duration<boost::posix_time::time_duration, 1000l> const&)':
ThreadSafeQueueTest.cpp:(.text._ZN5boost11this_thread5sleepINS_9date_time18subsecond_durationINS_10posix_time13time_durationELl1000EEEEEvRKT_[_ZN5boost11this_thread5sleepINS_9date_time18subsecond_durationINS_10posix_time13time_durationELl1000EEEEEvRKT_]+0x258): undefined reference to `clock_gettime'
../libpalam_async.a(IoserviceServer.cpp.o): In function `private_palam::async::IoserviceServer::consumeCtorThread()':
IoserviceServer.cpp:(.text+0x222e): undefined reference to `clock_gettime'
../libpalam_async.a(ServicingThread.cpp.o): In function `std::thread::_State_impl<std::thread::_Invoker<std::tuple<(anonymous namespace)::ServicerUntilReleased> > >::_M_run()':
ServicingThread.cpp:(.text+0x113e): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
[ 17%] Linking CXX executable filesysTest
../libpalam_filesys.a(ProcessHandle.cpp.o): In function `void boost::this_thread::sleep<boost::posix_time::seconds>(boost::posix_time::seconds const&)':
ProcessHandle.cpp:(.text._ZN5boost11this_thread5sleepINS_10posix_time7secondsEEEvRKT_[_ZN5boost11this_thread5sleepINS_10posix_time7secondsEEEvRKT_]+0x4b2): undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status

https://isrhub.usurf.usu.edu/smanders/internpro/issues/197#issuecomment-159629

Boost::thread -- undefined reference to `clock_gettime'

smanders commented 5 years ago

completed with commit to dev branch referenced above