gazebosim / gz-rendering

C++ library designed to provide an abstraction for different rendering engines. It offers unified APIs for creating 3D graphics applications.
https://gazebosim.org
Apache License 2.0
56 stars 51 forks source link

Ubuntu CI not finding Ogre 1.9 #400

Closed chapulina closed 2 years ago

chapulina commented 2 years ago

Our CI is not finding Ogre 1.9, it may be related to https://github.com/ignitionrobotics/ign-rendering/pull/376

Environment

Description

Steps to reproduce

Run CI on Jenkins or GitHub actions. Jenkins is yellow because of the warning, but Actions doesn't fail on warnings, so it shows up green.

Output

Ogre 1.9 is installed:

2021-09-09T00:23:39.9181608Z Selecting previously unselected package libogre-1.9.0v5:amd64.
2021-09-09T00:23:39.9217794Z Preparing to unpack .../270-libogre-1.9.0v5_1.9.0+dfsg1-10_amd64.deb ...
2021-09-09T00:23:39.9329386Z Unpacking libogre-1.9.0v5:amd64 (1.9.0+dfsg1-10) ...
2021-09-09T00:23:40.1933838Z Selecting previously unselected package libogre-1.9-dev.
2021-09-09T00:23:40.1977322Z Preparing to unpack .../271-libogre-1.9-dev_1.9.0+dfsg1-10_amd64.deb ...
2021-09-09T00:23:40.1989527Z Unpacking libogre-1.9-dev (1.9.0+dfsg1-10) ...

But not found:

2021-09-09T00:23:47.9754351Z    CONFIGURATION WARNINGS:
2021-09-09T00:23:47.9755220Z    -- Missing dependency [IgnOGRE] (Components: RTShaderSystem, Terrain, Overlay)
2021-09-09T00:23:47.9756184Z    -- Skipping component [optix]: Missing dependency [OptiX].
2021-09-09T00:23:47.9756851Z       ^~~~~ Set SKIP_optix=true in cmake to suppress this warning.

Example builds:

Blast545 commented 2 years ago

I'm not a Cmake expert, but I think I know what's happening.

https://github.com/ignitionrobotics/ign-cmake/blob/eac0b654a19dc67c580e8ceab494915efc6ab796/cmake/IgnUtils.cmake#L196-L209

This portion of code tries to find a IgnOgre, but when it fails to find it, it still tries to find the selected components here: https://github.com/ignitionrobotics/ign-rendering/blob/49e7a06024a4adb7f2ec68cac1ebd33318cb9b8b/CMakeLists.txt#L64

Then, the components are marked as IgnOgre dependency is not available, even when IgnOgre is found below. This is confirmed by the Jenkins output:

-- Looking for IgnOGRE - not found

-- Checking for module 'OGRE-RTShaderSystem >= 1.9'
--   Found OGRE-RTShaderSystem , version 1.9.0
-- Checking for module 'OGRE-Terrain >= 1.9'
--   Found OGRE-Terrain , version 1.9.0
-- Checking for module 'OGRE-Overlay >= 1.9'
--   Found OGRE-Overlay , version 1.9.0
-- Looking for IgnOGRE - found

...

CMake Warning at /usr/share/cmake/ignition-cmake2/cmake2/IgnConfigureBuild.cmake:53 (message):
   CONFIGURATION WARNINGS:
   -- Missing dependency [IgnOGRE] (Components: RTShaderSystem, Terrain, Overlay)
Call Stack (most recent call first):
  CMakeLists.txt:156 (ign_configure_build)

I think this should be fixed by changing the statement so the components require IgnOgre, otherwise do not import them. @j-rivero

chapulina commented 2 years ago

I believe this is fixed:

https://build.osrfoundation.org/job/ignition_rendering-ci-pr_any-ubuntu_auto-amd64/lastBuild/consoleFull#console-section-6