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

teleop_base compile errors from boost.

asked 2011-11-17 13:02:59 -0600

pmwalk gravatar image

I am working through the Stage Simulating One Robot tutorial, but am having trouble compiling teleop_base. I had to change the default directories in several places, and am now stuck with errors in the cmake files related to boost (at least, this is what I gather from the output). Here is the end of the results from running "rosmake teleop_base":

rosmake ] Last 40 linesleop_base: 2.1 sec ] [ 1 Active 42/43 Complete ]

{-------------------------------------------------------------------------------

cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=rospack find rosbuild/rostoolchain.cmake ..

[rosbuild] Building package teleop_base

[rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/rospy/cmake/rospy.cmake

[rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/roslisp/cmake/roslisp.cmake

[rosbuild] Including /opt/ros/electric/stacks/ros_comm/clients/cpp/roscpp/cmake/roscpp.cmake

-- Configuring done

-- Generating done

CMake Warning:

Manually-specified variables were not used by the project:

      CMAKE_TOOLCHAIN_FILE

-- Build files have been written to: /opt/ros/electric/stacks/teleop_base/build

cd build && make -l4

make[1]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

make[2]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

make[3]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

make[3]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

[ 0%] Built target rospack_genmsg_libexe

make[3]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

make[3]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

[ 0%] Built target rosbuild_precompile

make[3]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

make[3]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

[ 50%] Built target teleop_base

make[3]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

make[3]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

make[3]: Entering directory `/opt/ros/electric/stacks/teleop_base/build'

[100%] Building CXX object CMakeFiles/teleop_base_keyboard.dir/src/teleop_base_keyboard.o

/opt/ros/electric/stacks/teleop_base/src/teleop_base_keyboard.cpp: In function ‘int main(int, char**)’:

/opt/ros/electric/stacks/teleop_base/src/teleop_base_keyboard.cpp:104:85: error: cannot call constructor ‘boost::thread::thread’ directly [-fpermissive]

/opt/ros/electric/stacks/teleop_base/src/teleop_base_keyboard.cpp:104:85: error:
for a function-style cast, remove the redundant ‘::thread’ [-fpermissive]

make[3]: * [CMakeFiles/teleop_base_keyboard.dir/src/teleop_base_keyboard.o] Error 1

make[3]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

make[2]: * [CMakeFiles/teleop_base_keyboard.dir/all] Error 2

make[2]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

make[1]: * [all] Error 2

make[1]: Leaving directory `/opt/ros/electric/stacks/teleop_base/build'

-------------------------------------------------------------------------------}

[ rosmake ] Output from build of package teleop_base written to:

[ rosmake ] /home/phillip/.ros/rosmake/rosmake_output-20111117- 215908/teleop_base/build_output.log

[rosmake-0] Finished <<< teleop_base [FAIL] [ 2.06 seconds ]

[ rosmake ] Halting due to failure in package teleop_base.

[ rosmake ] Waiting for other threads to complete.

[ rosmake ] Results:

[ rosmake ] Built 43 packages with 1 failures.

[ rosmake ] Summary output to directory

[ rosmake ] /home/phillip/.ros/rosmake/rosmake_output-20111117-215908

Any help as to where to start fixing this problem would be welcome. I'm not even quite sure where to look/what the errors might be in relation to. I'm new to ROS and Stage. Thank you in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
5

answered 2011-12-07 19:04:59 -0600

Narton gravatar image

I got the same error, and looking through the output:

/opt/ros/electric/stacks/teleop_base/src/teleop_base_keyboard.cpp:104:85: error: cannot call constructor ‘boost::thread::thread’ directly [-fpermissive]

/opt/ros/electric/stacks/teleop_base/src/teleop_base_keyboard.cpp:104:85: error: for a function-style cast, remove the redundant ‘::thread’ [-fpermissive]

so I went into teleop_base/src/teleop_base_keyboard.cpp and removed the redundant '::thread'

It seems to work now.

Cheers!

edit flag offensive delete link more

Comments

That seems to have been the problem, thanks!
pmwalk gravatar image pmwalk  ( 2011-12-15 16:05:11 -0600 )edit
You are a saint and a scholar.
osuairt gravatar image osuairt  ( 2012-01-15 22:06:57 -0600 )edit

Hello guys, I'm removing the '::thread' redundancy and still the problem persists - I'm using groovy now. Just checking, the line at the teleop_base_keyboard.cpp will become boost::thread t = boost::thread(boost::bind(&TBK_Node::keyboardLoop, &tbk)); correct?

basbaum gravatar image basbaum  ( 2013-04-11 12:14:09 -0600 )edit

Question Tools

Stats

Asked: 2011-11-17 13:02:59 -0600

Seen: 878 times

Last updated: Dec 07 '11