Ask Your Question

Handling of Multiple Boost installs is broken in ROS Fuerte

asked 2012-08-25 05:40:55 -0500

Arrakis gravatar image

updated 2014-01-28 17:13:27 -0500

ngrennan gravatar image

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 toboost::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 toboost::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

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-08-29 14:34:45 -0500

joq gravatar image

updated 2013-08-28 05:25:01 -0500

This looks like a bug. Please open a defect ticket to report it, prefixing the issue name with rosboost_cfg:.

You can provide a link back to this question to avoid repeating the details.

edit flag offensive delete link more


This should be opened against `rosboost_cfg` which is in the `ros` repository:

William gravatar image William  ( 2013-08-27 08:38:55 -0500 )edit

Thanks, William. Edited the link in the answer above.

joq gravatar image joq  ( 2013-08-28 05:25:52 -0500 )edit

answered 2013-07-29 08:26:50 -0500

William gravatar image

updated 2013-08-23 08:06:13 -0500

This doesn't have anything to do with catkin. This is likely because you are not using the Boost_LIBRARY_DIRS variable which is set by FindBoost.cmake:;a=blob;f=Modules/FindBoost.cmake;h=914a0a5b5cd9d70f8effd4af2205993b8d1a36de;hb=HEAD#l14

EDIT: updated the link, also use the correct variable name

edit flag offensive delete link more


That doesn't seem like the solution to me. indicates that ROS_BOOST_VERSION=1.40.0 should use the include files from /usr/include, not /usr/local/include. Then again Googling "Boost_LINK_DIRECTORIES" returns no relevant results and I can't see the relevance of the link?

Arrakis gravatar image Arrakis  ( 2013-08-23 06:48:15 -0500 )edit

I think I linked in the wrong thing there. Let me see if I can find the link I meant to put.

William gravatar image William  ( 2013-08-23 07:24:33 -0500 )edit

Hi William. The amended link doesn't mention Boost_LINK_DIRECTORIES and I don't think it explains why ROS_BOOST_VERSION is not working like it should

Arrakis gravatar image Arrakis  ( 2013-08-23 07:56:12 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-08-25 05:40:55 -0500

Seen: 524 times

Last updated: Aug 28 '13