ros-noetic-arch / ros-noetic-desktop-full

ros-noetic-desktop-full AUR package
16 stars 2 forks source link

ROS fails to build and run since recent update (errors with libtf.so) #16

Closed TheCodeSummoner closed 3 years ago

TheCodeSummoner commented 3 years ago

Issue

Since a recent update on 2020-12-08, the package fails to build, and also my existing installation fails to run.

Affected libraries are some of the ones with tf2 in their name, for example, ros-noetic-tf2-ros.

Since this affects multiple packages (I think), I've decided to open an issue in this repository.

Keep in mind that I am very new to both ROS and AUR, so I may not be understanding everything correctly - please don't be too harsh :)

Existing installation

When attempting to run a car racing simulator:

source ackermann/devel/setup.zsh
source f1tenth/devel/setup.zsh
roslaunch f1tenth_simulator simulator.launch

The following 2 windows open consecutively:

image

image

The following stream of errors follows in the console immediately:

[ INFO] [1608904938.394390818]: OpenGl version: 4.6 (GLSL 4.6) limited to GLSL 1.4 on Mesa system.
[ERROR] [1608904938.433354113]: PluginlibFactory: The plugin for class 'rviz/Orbit' failed to load.  Error: Failed to load library /opt/ros/noetic/lib/librviz_default_plugin.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /opt/ros/noetic/lib/libtf.so: undefined symbol: _ZN7tf2_ros17TransformListenerC1ERN3tf210BufferCoreERKN3ros10NodeHandleEb)
[ INFO] [1608904938.457024040]: Simulator constructed.
[ERROR] [1608904939.539540543]: PluginlibFactory: The plugin for class 'rviz/MoveCamera' failed to load.  Error: Failed to load library /opt/ros/noetic/lib/librviz_default_plugin.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /opt/ros/noetic/lib/libtf.so: undefined symbol: _ZN7tf2_ros17TransformListenerC1ERN3tf210BufferCoreERKN3ros10NodeHandleEb)
[ERROR] [1608904939.541779886]: PluginlibFactory: The plugin for class 'rviz/Interact' failed to load.  Error: Failed to load library /opt/ros/noetic/lib/librviz_default_plugin.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library (Poco exception = /opt/ros/noetic/lib/libtf.so: undefined symbol: _ZN7tf2_ros17TransformListenerC1ERN3tf210BufferCoreERKN3ros10NodeHandleEb)
(...)

The maintainer of rviz suggested contacting AUR package maintainers.

New builds

Multiple packages fail with errors similar to the below one:

[ 81%] Linking CXX shared library devel/lib/libpcl_ros_features.so
[ 81%] Built target pcl_ros_features
[ 82%] Linking CXX executable devel/lib/pcl_ros/bag_to_pcd
/usr/bin/ld: /opt/ros/noetic/lib/libtf.so: undefined reference to `tf2_ros::TransformListener::TransformListener(tf2::BufferCore&, ros::NodeHandle const&, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/bag_to_pcd.dir/build.make:405: devel/lib/pcl_ros/bag_to_pcd] Error 1
make[1]: *** [CMakeFiles/Makefile2:2382: CMakeFiles/bag_to_pcd.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 84%] Linking CXX shared library devel/lib/libpcl_ros_filter.so
[ 84%] Built target pcl_ros_filter
[ 85%] Linking CXX shared library devel/lib/libpcl_ros_io.so
[ 85%] Built target pcl_ros_io
[ 87%] Linking CXX shared library devel/lib/libpcl_ros_segmentation.so
[ 87%] Built target pcl_ros_segmentation
make: *** [Makefile:149: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
error making: ros-noetic-pcl-ros

The undefined reference to tf2_ros::TransformListener::TransformListener(tf2::BufferCore&, ros::NodeHandle const&, bool) error happens both when installing ros-noetic-desktop-full and each dependency on their own.

Summary

Based on the fact that both examples fail due to some issue with libtf.so, and since installations in other Linux distributions pass (e.g. Ubuntu), I believe there is some issue with the one provided by AUR. Unfortunately, I'm not knowledgeable enough to understand what the issue could be, and I kindly ask for your help.

Environment

OS

Package manager

acxz commented 3 years ago

Manjaro Linux

This is most likely an issue with Manjaro as they are probably behind in their packages. Manjaro does not support the AUR and neither do we support Manjaro. If you want to use these package we recommend a Arch - repo compatible distribution like EndeavourOS, which, since it is repo compatible, we do support.

I'll reopen this if someone can reproduce this on an Arch - repo compatible distro.

tldr my advice is to use Arch or EndeavourOS and try again. If you still encounter the issue, I'll be able to help.