ros2 / rcl_logging

Logging implementations for ROS 2.
Apache License 2.0
22 stars 35 forks source link

rviz2 crashes during launch because of rcl_logging_spdlog undefined symbol #108

Closed ClemensLinnhoff closed 12 months ago

ClemensLinnhoff commented 12 months ago

I am using ROS2 Humble on Ubuntu 22.04.

When I try to start rviz2, it crashes during launch with the following error:

rviz2
[INFO] [1702033731.572901130] [rviz2]: Stereo is NOT SUPPORTED
rviz2: symbol lookup error: /opt/ros/humble/lib/librcl_logging_spdlog.so: undefined symbol: _ZN6spdlog7details7log_msgC1ENS_10source_locEN3fmt2v817basic_string_viewIcEENS_5level10level_enumES6_

Any idea, where this is coming from? I also tried to uninstall and reinstall ROS completely, but that did not help.

clalancette commented 12 months ago

The missing symbol is from the spdlog library, which underlies the logging in ROS. I suspect that you are using a different spdlog than the usual, but I'm not sure. Can you do the following:

  1. Source your humble installation (source /opt/ros/humble/setup.bash)
  2. Run ldd /opt/ros/humble/lib/librcl_logging_spdlog.so
  3. Run dpkg -l | grep spdlog

And paste all of the output here.

ClemensLinnhoff commented 12 months ago

You are right! spdlog seems to be taken from my Nvidia IsaacSim installation:

libspdlog.so.1 => /home/clemens/.local/share/ov/pkg/isaac_sim-2023.1.0/exts/omni.isaac.ros2_bridge/humble/lib/libspdlog.so.1 (0x00007f6f4dc54000)

The output of the last command is:

ii  libspdlog-dev:amd64                               1:1.9.2+ds-0.2                          amd64        Very fast, header only or compiled, C++ logging library
ii  libspdlog1:amd64                                  1:1.9.2+ds-0.2                          amd64        Very fast C++ logging library
ii  ros-humble-rcl-logging-spdlog                     2.3.1-1jammy.20231117.180431            amd64        Implementation of rcl_logging API for an spdlog backend.
ii  ros-humble-spdlog-vendor                          1.3.1-1jammy.20231117.174822            amd64        Wrapper around spdlog, providing nothing but a dependency on spdlog, on some systems.

Any idea on how to fix this?

clalancette commented 12 months ago

Any idea on how to fix this?

You'll need to use the system spdlog, otherwise things definitely won't work. I guess you should remove the /home/clemens/.local from your paths, probably LD_LIBRARY_PATH and PATH. If you can't do that, then you'll have to build Humble from source: http://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html

Since this isn't a problem with this package, I'm going to close this one out.

ClemensLinnhoff commented 12 months ago

That's it! Thank you very much!