ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Compiling ROS with boost >1.41

asked 2012-06-17 00:14:01 -0500

Findeton gravatar image

updated 2012-06-17 00:17:57 -0500

Hello everybody.

I have Ubuntu 64 bits 10.04 with kernel 2.6.32-38-generic and gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3. The problem I have is that I need to compile ROS (Electric or Fuerte) with boost 1.47, but it looks like it only works for boost 1.41 or lower. Is there any workaround?

Following this tutorial , I've successfully compiled ROS Fuerte with boost 1.41. But when I try to compile ROS Fuerte with boost 1.42 (or higher, I've also tried with boost 1.44 and 1.47 and they give even more errors), and this is the output I get:

~/ros-underlay/build$ make -j

[Everything goes ok up to the following point]

[ 29%] Generating Lisp code from actionlib/TestRequestResult.msg
Linking CXX executable ../bin/rospack
[ 29%] Generating Lisp code from actionlib/TestRequestFeedback.msg
[ 29%] [ 29%] Linking CXX executable ../bin/rosstack
Generating Python from MSG rosgraph_msgs/Log
Generating Python from MSG actionlib/TwoIntsActionResult
[ 29%] Generating Lisp code from actionlib/TwoIntsAction.msg
[ 29%] Built target rosgraph_msgs_gencpp
../lib/librospack.so: undefined reference to `boost::program_options::options_description::options_description(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [bin/rospack] Error 1
make[1]: *** [rospack/CMakeFiles/rospackexe.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Scanning dependencies of target std_srvs_gencpp
[ 29%] Generating Python from MSG actionlib/TwoIntsActionFeedback
[ 29%] Generating C++ code from std_srvs/Empty.srv
[ 29%] [ 29%] Generating Lisp code from actionlib/TwoIntsActionGoal.msg
Generating Python from MSG actionlib/TwoIntsGoal
[ 29%] ../lib/librospack.so: undefined reference to `boost::program_options::options_description::options_description(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
collect2: ld returned 1 exit status
make[2]: *** [bin/rosstack] Error 1
make[1]: *** [rospack/CMakeFiles/rosstackexe.dir/all] Error 2

Before executing make, I execute cmake, with the following result, which perhaps could be helpful in guessing what's happening:

~/ros-underlay/build$ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/ros/fuerte
CMake Error: The source directory "/home/findeton" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
findeton@findeton-laptop:~/ros-underlay$ cd build
findeton@findeton-laptop:~/ros-underlay/build$ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/ros/fuerte
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- +++ catkin
-- Found PythonInterp: /usr/bin/python2.6
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found gtest: gtests will be built.
TODO: implement add_roslaunch_check() in rostest-extras.cmake.
-- BUILD_SHARED_LIBS is ...
(more)
edit retag flag offensive close merge delete

Comments

Can you run the following instead of "make -j", and then add the results to your question? "export VERBOSE=1; make -j1"

jbohren gravatar image jbohren  ( 2012-06-17 10:46:19 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted
3

answered 2012-06-17 22:04:40 -0500

tfoote gravatar image

updated 2012-07-01 23:21:06 -0500

It looks like you might need to add -lboost_program_options to the linker flags exported by rospack in it's manifest. Searching for the error returns a lot of hits suggesting this might be a change in boost 1.42. my search

edit flag offensive delete link more

Comments

I think your link got replaced accidentally.

jbohren gravatar image jbohren  ( 2012-06-17 23:25:19 -0500 )edit

@jbohren Tried to fix it as best I could remember it. Thanks.

tfoote gravatar image tfoote  ( 2012-07-01 23:20:13 -0500 )edit
0

answered 2012-06-17 02:40:17 -0500

joq gravatar image

On Ubuntu Precise (12.04), ROS Fuerte uses boost 1.46.1-5ubuntu3.

edit flag offensive delete link more
-1

answered 2012-06-17 10:11:29 -0500

Findeton gravatar image

And how do they achieve to compile ROS Fuerte with boost 1.46?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-06-17 00:14:01 -0500

Seen: 1,474 times

Last updated: Jul 01 '12