Can't compile BurrTools
Brought to you by:
roever
When I try to compile BurrTools 0.6.2, I get the following error (Ubuntu 10.04):
In file included from lib/solvethread.h:27,
from lib/solvethread.cpp:21:
lib/thread.h:24:28: error: boost/thread.hpp: No such file or directory
In file included from lib/solvethread.h:27,
from lib/solvethread.cpp:21:
lib/thread.h:31: error: ‘boost’ has not been declared
lib/thread.h:31: error: ISO C++ forbids declaration of ‘thread’ with no type
lib/thread.h:31: error: expected ‘;’ before ‘thread’
make[2]: *** [lib/solvethread.o] Error 1
Am I missing a package I'm supposed to install?
I installed the libboost dev packages, including libboost-thread, but I still get an error on "make":
/usr/include/boost/thread/detail/thread.hpp:229: undefined reference to `boost:🧵:start_thread()'
lib/libburr.a(thread.o): In function `mutex':
/usr/include/boost/thread/pthread/mutex.hpp:40: undefined reference to `boost::thread_resource_error::thread_resource_error()'
/usr/include/boost/thread/pthread/mutex.hpp:40: undefined reference to `boost::thread_resource_error::~thread_resource_error()'
/usr/include/boost/thread/pthread/mutex.hpp:40: undefined reference to `typeinfo for boost::thread_resource_error'
/usr/include/boost/thread/pthread/mutex.hpp:40: undefined reference to `boost::thread_resource_error::thread_resource_error()'
/usr/include/boost/thread/pthread/mutex.hpp:40: undefined reference to `boost::thread_resource_error::~thread_resource_error()'
/usr/include/boost/thread/pthread/mutex.hpp:40: undefined reference to `typeinfo for boost::thread_resource_error'
/usr/include/boost/thread/pthread/mutex.hpp:40: undefined reference to `boost::thread_resource_error::thread_resource_error()'
/usr/include/boost/thread/pthread/mutex.hpp:40: undefined reference to `boost::thread_resource_error::~thread_resource_error()'
/usr/include/boost/thread/pthread/mutex.hpp:40: undefined reference to `typeinfo for boost::thread_resource_error'
lib/libburr.a(thread.o): In function `condition_variable':
/usr/include/boost/thread/pthread/condition_variable_fwd.hpp:33: undefined reference to `boost::thread_resource_error::thread_resource_error()'
/usr/include/boost/thread/pthread/condition_variable_fwd.hpp:33: undefined reference to `boost::thread_resource_error::~thread_resource_error()'
/usr/include/boost/thread/pthread/condition_variable_fwd.hpp:33: undefined reference to `typeinfo for boost::thread_resource_error'
/usr/include/boost/thread/pthread/condition_variable_fwd.hpp:33: undefined reference to `boost::thread_resource_error::thread_resource_error()'
/usr/include/boost/thread/pthread/condition_variable_fwd.hpp:33: undefined reference to `boost::thread_resource_error::~thread_resource_error()'
/usr/include/boost/thread/pthread/condition_variable_fwd.hpp:33: undefined reference to `typeinfo for boost::thread_resource_error'
lib/libburr.a(thread.o):(.rodata._ZTIN5boost6detail11thread_dataINS_3_bi6bind_tIvNS_4_mfi3mf0Iv8thread_cEENS2_5list1INS2_5valueIPS6_EEEEEEEE[typeinfo for boost::detail::thread_data<boost::_bi::bind_t<void, boost::_mfi::mf0<void, thread_c>, boost::_bi::list1<boost::_bi::value<thread_c*> > > >]+0x8): undefined reference to `typeinfo for boost::detail::thread_data_base'
collect2: ld returned 1 exit status
make[2]: *** [burrTxt2] Error 1
Regarding your initial issue, according to the output from ./configure there is a check for the thread library. However the configure script doesn't halt at that point.
An example configure script output below:
...
checking whether the Boost::Thread library is available... no
checking for libpng-config... /usr/bin/libpng-config
checking whether -R must be followed by a space... neither works
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for OpenGL... yes
checking for nm... nm
checking whether FLTK file function use 64 bit structures... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doxygen.cfg
config.status: creating src/config.h
config.status: src/config.h is unchanged
config.status: executing depfiles commands
> echo $?
0
The linker issues can be resolved by installing the package libboost-thread1.40-dev in Ubuntu 10.4 LTS.