ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

colcon build fails on anything with messages now after ubuntu 20.04 foxy sudo apt upgrade

asked 2021-11-09 10:32:53 -0500

brianlmerritt gravatar image

updated 2021-11-09 12:41:12 -0500

gvdhoorn gravatar image

ROS2 Foxy "colcon build" now fails on Ubuntu 20.04 on many packages using messages - turtlebot3 still compiles, but if I compile anything with navigation2, such as botvac https://github.com/cpeavy2/botvac_node I get the error

stderr: nav_2d_msgs                                              
make[2]: *** No rule to make target '/opt/ros/foxy/lib/libfastrtps.so.2.0.2', needed by 'libnav_2d_msgs__rosidl_typesupport_fastrtps_cpp.so'. Stop.
make[1]: *** [CMakeFiles/Makefile2:469: CMakeFiles/nav_2d_msgs__rosidl_typesupport_fastrtps_cpp.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Or if I compile https://github.com/winstxnhdw/AutoCar... I get similar

stderr: ngeeann_av_msgs
make[2]: *** No rule to make target '/opt/ros/foxy/lib/libfastrtps.so.2.0.2', needed by 'libngeeann_av_msgs__rosidl_typesupport_fastrtps_cpp.so'. Stop.
make[1]: *** [CMakeFiles/Makefile2:499: CMakeFiles/ngeeann_av_msgs__rosidl_typesupport_fastrtps_cpp.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:141: all] Error 2

I notice that both failing unless I remove from the packages for anything msg dependent,

<depend>rosidl_default_generators</depend>

They then compile fine.

ps - this is after doing a sudo apt upgrade today, with the install within the past 8 weeks, so something about the foxy current build on Ubuntu 20.04 is causing this.

pps - turtlebot3 doesn't have the above depend

Example

edit retag flag offensive close merge delete

Comments

Are all your packages updated? It looks like ros-foxy-fastrtps was updated from version 2.0.2-2 to 2.1.1-1 in the latest sync, which is probably why libfastrtps.so.2.0.2 can't be found.

aprotyas gravatar image aprotyas  ( 2021-11-09 12:49:27 -0500 )edit

I did sudo apt upgrade for the whole linux server, so looks like a dependency is missing maybe?

sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.


sudo apt install ros-foxy-fastrtps
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ros-foxy-fastrtps is already the newest version (2.1.1-1focal.20211014.171109).
ros-foxy-fastrtps set to manually installed.
brianlmerritt gravatar image brianlmerritt  ( 2021-11-09 16:11:26 -0500 )edit

Oh, also in neato_botvac_ws if I run

rosdep install --from-paths src --ignore-src -r -y
#All required rosdeps installed successfully
brianlmerritt gravatar image brianlmerritt  ( 2021-11-09 16:14:39 -0500 )edit

In terms of cpu, this first happened on a Raspberry Pi running 20.04 so I tried sudo apt upgrade on an Intel VM Ubuntu 20.04 and the same happened. ROS2 was installed following the debian install method for both.

brianlmerritt gravatar image brianlmerritt  ( 2021-11-09 16:24:40 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2022-11-11 10:25:00 -0500

Alexander gravatar image

Try removing build, install and log folders to clear out any previously compiled packages and try again.

rm -r build/ install/ log/
edit flag offensive delete link more
0

answered 2021-11-10 03:13:28 -0500

brianlmerritt gravatar image

Temporary answer - happy for a better one to be presented

cd /opt/ros/foxy/lib/

sudo ln -s libfastrtps.so.2.1.1 libfastrtps.so.2.0.2

cd ~/my_ws

colcon build

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-11-09 10:32:53 -0500

Seen: 1,759 times

Last updated: Nov 11 '22