ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Boost 1.46.1 - Runtime Segfault

asked 2012-01-27 03:11:02 -0600

KM gravatar image

I have wrapped a 3rd party library following the conventions laid out in the tutorial on - wrapping libraries

I have hit an issues when linking against that wrapped library, and I have traced the issue back to boost versions. I am running Ubuntu 10.04 with ROS Electric - the default boost library being 1.40 and my wrapped library uses 1.46.1

I have exported ROS_BOOST_VERSION=1.46.1 and ROS_BOOST_ROOT=/usr/local/include/ to my environment and added the boost directories and linked in my CMakeLists of the test package.

rosbuild_link_boost(test_driver thread)

To test the linked library I have created a simple publisher, publishing a simple string.

Everything compiles fine and upon execution I am getting a segfault. Below is the syslog and backtrace.

syslog: (not very telling)

segfault at 18 ip 00007fb546efc288 sp 00007fff77298290 error 4 in[7fb546eef000+17000]


#0  0x00007ffff700f288 in boost::thread::start_thread() () from     
#1  0x00007ffff7b23f1a in thread<void (ros::PollManager::*)(), ros::PollManager*>   
(this=0x7fffffffd450, f=0x7ffff7b21600 <ros::PollManager::threadFunc()>, a1=0x6362a0) at 
#2  0x00007ffff7b21fb3 in ros::PollManager::start (this=0x6362a0) at /tmp/buildd/ros- 
#3  0x00007ffff7b0b13b in ros::start () at /tmp/buildd/ros-electric-ros-comm-
#4  0x00007ffff7b87a40 in ros::NodeHandle::construct (this=0x7fffffffde90, ns=...,  
at /tmp/buildd/ros-electric-ros-comm-1.6.6/debian/ros-electric-ros
#5  0x00007ffff7b8a3f5 in NodeHandle (this=0x7fffffffde90, ns=..., remappings=...) at 
#6  0x0000000000405351 in main (argc=1, argv=<value optimized out>) at

This line test_driver.cpp:59 is

ros::NodeHandle nh_;

Any suggestions?? I am pretty hung up on this..

edit retag flag offensive close merge delete


Another thing to add which may help: ~$ rosboost-cfg --root gives me /usr/local however, rosboost-cfg --lib_dirs and the rest of the options do not return anything.
KM gravatar image KM  ( 2012-01-27 03:53:39 -0600 )edit
Here is another bit of information that I have tracked down. When making with VERBOSE = TRUE, I get the following., needed by /home/robot/ros/testing/my_lib/src/, may conflict with
KM gravatar image KM  ( 2012-01-27 05:27:52 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-01-31 04:29:46 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

As your follow up question implies you cannot run two versions of boost in the same executable.

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


Asked: 2012-01-27 03:11:02 -0600

Seen: 707 times

Last updated: Jan 31 '12