Problem to build gazebo at ubuntu 22.04 - Missing dependency [gz-msgs9]

Hi all
have problem to build gazebo from src

  1. I’m building at ubuntu 22.04

  2. for build steps are using
    https://gazebosim.org/docs/harmonic/install_ubuntu_src

  3. at step - colcon build --merge-install - got

~/workspace$ colcon build --merge-install
Starting >>> gz-cmake3
Finished <<< gz-cmake3 [0.42s]
Starting >>> gz-utils2
Starting >>> gz-tools2
Finished <<< gz-tools2 [0.26s]
Finished <<< gz-utils2 [0.43s]
Starting >>> gz-math7
Finished <<< gz-math7 [0.91s]
Starting >>> gz-common5
Starting >>> sdformat13
Starting >>> gz-msgs10
Finished <<< gz-msgs10 [2.94s]
Starting >>> gz-transport13
Finished <<< sdformat13 [3.49s]
Finished <<< gz-common5 [24.0s]
Starting >>> gz-plugin2
Starting >>> gz-fuel_tools8
Finished <<< gz-plugin2 [0.68s]
Starting >>> gz-rendering8
Starting >>> gz-physics6
— stderr: gz-fuel_tools8
CMake Warning at /home/user/workspace/install/share/cmake/gz-cmake3/cmake3/GzUtils.cmake:231 (find_package):
By not providing “Findgz-msgs9.cmake” in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by “gz-msgs9”,
but CMake did not find one.

Could not find a package configuration file provided by “gz-msgs9” with any
of the following names:

gz-msgs9Config.cmake
gz-msgs9-config.cmake

Add the installation prefix of “gz-msgs9” to CMAKE_PREFIX_PATH or set
“gz-msgs9_DIR” to a directory containing one of the above files. If
“gz-msgs9” provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:67 (gz_find_package)

CMake Error at /home/user/workspace/install/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:73 (message):
– BUILD ERRORS: These must be resolved before compiling.
Call Stack (most recent call first):
CMakeLists.txt:77 (gz_configure_build)

CMake Error at /home/user/workspace/install/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:75 (message):
– Missing dependency [gz-msgs9]
Call Stack (most recent call first):
CMakeLists.txt:77 (gz_configure_build)

CMake Error at /home/user/workspace/install/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:77 (message):
– END BUILD ERRORS

Call Stack (most recent call first):
CMakeLists.txt:77 (gz_configure_build)

CMake Error at /home/user/workspace/install/share/cmake/gz-cmake3/cmake3/GzConfigureBuild.cmake:82 (message):
Errors encountered in build. Please see BUILD ERRORS above.
Call Stack (most recent call first):
CMakeLists.txt:77 (gz_configure_build)


Failed <<< gz-fuel_tools8 [0.71s, exited with code 1]
Aborted <<< gz-rendering8 [0.03s]
Aborted <<< gz-physics6 [0.03s]
Aborted <<< gz-transport13 [2min 28s]

Summary: 8 packages finished [2min 33s]
1 package failed: gz-fuel_tools8
3 packages aborted: gz-physics6 gz-rendering8 gz-transport13
1 package had stderr output: gz-fuel_tools8
4 packages not processed

1 Like

what can source of issue and how can it be fixed?
thanks

colcon graph dont show dependecy msgs9

~/workspace$ colcon graph
gz-cmake3 +***************
gz-tools2 +
gz-utils2 +.*******.
gz-math7 +.*
gz-common5 + ** ******
gz-msgs10 + *
sdformat13 + * **.
gz-fuel_tools8 + .
gz-plugin2 + .
gz-transport13 +
gz-physics6 + .
gz-rendering8 +
.
gz-gui8 + **
gz-sensors8 +.
gz-sim8 +

gz-launch7 +

in collection-harmonic.yaml some repos have branch different than main
in repo gz-fuel_tools8 branch main moved from msgs9 to msgs10, but in collection-harmonic.yaml is used other branch for repo gz-fuel_tools8

