0
$\begingroup$

Rosanswers logo

I am trying to use ROS Hydro to launch a Kinect in Ubuntu 12.04 LTS.

I installed the proper packages using: sudo apt-get-install ros-hydro-openni-camera ros-hydro-openni-launch

However, when I run $roslaunch openni_launch openni.launch I get this error with ROS Hydro: /opt/ros/hydro/lib/nodelet/nodelet: symbol lookup error: /opt/ros/hydro/lib//libopenni_nodelet.so: undefined symbol: _ZN3ros7console5printEPNS0_10FilterBaseEPvNS0_6levels5LevelEPKciS7_S7_z

It seems to me that the path is wrong because it contains two //'s in a row before libopenni_nodelet.so but I have no idea where I should fix the problem.

Thanks for your time in advance. --Mike


Originally posted by gt-mike on ROS Answers with karma: 21 on 2014-01-28

Post score: 2

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

Tip: type this in your shell:

c++filt _ZN3ros7console5printEPNS0_10FilterBaseEPvNS0_6levels5LevelEPKciS7_S7_z

This will allow you to see the missing symbol in human-readable format:

ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, char const*, int, char const*, char const*, ...)

This process is called demangling. Now, your system is not able to find this symbol in /opt/ros/hydro/lib/libopenni_nodelet.so or the shared libraries it's linked to. You can confirm that you don't have it in your installed ROS libraries by typing:

nm -D /opt/ros/hydro/lib/*.so | grep -i "T _ZN3ros7console5printEPNS0_10FilterBaseEPvNS0_6levels5LevelEPKciS7_S7_z"

In my case (working Hydro), I get (in /opt/ros/hydro/lib/librosconsole.so):

0000000000016530 T _ZN3ros7console5printEPNS0_10FilterBaseEPvNS0_6levels5LevelEPKciS7_S7_z

Conclusion: there must be an error in the package (not up-to-date or missing shared library dependency). Check that you are up-to-date as advised by @ahendrix, and if the problem persists, you may want to contact the developers and/or packagers.

Update

Here's a script that can help you find a given symbol in a given library directory:

find_symbol.sh

#!/bin/sh
# First argument: library folder (e.g. /opt/ros/hydro/lib)
# Second argument: mangled symbol (e.g. _ZN3ros7console8shutdownEv)
for lib in $(find $1 -name \*.so) ; do
    res=`nm -D $lib | grep $2 | grep -v " U "`
    if [ ! -z "$res" ]; then
        echo "$lib: $res"
    fi
done

Then run (for instance):

./find_symbol.sh /opt/ros/hydro/lib _ZN3ros7console8shutdownEv

Output:

/opt/ros/hydro/lib/librosconsole.so: 0000000000015e00 T _ZN3ros7console8shutdownEv


Originally posted by bchr with karma: 596 on 2014-01-28

This answer was ACCEPTED on the original site

Post score: 5

$\endgroup$
0
$\begingroup$

Rosanswers logo

The path looks fine; the OS will collapse multiple '//'s together automatically.

It looks like the real issue here is ABI breakage in one of the underlying libraries; probably the call to ros::console::print(). I think rosconsole underwent some ABI changes recently, and it's possible that the version you have isn't up to date.

Try running sudo apt-get update and sudo apt-get dist-upgrade to install the latest versions of the ROS packages.


Originally posted by ahendrix with karma: 47576 on 2014-01-28

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by rand on 2014-02-19:
I had the exact same problem as bchr, and this solved it. I think this should be the accepted answer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.