Error when building micro_ros_agent

I’m trying to install ardupilot_msgs and I have ubuntu 22 but I get the following error:
(fastrtps is already installed)
~/ardu_ws$ colcon build --packages-up-to ardupilot_dds_tests --event-handlers=console_cohesion+
Starting >>> ardupilot_msgs
Starting >>> micro_ros_agent
— output: micro_ros_agent
– Found ament_cmake: 1.3.11 (/opt/ros/humble/share/ament_cmake/cmake)
– Found rosidl_cmake: 3.1.6 (/opt/ros/humble/share/rosidl_cmake/cmake)
– Found rosidl_adapter: 3.1.6 (/opt/ros/humble/share/rosidl_adapter/cmake)
CMake Error at /opt/ros/humble/share/fastrtps/cmake/fastrtps-dynamic-targets.cmake:37 (message):
Some (but not all) targets in this export set were already defined.

Targets Defined: eProsima_atomic

Targets not yet defined: fastrtps

Call Stack (most recent call first):
/opt/ros/humble/share/fastrtps/cmake/fastrtps-config.cmake:60 (include)
CMakeLists.txt:37 (find_package)

– Configuring incomplete, errors occurred!
See also “/home/msyuruk/ardu_ws/build/micro_ros_agent/CMakeFiles/CMakeOutput.log”.
gmake: * [Makefile:166: cmake_check_build_system] Error 1

— stderr: micro_ros_agent
CMake Error at /opt/ros/humble/share/fastrtps/cmake/fastrtps-dynamic-targets.cmake:37 (message):
Some (but not all) targets in this export set were already defined.

Targets Defined: eProsima_atomic

Targets not yet defined: fastrtps

Call Stack (most recent call first):
/opt/ros/humble/share/fastrtps/cmake/fastrtps-config.cmake:60 (include)
CMakeLists.txt:37 (find_package)

gmake: * [Makefile:166: cmake_check_build_system] Error 1

Failed <<< micro_ros_agent [0.33s, exited with code 2]
Aborted <<< ardupilot_msgs [0.48s]

Summary: 0 packages finished [0.94s]
1 package failed: micro_ros_agent
1 package aborted: ardupilot_msgs
1 package had stderr output: micro_ros_agent
2 packages not processed

What can I do?

1 Like

Please attach home/msyuruk/ardu_ws/build/micro_ros_agent/CMakeFiles/CMakeOutput.log

Note - this is a build error in a package not maintained by ardupilot. GitHub - micro-ROS/micro-ROS-Agent: ROS 2 package using Micro XRCE-DDS Agent.

Hi! Have the same issue! Log file attached
CMakeOutput.log (49.4 KB)
I am trying to do step-by-step by Ardupilot documentation guide for ROS2

This is odd. We don’t see this in CI, and I can’t reproduce locally.

Can you file a bug report on their GitHub?

@Tuana_Saracoglu @Ivan_Aphanasyev did you resolve the problem ? I ran into the same issue.

facing same problem did you find any solution ?

@rmackay9
Can you look upon this

It’s not an ardupilot issue.
We don’t have bandwidth to maintain eProsima’s software for nonstandard installs, and no one has supplied step by step instructions in something like docker to reproduce it. If you can make a Dockerfile that reproduces this error and share it on the upstream ticket, it is more likely to be solved.