Open jacobperron opened 4 years ago
@Karsten1987 Do you know if this use-case was ever tried?
can you try inverting the source order? basically swap step 2 and 3
The problem did arise in the past, and I remember there isn't really much we can do about it except taking care what is being sourced and in which order
This is the documented order in the readme, and reversing the order fails compilation at ros1_rosbag_storage_vendor
.
Edit: I lied, it fails at rosbag2_bag_v2_plugins
:
Starting >>> rosbag2_bag_v2_plugins
--- stderr: rosbag2_bag_v2_plugins
CMake Error at CMakeLists.txt:115 (pluginlib_export_plugin_description_file):
Unknown CMake command "pluginlib_export_plugin_description_file".
---
Failed <<< rosbag2_bag_v2_plugins [ Exited with code 1 ]
I am also running into almost the same issue.
I'm running ros melodic and eloquent.
When trying to build the rosbag2_bag_v2 package i get the following error output:
`Starting >>> rosbag2_bag_v2_plugins
--- stderr: rosbag2_bag_v2_plugins
CMake Warning at /opt/ros/eloquent/share/actionlib_msgs/cmake/actionlib_msgsConfig.cmake:29 (message):
Package 'actionlib_msgs' is deprecated (This package will be removed in a
future ROS distro, once the ROS 1 bridge supports actions.)
Call Stack (most recent call first):
CMakeLists.txt:72 (find_package)
CMake Warning at /opt/ros/eloquent/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable): Cannot generate a safe runtime search path for target test_rosbag_v2_storage because files in some directories may conflict with libraries in implicit directories:
runtime library [liburdfdom_sensor.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
runtime library [liburdfdom_model_state.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
runtime library [liburdfdom_model.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
runtime library [liburdfdom_world.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
runtime library [libconsole_bridge.so.0.4] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
Some of these libraries may not be found correctly. Call Stack (most recent call first): /opt/ros/eloquent/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock) CMakeLists.txt:137 (ament_add_gmock)
CMake Warning at /opt/ros/eloquent/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable): Cannot generate a safe runtime search path for target test_rosbag_v2_storage because there is a cycle in the constraint graph:
dir 0 is [/home/mh/rosbag2_bag_v2_ws/build/rosbag2_bag_v2_plugins]
dir 1 is [/opt/ros/eloquent/lib]
dir 0 must precede it due to runtime library [librosbag2_bag_v2_plugins.so]
dir 2 must precede it due to runtime library [libros1_rosbag_storage.so]
dir 4 must precede it due to runtime library [libimage_transport.so]
dir 2 is [/home/mh/rosbag2_bag_v2_ws/install/ros1_rosbag_storage_vendor/lib]
dir 3 is [/opt/ros/eloquent/opt/yaml_cpp_vendor/lib]
dir 4 is [/opt/ros/melodic/lib]
dir 1 must precede it due to runtime library [libclass_loader.so]
Some of these libraries may not be found correctly. Call Stack (most recent call first): /opt/ros/eloquent/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock) CMakeLists.txt:137 (ament_add_gmock)
CMake Warning at /opt/ros/eloquent/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable): Cannot generate a safe runtime search path for target test_rosbag_output_stream because files in some directories may conflict with libraries in implicit directories:
runtime library [liburdfdom_sensor.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
runtime library [liburdfdom_model_state.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
runtime library [liburdfdom_model.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
runtime library [liburdfdom_world.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
runtime library [libconsole_bridge.so.0.4] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
Some of these libraries may not be found correctly. Call Stack (most recent call first): /opt/ros/eloquent/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock) CMakeLists.txt:149 (ament_add_gmock)
CMake Warning at /opt/ros/eloquent/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable): Cannot generate a safe runtime search path for target test_rosbag_output_stream because there is a cycle in the constraint graph:
dir 0 is [/home/mh/rosbag2_bag_v2_ws/build/rosbag2_bag_v2_plugins]
dir 1 is [/opt/ros/eloquent/lib]
dir 0 must precede it due to runtime library [librosbag2_bag_v2_plugins.so]
dir 2 must precede it due to runtime library [libros1_rosbag_storage.so]
dir 4 must precede it due to runtime library [libimage_transport.so]
dir 2 is [/home/mh/rosbag2_bag_v2_ws/install/ros1_rosbag_storage_vendor/lib]
dir 3 is [/opt/ros/eloquent/opt/yaml_cpp_vendor/lib]
dir 4 is [/opt/ros/melodic/lib]
dir 1 must precede it due to runtime library [libclass_loader.so]
Some of these libraries may not be found correctly. Call Stack (most recent call first): /opt/ros/eloquent/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock) CMakeLists.txt:149 (ament_add_gmock)
CMake Warning at CMakeLists.txt:76 (add_library): Cannot generate a safe runtime search path for target rosbag2_bag_v2_plugins because files in some directories may conflict with libraries in implicit directories:
runtime library [liburdfdom_sensor.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
runtime library [liburdfdom_model_state.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
runtime library [liburdfdom_model.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
runtime library [liburdfdom_world.so.1.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
runtime library [libconsole_bridge.so.0.4] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
/opt/ros/eloquent/lib
Some of these libraries may not be found correctly.
CMake Warning at CMakeLists.txt:76 (add_library): Cannot generate a safe runtime search path for target rosbag2_bag_v2_plugins because there is a cycle in the constraint graph:
dir 0 is [/home/mh/rosbag2_bag_v2_ws/install/ros1_rosbag_storage_vendor/lib]
dir 1 is [/opt/ros/eloquent/lib]
dir 0 must precede it due to runtime library [libros1_rosbag_storage.so]
dir 3 must precede it due to runtime library [libimage_transport.so]
dir 2 is [/opt/ros/eloquent/opt/yaml_cpp_vendor/lib]
dir 3 is [/opt/ros/melodic/lib]
dir 1 must precede it due to runtime library [libclass_loader.so]
Some of these libraries may not be found correctly.
class_loader::MultiLibraryClassLoader::getAllAvailableClassLoaders()' /opt/ros/melodic/lib/librviz.so: undefined reference to
class_loader::impl::AbstractMetaObjectBase::isOwnedBy(class_loader::ClassLoader const*)'
/opt/ros/melodic/lib/librviz.so: undefined reference to class_loader::MultiLibraryClassLoader::getRegisteredLibraries[abi:cxx11]()' /opt/ros/melodic/lib/librviz.so: undefined reference to
class_loader::ClassLoader::isLibraryLoaded()'
collect2: error: ld returned 1 exit status
make[2]: [test_rosbag_output_stream] Error 1
make[1]: [CMakeFiles/test_rosbag_output_stream.dir/all] Error 2
make[1]: Waiting for unfinished jobs....
/opt/ros/melodic/lib/librviz.so: undefined reference to class_loader::MultiLibraryClassLoader::getAllAvailableClassLoaders()' /opt/ros/melodic/lib/librviz.so: undefined reference to
class_loader::impl::AbstractMetaObjectBase::isOwnedBy(class_loader::ClassLoader const)'
/opt/ros/melodic/lib/librviz.so: undefined reference to class_loader::MultiLibraryClassLoader::getRegisteredLibraries[abi:cxx11]()' /opt/ros/melodic/lib/librviz.so: undefined reference to
class_loader::ClassLoader::isLibraryLoaded()'
collect2: error: ld returned 1 exit status
make[2]: ** [test_rosbag_v2_storage] Error 1
make[1]: [CMakeFiles/test_rosbag_v2_storage.dir/all] Error 2
make: *** [all] Error 2Failed <<< rosbag2_bag_v2_plugins [10.2s, exited with code 2]
Summary: 1 package finished [10.9s] 1 package failed: rosbag2_bag_v2_plugins 1 package had stderr output: rosbag2_bag_v2_plugins `
@Karsten1987 any update on this issue?
Same problem as @Mavahu but with foxy
and noetic
.
@Mavahu I have fixed that problem - see #32
I'm trying to compile rosbag2_bag_v2 in an overlay on a release archive and getting cmake warnings about cycles.
I'm on Ubuntu 18.04 with a ROS Eloquent installation. I can also reproduce with a pre-Foxy nightly archive.
To reproduce,
Download and extract a release archive (e.g. Eloquent)
Source Melodic installation
Source Eloquent installation
Checkout this repository and try to build
Example output: