gazebosim / ros_gz

Integration between ROS (1 and 2) and Gazebo simulation
https://gazebosim.org
Apache License 2.0
211 stars 125 forks source link

Build of humble branch fails after apt upgrade #514

Closed samiamlabs closed 3 months ago

samiamlabs commented 3 months ago

Environment

Description

I noticed this today when the build for one of our docker images failed. I could reproduce the problem on 2 separate machines (in docker). It was working before I ran apt upgrade and not working after the following packages were upgraded:

bash libexpat1 libexpat1-dev libgz-cmake3-dev libgz-common5 libgz-common5-av libgz-common5-av-dev libgz-common5-core-dev libgz-common5-dev libgz-common5-events
  libgz-common5-events-dev libgz-common5-geospatial libgz-common5-geospatial-dev libgz-common5-graphics libgz-common5-graphics-dev libgz-common5-io
  libgz-common5-io-dev libgz-common5-profiler libgz-common5-profiler-dev libgz-common5-testing libgz-common5-testing-dev libgz-math7 libgz-math7-dev
  libgz-math7-eigen3-dev libldap-2.5-0 linux-libc-dev python3-colcon-cd python3-colcon-core python3-colcon-devtools python3-colcon-notification
  python3-colcon-package-information python3-gz-math7 vim vim-common vim-runtime xxd

I suspect that a new release of libgz-math7 could be the cause, but have not verified this.

Steps to reproduce

  1. apt update
  2. apt upgrade
  3. colcon build --merge-install

Output

root@0a23ce4e83da:/opt/dependencies_ws# colcon build --merge-install
Starting >>> ros_gz_interfaces
Starting >>> ros_gz_sim
Starting >>> ros2_shared
--- stderr: ros_gz_sim                                                                           
gmake[2]: *** No rule to make target '/usr/lib/x86_64-linux-gnu/libgz-math7.so.7.3.0', needed by 'create'.  Stop.
gmake[1]: *** [CMakeFiles/Makefile2:159: CMakeFiles/create.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< ros_gz_sim [0.42s, exited with code 2]
Aborted  <<< ros2_shared [0.43s]
Aborted  <<< ros_gz_interfaces [0.96s]                                 

Summary: 0 packages finished [1.26s]
  1 package failed: ros_gz_sim
  2 packages aborted: ros2_shared ros_gz_interfaces
  1 package had stderr output: ros_gz_sim
  11 packages not processed
azeey commented 3 months ago

It looks like you need to do a clean build. Your build is looking for gz-math 7.3.0, but the upgrade would have replaced it with 7.4.0.

samiamlabs commented 3 months ago

We first saw a build failure in a clean docker build (only saw the that the package failed to build, not why) and reproduced it in an old build using apt upgrade and colcon build. Can try again with a clean build tomorrow.

samiamlabs commented 3 months ago

Doing a clean colcon build fixed the issue in the old docker builds. A clean docker build also seems to work today. Still don't know why it failed yesterday though... Do you have any theories?

azeey commented 3 months ago

Doing a clean colcon build fixed the issue in the old docker builds. A clean docker build also seems to work today. Still don't know why it failed yesterday though... Do you have any theories?

Good to hear it's working. I have no idea why it would have failed yesterday. The 7.4.0 release was made on March 15.

I'll go ahead and close this issue since it doesn't appear to be a bug in ros_gz