Ask Your Question
0

boost 1.60 with ROS Jade

asked 2016-01-11 21:10:35 -0500

moyashi gravatar image

updated 2016-01-12 06:51:04 -0500

gvdhoorn gravatar image

I'd like to use boost 1.55 or later with ROS Jade.
How can I do it correctly ? If possible, I'd like to use boost installed locally.
As I show later, roscpp depends on boost 1.54.0 and it seems to lead to serious problem.

What I've done is like the follows.

  1. Installed boost 1.60 locally (into ~/Libs/boost).
    Now header files and .a and .so files are in ~/Libs/boost/incude and ~/Libs/boost/lib respectively

  2. In CMakeLists.txt,

    set(LIB_ROOT "~/Libs")
    set(Boost_INCLUDE_DIR ${LIB_ROOT}/boost/include)
    set(Boost_LIBRARY_DIR ${LIB_ROOT}/boost/lib)
    find_package(Boost 1.60 REQUIRED)
    include_directories(${Boost_INCLUDE_DIR})
    link_directories(${Boost_LIBRARY_DIR})

  3. Removed build and devel directories in catkin_ws and catkin_make

As a result, I have warnings as the follows:

link library [libboost_\*\*\*\*.so] in /usr/lib/x86_64-linux-gnu may be hidden by files in: <path-to-~/Libs>/boost/lib

and

/usr/bin/ld: warning: libboost_\*\*\*\*.so.1.54.0, needed by /opt/ros/jade/lib/libroscpp.so, may conflict with libboost_thread.so.1.60.0

Warnings make sense because I did it on purpose.
But the warning is really scaring. I'm afraid that it was really linked correctly.

What's wrong with my way ?
Should I link boost libraries statically ?
In that case, how can I do it with catkin ?

Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-01-11 21:24:31 -0500

ahendrix gravatar image

You can't use multiple versions of boost within the same binary. Since the default installation of ROS is linked against the system version of Boost, if you want to build ROS nodes against the default ROS installation, you need to use the system installation of Boost.

If you want to use ROS with a newer version of Boost, you'll need to compile ROS from source: http://wiki.ros.org/jade/Installation... ; and then build your nodes against that build of ROS.

As a side note, I don't think there is much testing of ROS with Boost 1.60; if there are API incompatibilities between the default version of Boost and 1.60, ROS might not build.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-01-11 21:10:35 -0500

Seen: 538 times

Last updated: Jan 12 '16