Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 22 gz-rendering8 compilation failed due to include errors with gz/common/Animation.hh and gz/common/Material.hh #962

Open
Ryanf55 opened this issue Jan 20, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@Ryanf55
Copy link

Ryanf55 commented Jan 20, 2024

Environment

  • OS Version: Ubuntu 22
  • Source or binary build?
    Source, with gz-rendering8 branch at c62f6e9
In file included from /home/ryan/Dev/ros2_ws/src/gz-rendering/src/MoveToHelper.cc:18:
/home/ryan/Dev/ros2_ws/src/gz-rendering/include/gz/rendering/MoveToHelper.hh:22:10: fatal error: gz/common/Animation.hh: No such file or directory
   22 | #include <gz/common/Animation.hh>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/ryan/Dev/ros2_ws/src/gz-rendering/src/Scene.cc:18:
/home/ryan/Dev/ros2_ws/src/gz-rendering/include/gz/rendering/Scene.hh:24:10: fatal error: gz/common/Material.hh: No such file or directory
   24 | #include <gz/common/Material.hh>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Description

  • Expected behavior: Successful compilation.
  • Actual behavior: Include errors with no warnings at configure time of missing packages

Steps to reproduce

  1. Get Ubuntu 22 OS with ROS humble installed through binaries
  2. Install gazebo garden and gazebo harmonic through binaries
  3. Create a workspace and follow all steps to build harmonic from source
  4. Modify to only install the required packages with --no-install-recommends --no-install-suggests to minimize system bloat:
    sudo apt-get  install --no-install-recommends --no-install-suggests  $(sort -u $(find . -iname 'packages-'`lsb_release -cs`'.apt' -o -iname 'packages.apt' | grep -v '/\.git/') | sed '/gz\|sdf/d' | tr '\n' ' ') 

Output

Here is the full build log generated with the following command:

colcon build --packages-up-to gz-cmake3 gz-sim8 --mixin debug --event-handlers=console_cohesion+ > build_log.txt

build_log.txt

Here is the list of all installed apt pacakges and versions on my machine generated with the following command:

apt list --installed > installed_packages.txt

installed_packages.txt

Related

Similar to gazebosim/gz-common#573 (review), it could be expecting optional packages to exist and not warning or skipping.

@iche033
Copy link
Contributor

iche033 commented Jan 22, 2024

hmm interesting, we do mark gz-common's graphics components as REQUIRED in CMakeLists.txt. I wonder if it's because cmake found the system installed gz-common5-graphics component and assumed it's available but when trying to compile the files, it uses the gz-common5 build dir in local colcon workspace that does not have the graphics component built.

@Ryanf55
Copy link
Author

Ryanf55 commented Jan 22, 2024

hmm interesting, we do mark gz-common's graphics components as REQUIRED in CMakeLists.txt. I wonder if it's because cmake found the system installed gz-common5-graphics component and assumed it's available but when trying to compile the files, it uses the gz-common5 build dir in local colcon workspace that does not have the graphics component built.

I'll take a look at the system gz-common5-graphs and check if it's properly expressing its component dependencies:

https://cmake.org/cmake/help/latest/module/CMakePackageConfigHelpers.html

check_required_components(<PackageName>) should be called at the end of the FooConfig.cmake file. This macro checks whether all requested, non-optional components have been found, and if this is not the case, sets the Foo_FOUND variable to FALSE, so that the package is considered to be not found. It does that by testing the Foo_<Component>_FOUND variables for all requested required components. 

@azeey azeey moved this from Inbox to In progress in Core development Jan 30, 2024
@azeey
Copy link
Contributor

azeey commented Apr 4, 2024

Is this fixed by gazebosim/gz-common#573?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In progress
Development

No branches or pull requests

3 participants