ros2-for-unity icon indicating copy to clipboard operation
ros2-for-unity copied to clipboard

building standalone on Ubuntu 22.04 creates error.

Open chwu-rwth opened this issue 2 years ago • 1 comments

Environment: Ubuntu 22.04 ROS2 Humble

ros2cs was installed successfully using the --standalone tag. But as i was trying to build ros2-for-unity, the following error was shown:

-- Using RMW implementation 'rmw_fastrtps_cpp' as default 'patchelf' found in /usr/bin/patchelf -- Found rmw_cyclonedds_cpp: 0.22.6 (/opt/ros/galactic/share/rmw_cyclonedds_cpp/cmake)
CMake Error at CMakeLists.txt:182 (get_target_property): get_target_property() called with non-existent target "rmw_cyclonedds_cpp::rmw_cyclonedds_cpp". Call Stack (most recent call first): CMakeLists.txt:230 (fetch_target_lib) CMakeLists.txt:370 (get_standalone_dependencies)

Finished <<< example_interfaces [3.84s] -- Configuring incomplete, errors occurred! See also "/home/student/ros2_ws/ros2-for-unity/build/ros2cs_core/CMakeFiles/CMakeOutput.log". --- stderr: ros2cs_core
'patchelf' found in /usr/bin/patchelf CMake Error at CMakeLists.txt:182 (get_target_property): get_target_property() called with non-existent target "rmw_cyclonedds_cpp::rmw_cyclonedds_cpp". Call Stack (most recent call first): CMakeLists.txt:230 (fetch_target_lib) CMakeLists.txt:370 (get_standalone_dependencies)

Any help is appreciated.

chwu-rwth avatar Jul 18 '23 11:07 chwu-rwth

It looks like the cmake found a galactic version of cyclone dds in your system. If you are trying to build a humble release, then this is a conflict.

Do you have installed a galactic on Ubuntu 22? Is it sourced before the build?

You can try to install humble version of cyclonedds manually: sudo apt install ros-humble-rmw-cyclonedds-cpp

pijaro avatar Jul 19 '23 07:07 pijaro