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?

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?