Ask Your Question
0

ros2 run turtlesim symbol lookup error

asked 2021-06-23 04:38:42 -0600

michaelk gravatar image

updated 2021-06-29 07:19:40 -0600

gvdhoorn gravatar image

Hi folks,

I'm new to ROS and followed the guideline up to starting turtlesim. Now I get the follwoing error:

[turtlesim]: Starting turtlesim with node name /turtlesim
/opt/ros/galactic/lib/turtlesim/turtlesim_node: symbol lookup error: /opt/ros/galactic/lib/librcl_logging_spdlog.so: undefined symbol: _ZN6spdlog7details7log_msgC1ENS_10source_locEN3fmt2v617basic_string_viewIcEENS_5level10level_enumES6_

I use ROS2 galactic on a Ubuntu 20.04 installation.

Thanks in advance.

edit retag flag offensive close merge delete

Comments

The error is thrown when a module can't find a module function to call. Have you installed Galactic via multiple methods perhaps? Can you try re-installing Galactic?

trunc8 gravatar image trunc8  ( 2021-06-29 06:20:21 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2021-09-08 23:38:24 -0600

YuanQZH gravatar image

This is caused by broken .so file. I use pre-compiled package as well. After install nav2 using apt and source setup.bash, I got similar error output. This is because

$  locate librcl_logging_spdlog.so
/home/user/ros2_galactic/ros2-linux/lib/librcl_logging_spdlog.so
/opt/ros/galactic/lib/librcl_logging_spdlog.so

Just copy the ros2_galactic/ros2-linux/lib/librcl_logging_spdlog.so to /opt/ros/galactic/lib/ , the problem solved.

The difference is:

ls librcl_logging_spdlog.so* -l
-rw-r--r-- 1 root root 482632 Sep  5 20:53 librcl_logging_spdlog.so
-rw-r--r-- 1 root root  35352 Jul  1 06:15 librcl_logging_spdlog.so.bak
edit flag offensive delete link more
0

answered 2021-06-29 07:07:05 -0600

michaelk gravatar image

I used the pre-comiled package. The problem persisted over uninstalling and reinstalling with Debian package. After installation by compiling on the machine, the problem disappeared.

edit flag offensive delete link more

Comments

This is not really a proper solution.

Packages released through the ROS 2 buildfarm and installed using apt should not result in symbol lookup errors.

Building packages from source should really only be done if absolutely necessary.

I'd suggest you open an issue on the ros2/rcl_logging issue tracker. Please post a comment here with a link to your issue to keep things connected.

Please also refer to your ROS Answers question in your post on the issue tracker.

gvdhoorn gravatar image gvdhoorn  ( 2021-06-29 07:19:26 -0600 )edit

It is probable that the error is specific to OP's system; the environment may have been polluted from an incomplete uninstallation. I tested the same command on ROS2 Galactic and Ubuntu 20.04 on my system, and it ran without errors.

trunc8 gravatar image trunc8  ( 2021-06-29 08:33:46 -0600 )edit

It was the first installation after setting up the system which failed.

michaelk gravatar image michaelk  ( 2021-06-29 08:41:43 -0600 )edit
1

It is probable that the error is specific to OP's system; the environment may have been polluted from an incomplete uninstallation.

that could be, but if the state of a user' system is capable of completely breaking a package, that should at least be documented I feel. Especially if the "only thing" users do is run a simple installation command and then follow a tutorial.

Even if it turns out to be a problem with deployment, it'd be good to figure out the cause, as that could help avoid it in the future.

gvdhoorn gravatar image gvdhoorn  ( 2021-06-29 09:31:25 -0600 )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

1 follower

Stats

Asked: 2021-06-23 04:38:42 -0600

Seen: 294 times

Last updated: Sep 08 '21