I am using the latest ROS Fuerte from aptitude on Ubuntu 10.4. I have 2 boost installs. A 1.40.0 install in /usr/include and a 1.50.0 install in /usr/local/include. rosboost-cfg is aware of both installations. CMake functionality in this regards is broken however:
When compiling a "main" program, CMake will correctly identify both installations and will state that it is using the latest. After compiling a "main" program, I get the following linking errors:
CMakeFiles/pc_transformer.dir/src/pc_transformer.o: In function __static_initialization_and_destruction_0': /usr/local/include/boost/system/error_code.hpp:214: undefined reference to
boost::system::generic_category()'
/usr/local/include/boost/system/error_code.hpp:215: undefined reference to boost::system::generic_category()' /usr/local/include/boost/system/error_code.hpp:216: undefined reference to
boost::system::system_category()'
This is a results of CMake using the /usr/local include files and the /usr shared objects. This can be verified because linkage works if the following line is placed in the CMake file
set(CMAKE_CXX_FLAGS "${CMAKE_LD_FLAGS} -L/usr/local/lib")
If I set ROS_BOOST_VERSION=1.40.0 before compiling I still get the same error referencing the include files from 1.50.0. Clearly CMake is not obeying ROS_BOOST_VERSION properly. Additionally, it is inconsistent in the boost root directory it chooses for include files and shared objects
Originally posted by Arrakis on ROS Answers with karma: 163 on 2012-08-25
Post score: 2