Gazebo | Ignition | Community
Ask Your Question

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


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/ /home/user/eclipse_ws/plugin_cmds/ 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 gives this as a result. At least every required library is found. =>  (0x00007fffc0bf2000) => /usr/lib/ (0x00007f7dd5c26000) => /usr/lib/ (0x00007f7dd5991000) => /usr/lib/ (0x00007f7dd5759000) => /usr/lib/ (0x00007f7dd54a9000) => /usr/lib/x86_64-linux-gnu/ (0x00007f7dd51a9000) => /lib/x86_64-linux-gnu/ (0x00007f7dd4eac000) => /lib/x86_64-linux-gnu/ (0x00007f7dd4c96000) => /lib/x86_64-linux-gnu/ (0x00007f7dd48d6000) => /usr/lib/ (0x00007f7dd4658000) => /usr/lib/ (0x00007f7dd43bc000) => /usr/lib/ (0x00007f7dd4128000) => /usr/lib/ (0x00007f7dd3dbf000) => /usr/lib/ (0x00007f7dd3ad0000) => /lib/x86_64-linux-gnu/ (0x00007f7dd38cc000) => /usr/lib/ (0x00007f7dd3607000) => /usr/lib/ (0x00007f7dd33ee000) => /lib/x86_64-linux-gnu/ (0x00007f7dd31d1000) => /usr/lib/ (0x00007f7dd2fcc000) => /usr/lib/ (0x00007f7dd2cca000) => /usr/lib/ (0x00007f7dd2917000) => /usr/lib/ (0x00007f7dd26f8000) => /usr/lib/ (0x00007f7dd24df000) => /usr/lib/ (0x00007f7dd21e5000) => /usr/lib/ (0x00007f7dd1fd0000) => /usr/lib/x86_64-linux-gnu/ (0x00007f7dd1d73000) => /usr/lib/ (0x00007f7dd1b66000) => /lib/x86_64-linux-gnu/ (0x00007f7dd195e000)
/lib64/ (0x00007f7dd621b000) => /usr/lib/ (0x00007f7dd1694000) => /usr/lib/ (0x00007f7dd1467000) => /lib/x86_64-linux-gnu/ (0x00007f7dd124f000) => /usr/lib/ (0x00007f7dd0ee5000 ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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


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 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 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 => /opt/ros/fuerte/lib/ (0x00007ff940ff0000)

Eisenhorn gravatar imageEisenhorn ( 2013-11-12 05:01:11 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


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

Seen: 2,451 times

Last updated: Nov 05 '13