Ardupilot_sitl build fails

Hi there!
Im trying to build ardupilot packages but it fails with error:

ubuntu@a593ad026e55:~/ros2_ws/ardupilot$ colcon build --packages-up-to ardupilot_sitl
Starting >>> ardupilot_msgs
Finished <<< ardupilot_msgs [0.36s]
Starting >>> ardupilot_sitl
— stderr: ardupilot_sitl
openjdk version “11.0.22” 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1)
OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1, mixed mode)

openjdk version “11.0.22” 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1)
OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1, mixed mode)

openjdk version “11.0.22” 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1)
OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1, mixed mode)

openjdk version “11.0.22” 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1)
OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1, mixed mode)

openjdk version “11.0.22” 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1)
OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1, mixed mode)

openjdk version “11.0.22” 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1)
OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1, mixed mode)

openjdk version “11.0.22” 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1)
OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1, mixed mode)

openjdk version “11.0.22” 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1)
OpenJDK 64-Bit Server VM (build 11.0.22+7-post-Ubuntu-0ubuntu222.04.1, mixed mode)

Build failed
→ task in ‘/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/geographic_msgs/msg/GeoPointStamped.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/geographic_msgs/msg/GeoPointStamped.c’ failed (exit status 255):
{task 281472884172144: /home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/geographic_msgs/msg/GeoPointStamped.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/geographic_msgs/msg/GeoPointStamped.c GeoPointStamped.idl → GeoPointStamped.h,GeoPointStamped.c}
(run with -v to display more information)
→ task in ‘/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/geographic_msgs/msg/GeoPose.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/geographic_msgs/msg/GeoPose.c’ failed (exit status 255):
{task 281472884172368: /home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/geographic_msgs/msg/GeoPose.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/geographic_msgs/msg/GeoPose.c GeoPose.idl → GeoPose.h,GeoPose.c}
(run with -v to display more information)
→ task in ‘/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/builtin_interfaces/msg/Duration.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/builtin_interfaces/msg/Duration.c’ failed (exit status 255):
{task 281472884171472: /home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/builtin_interfaces/msg/Duration.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/builtin_interfaces/msg/Duration.c Duration.idl → Duration.h,Duration.c}
(run with -v to display more information)
→ task in ‘/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/builtin_interfaces/msg/Time.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/builtin_interfaces/msg/Time.c’ failed (exit status 255):
{task 281472884171696: /home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/builtin_interfaces/msg/Time.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/builtin_interfaces/msg/Time.c Time.idl → Time.h,Time.c}
(run with -v to display more information)
→ task in ‘/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/ardupilot_msgs/srv/ModeSwitch.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/ardupilot_msgs/srv/ModeSwitch.c’ failed (exit status 255):
{task 281472884171248: /home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/ardupilot_msgs/srv/ModeSwitch.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/ardupilot_msgs/srv/ModeSwitch.c ModeSwitch.idl → ModeSwitch.h,ModeSwitch.c}
(run with -v to display more information)
→ task in ‘/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/ardupilot_msgs/msg/GlobalPosition.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/ardupilot_msgs/msg/GlobalPosition.c’ failed (exit status 255):
{task 281472884170800: /home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/ardupilot_msgs/msg/GlobalPosition.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/ardupilot_msgs/msg/GlobalPosition.c GlobalPosition.idl → GlobalPosition.h,GlobalPosition.c}
(run with -v to display more information)
→ task in ‘/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/geographic_msgs/msg/GeoPoint.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/geographic_msgs/msg/GeoPoint.c’ failed (exit status 255):
{task 281472884171920: /home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/geographic_msgs/msg/GeoPoint.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/geographic_msgs/msg/GeoPoint.c GeoPoint.idl → GeoPoint.h,GeoPoint.c}
(run with -v to display more information)
→ task in ‘/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/ardupilot_msgs/srv/ArmMotors.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/ardupilot_msgs/srv/ArmMotors.c’ failed (exit status 255):
{task 281472884171024: /home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/ardupilot_msgs/srv/ArmMotors.h,/home/ubuntu/ros2_ws/ardupilot/build/sitl/libraries/AP_DDS/generated/ardupilot_msgs/srv/ArmMotors.c ArmMotors.idl → ArmMotors.h,ArmMotors.c}
(run with -v to display more information)
gmake[2]: *** [CMakeFiles/ardupilot_build.dir/build.make:70: CMakeFiles/ardupilot_build] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:168: CMakeFiles/ardupilot_build.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2

Failed <<< ardupilot_sitl [2.05s, exited with code 2]

Summary: 1 package finished [2.81s]
1 package failed: ardupilot_sitl
1 package had stderr output: ardupilot_sitl

Can anyone help?

1 Like

@Illia1 Hello!! I have the same problem when I’m rebuilding the arducopter-4.5 version. It’s was fine when I was using the latest one. Did you find the solution? thanks in advance.

1 Like

Hello! Have you got solution? i have the same mistake with the latest version

I don’t use the colcon. I compiled the sitl with waf. It’s working. Please see the detail in https://discuss.ardupilot.org/t/compiling-arducopter-4-5-0-with-enable-dds-failed/115632/2

1 Like

Thanks! I replaced the line but on /ros2_ws/src/ardupilot/libraries/AP_DDS/wscript and now it works

1 Like