if in the collection-harmonic.yaml set correct branches - it builds and run.
Question is - what branches are correct :slight_smile:
have found one combinaton of branches

I have been trying to do exactly as you (build from source on U22). The only way to build has been after patching the collection:

--- collection-harmonic.yaml.orig	2023-02-21 03:58:11.783779070 +0000
+++ collection-harmonic.yaml	2023-02-21 03:58:45.304231879 +0000
@@ -11,19 +11,19 @@
   gz-fuel-tools:
     type: git
     url: https://github.com/gazebosim/gz-fuel-tools
-    version: main
+    version: gz-fuel-tools8
   gz-sim:
     type: git
     url: https://github.com/gazebosim/gz-sim
-    version: main
+    version: gz-sim7
   gz-gui:
     type: git
     url: https://github.com/gazebosim/gz-gui
-    version: main
+    version: gz-gui7
   gz-launch:
     type: git
     url: https://github.com/gazebosim/gz-launch
-    version: main
+    version: gz-launch6
   gz-math:
     type: git
     url: https://github.com/gazebosim/gz-math
@@ -31,7 +31,7 @@
   gz-msgs:
     type: git
     url: https://github.com/gazebosim/gz-msgs
-    version: main
+    version: gz-msgs9
   gz-physics:
     type: git
     url: https://github.com/gazebosim/gz-physics
@@ -43,11 +43,11 @@
   gz-rendering:
     type: git
     url: https://github.com/gazebosim/gz-rendering
-    version: main
+    version: gz-rendering7
   gz-sensors:
     type: git
     url: https://github.com/gazebosim/gz-sensors
-    version: main
+    version: gz-sensors7
   gz-tools:
     type: git
     url: https://github.com/gazebosim/gz-tools
@@ -55,7 +55,7 @@
   gz-transport:
     type: git
     url: https://github.com/gazebosim/gz-transport
-    version: main
+    version: gz-transport12
   gz-utils:
     type: git
     url: https://github.com/gazebosim/gz-utils

Unfortunately this does not match any version in the history I have reviewed on the repository. The main reason is that many dependencies are not pinned (set to main), and they are “floating” and an get “incompatible” any time, and not always apparently (result has changed over the past few days).

So not sure there is any reference branch now. I believe currently that a way to achieve what we try to do is for the core teams to pin all dependencies (no more main) for each release.

Hello:

Please note that you are using Harmonic which is currently in the development phase, not probably recommended for the general use (documentation is being patched to reflect this and prefer latest stable).

Unless you have a very good reason to use Harmonic I would recommend to go with Garden (if you are not using ROS) or stick to the default version selected for the ROS release (a new document is under review to help with the selection): i.e: Gazebo Fortress for Humble and Rolling.

Since Harmonic is in the development phase, all the library branches were set to main until the point that library developers and the simulation team create a branch for a new major version. This is the reason why some of the libraries are pointing to main and some are not.

During the process of bumping major versions there could be some issues (like the one you are facing) with timing between library code PR reviews and merges (updating CMakeLists.txt) and the update of gazebodistro. There could be also bugs due to inconsistencies between both sites, library code and gazebodistro.

We are going to look and fix the problem you reported here but please consider the option to use to a stable version unless you have a very good reason at this point to go with Harmonic.

Thanks!

1 Like

Sorry, there is already an open issue for tracking all the updates needed to propagate the bump from msgs9 to msgs10 to happen and fix the compilation problem for all the Harmonic libs: Bump in Harmonic: gz-msgs and gz-transport · Issue #878 · gazebo-tooling/release-tools · GitHub

I am having this same issue

Please follow the works under Bump in Harmonic: gz-msgs and gz-transport · Issue #878 · gazebo-tooling/release-tools · GitHub to know when the issue is resolved. A workaround is also provided in the issue.

Removing Harmonic from the website for now since it’s going to be causing confusion Remove Harmonic from index for now by azeey · Pull Request #341 · gazebosim/docs · GitHub