Gazebo | Ignition | Community
Ask Your Question
0

Error [Plugin.hh:127] undefined symbol

asked 2013-11-04 08:25:29 -0500

Eisenhorn gravatar image

updated 2013-11-05 10:08:05 -0500

Hello,

Before I ask my question here my system specs:

  • 3.8.0-32-generic #47~precise1-Ubuntu SMP Wed Oct 2 16:19:35 UTC 2013 x8664 x8664 x86_64 GNU/Linux
  • g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
  • ldd (Ubuntu EGLIBC 2.15-0ubuntu10.5) 2.15
  • ROS Fuerte
  • Gazebo 1.9 and Gazebo 1.8.6

Me and a college are working on a gazebo Plugin.

When my college compiles the library, i can use it without any problems at runtime with the robot model. Yet when I compile the very same library i get an undefined symbol error:

Error [Plugin.hh:127] Failed to load plugin /home/user/eclipse_ws/plugin_cmds/libtaurob_plugin_ros.so: /home/user/eclipse_ws/plugin_cmds/libtaurob_plugin_ros.so: undefined symbol: _ZN3ros7console13g_initializedE

My collegue is using gazebo 1.8.6. I have tried and failed using gazebo 1.8.6 and 1.9 (using the corresponing headers and gazebo simulator versions).

It looks like a name mangeling problem. But maybe somehone has encountered a similar problem?

Doing ldd libtaurobpluginros.so gives this as a result. At least every required library is found.

    linux-vdso.so.1 =>  (0x00007fffc0bf2000)
libgazebo_physics.so.1 => /usr/lib/libgazebo_physics.so.1 (0x00007f7dd5c26000)
libgazebo_sensors.so.1 => /usr/lib/libgazebo_sensors.so.1 (0x00007f7dd5991000)
libgazebo_math.so.1 => /usr/lib/libgazebo_math.so.1 (0x00007f7dd5759000)
libgazebo_common.so.1 => /usr/lib/libgazebo_common.so.1 (0x00007f7dd54a9000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f7dd51a9000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7dd4eac000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f7dd4c96000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f7dd48d6000)
libgazebo_util.so.1 => /usr/lib/libgazebo_util.so.1 (0x00007f7dd4658000)
libgazebo_physics_ode.so.1 => /usr/lib/libgazebo_physics_ode.so.1 (0x00007f7dd43bc000)
libgazebo_transport.so.1 => /usr/lib/libgazebo_transport.so.1 (0x00007f7dd4128000)
libgazebo_msgs.so.1 => /usr/lib/libgazebo_msgs.so.1 (0x00007f7dd3dbf000)
libprotobuf.so.7 => /usr/lib/libprotobuf.so.7 (0x00007f7dd3ad0000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7dd38cc000)
libsdformat.so.1 => /usr/lib/libsdformat.so.1 (0x00007f7dd3607000)
libboost_thread.so.1.46.1 => /usr/lib/libboost_thread.so.1.46.1 (0x00007f7dd33ee000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f7dd31d1000)
libboost_system.so.1.46.1 => /usr/lib/libboost_system.so.1.46.1 (0x00007f7dd2fcc000)
libboost_regex.so.1.46.1 => /usr/lib/libboost_regex.so.1.46.1 (0x00007f7dd2cca000)
libgazebo_rendering.so.1 => /usr/lib/libgazebo_rendering.so.1 (0x00007f7dd2917000)
libboost_filesystem.so.1.46.1 => /usr/lib/libboost_filesystem.so.1.46.1 (0x00007f7dd26f8000)
libboost_iostreams.so.1.46.1 => /usr/lib/libboost_iostreams.so.1.46.1 (0x00007f7dd24df000)
libfreeimage.so.3 => /usr/lib/libfreeimage.so.3 (0x00007f7dd21e5000)
libtinyxml.so.2.6.2 => /usr/lib/libtinyxml.so.2.6.2 (0x00007f7dd1fd0000)
libcurl.so.4 => /usr/lib/x86_64-linux-gnu/libcurl.so.4 (0x00007f7dd1d73000)
libtar.so.0 => /usr/lib/libtar.so.0 (0x00007f7dd1b66000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f7dd195e000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7dd621b000)
libgazebo_ode.so.1 => /usr/lib/libgazebo_ode.so.1 (0x00007f7dd1694000)
libtbb.so.2 => /usr/lib/libtbb.so.2 (0x00007f7dd1467000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f7dd124f000)
libicuuc.so.48 => /usr/lib/libicuuc.so.48 (0x00007f7dd0ee5000 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-11-04 18:27:10 -0500

scpeters gravatar image

A clue to the problem is in the name of the undefined symbol: _ZN3ros7console13g_initializedE. It appears that you are trying to call ros functions (specifically ros console functions), but you have not linked your library with the ros libraries. Can you try linking with the ROS libraries that you use?

edit flag offensive delete link more

Comments

Hi! Thanks for your answer. I have updated my original post with more information, including the CMakeList.txt. The CMakeList.txt is based upon the tutorial from http://gazebosim.org/wiki/Tutorials#Plugins. I am not sure where the Variables such as roscppLIBRARYDIRS are specified. Also I cant run the rosbuildinit() script, as the plugin is no package. Is it sufficient to add this line in order to link the libraries targetlinklibraries(taurobpluginros ${GAZEBOLIBRARIES} ... BR

Eisenhorn gravatar imageEisenhorn ( 2013-11-05 10:13:49 -0500 )edit

targetlinklibraries(taurobpluginros ${GAZEBOLIBRARIES} ${roscppLIBRARIES} ${rosconsole_LIBRARIES})I tried that but nothing changed.

Eisenhorn gravatar imageEisenhorn ( 2013-11-05 10:14:10 -0500 )edit

You commented out the #find_package(roscpp std_msgs genmsg), so I don't think the variables like roscpp_INCLUDE_DIRS will exist. You can test by printing them out `message(STATUS "roscppINCLUDEDIRS ${roscppINCLUDEDIRS}"). Since this is starting to become a question about ROS, you may consider posting at answers.ros.org as well, since I'm not currently using fuerte.

scpeters gravatar imagescpeters ( 2013-11-06 12:29:39 -0500 )edit

Ahhhhhhhh thank you so much. I just included the line find_package(roscpp). Now ldd links to the corresponding library taurob.llibrosconsole.so => /opt/ros/fuerte/lib/librosconsole.so (0x00007ff940ff0000)

Eisenhorn gravatar imageEisenhorn ( 2013-11-12 05:01:11 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-11-04 08:25:29 -0500

Seen: 3,018 times

Last updated: Nov 05 '13