Ask Your Question
2

Linking error libboost_system with tabletop_object_detector

asked 2012-04-29 04:19:56 -0500

Hansg91 gravatar image

Hey,

I decided to upgrade my laptop to Oneiric today and after fixing quite a few new issues, I'm stuck on an issue I can't seem to get fixed. When rosmaking tabletop_object_detector I get the following error :

/usr/bin/ld: CMakeFiles/tabletop_object_recognition.dir/src/tabletop_object_recognition.o: undefined reference to symbol 'boost::system::system_category()'
/usr/bin/ld: note: 'boost::system::system_category()' is defined in DSO /usr/lib/libboost_system.so.1.46.1 so try adding it to the linker command line
/usr/lib/libboost_system.so.1.46.1: could not read symbols: Invalid operation

I tried various things, from reinstalling libboost1.46-all-dev to making with --pre-clean, nothing seemed to have helped.

Can anyone help me out with this probably minor issue?

ps. I'm still running ROS Electric.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-04-29 06:31:17 -0500

Hansg91 gravatar image

I (hack)fixed it for now by adding -lboost_system to the target_link_libraries for tabletop_object_recognition, but it still beats me why this started to give errors now ...

edit flag offensive delete link more

Comments

I fixed it by adding set(CXX_FLAGS "-lboost_system") to CMakeLists.txt on Ubuntu 11.10

Loy gravatar image Loy  ( 2012-06-20 04:47:44 -0500 )edit
0

answered 2012-04-29 05:00:14 -0500

joq gravatar image

updated 2012-04-29 06:41:08 -0500

Most likely, you have old cmake build directories lying around from before the upgrade.

Try make clean in all the packages you build from source, or use rosmake --pre-clean.

Or, it may be easier to check out fresh working directories and rebuild everything.

UPDATE: did you remember to use rosbuild_add_boost_directories() in your CMakeLists.txt?

edit flag offensive delete link more

Comments

Thank you for your answer, but as I stated in my original post, I already tried rosmake with --pre-clean, that did not help unfortunately.

Hansg91 gravatar image Hansg91  ( 2012-04-29 05:06:34 -0500 )edit

Sorry, I missed that in the details. Did you install the Oneiric version of ROS Electric? That requires updating sources.list.d.

joq gravatar image joq  ( 2012-04-29 05:15:59 -0500 )edit

Yes I forgot to mention that I did do that, I also did sudo apt-get remove --purge ros-electric-desktop-full and install it again afterwards, but I get the same linking error. Any other thoughts ?

Hansg91 gravatar image Hansg91  ( 2012-04-29 06:06:33 -0500 )edit

Do you have libboost-system-dev installed?

joq gravatar image joq  ( 2012-04-29 06:31:46 -0500 )edit

I didn't, but after having it installed (and reverting the before mentioned hackfix) I get the same linking error.

Hansg91 gravatar image Hansg91  ( 2012-04-29 14:15:53 -0500 )edit

Just to be clear: lib_boost_directories() does not work?

joq gravatar image joq  ( 2012-04-29 14:21:08 -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

Stats

Asked: 2012-04-29 04:19:56 -0500

Seen: 1,892 times

Last updated: Apr 29 '12