FS#72249 - [ogre] RenderingAPIException and outdated build options

Attached to Project: Community Packages
Opened by Ningit (ningit) - Monday, 27 September 2021, 09:20 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Thursday, 07 October 2021, 14:06 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Running any program linked with Ogre (even the sample browser included in the ogre package) shows the following fatal error in a fresh installation without any change in the configuration:

terminate called after throwing an instance of 'Ogre::RenderingAPIException'
what(): RenderingAPIException: Fail to make context current in setCurrent at /build/ogre/src/ogre-13.0.1/RenderSystems/GLSupport/src/EGL/OgreEGLContext.cpp (line 137)

This is a problem of the Arch package and it can be solved by changing some build arguments in the PKGBUILD. I guess it is OGRE_BUILD_DEPENDENCIES=OFF that solves the issue, but I have removed some more arguments in the attached working PKGBUILD. Some variables passed to Cmake are no longer valid (OGRE_BUILD_COMPONENT_PLANAR_REFLECTIONS, OGRE_BUILD_COMPONENT_SCENE_FORMAT, OGRE_CONFIG_ENABLE_JSON, OGRE_INSTALL_SAMPLES_SOURCE, OGRE_USE_BOOST). Cmake shows a warning about this. The option OGRE_CONFIG_THREADS was set to a deprecated value. The options OGRE_CONFIG_THREAD_PROVIDE and OGRE_BUILD_COMPONENT_RTSHADERSYSTEM were passed their default values.

Moreover, rapidjson and zziplib are no longer dependencies of Ogre, and tinyxml has been replaced by pugixml.

Steps to reproduce:

1. Install Ogre with pacman -S ogre.
2. Run the just installed /opt/ogre/samples/SampleBrowser.
3. The error message above will be printed in the terminal.
   PKGBUILD (1.3 KiB)
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Thursday, 07 October 2021, 14:06 GMT
Reason for closing:  Fixed
Comment by Ningit (ningit) - Monday, 27 September 2021, 09:25 GMT
I am sorry, but I have removed by accident the [ogre] prefix in the title. There seems to be no option to change it now.
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 30 September 2021, 15:45 GMT
Sadly, I can't actually compile ogre currently due to error probably caused by new mesa headers or a more modern gcc. Did you patch that?
Comment by Ningit (ningit) - Thursday, 30 September 2021, 16:55 GMT
No, it worked without any patch. Mesa has changed since I compiled it (from 21.2.1-1 to 21.2.3-1), like freetype2 and sdl2, but not GCC.

Now, when building either the modified PKGBUILD in the bug report or the original one, the compiler fails with errors about invalid conversions from NativeDisplayType to Display*. The same happens if I install the old versions of the (direct) dependencies that I had when the build worked.
Comment by Sven-Hendrik Haase (Svenstaro) - Thursday, 30 September 2021, 17:31 GMT
Yeah :/ Mind reporting an upstream bug for that one? After that's fixed, I'm happy to apply your changes.
Comment by Ningit (ningit) - Wednesday, 06 October 2021, 20:24 GMT
Ok, the compilation bug is now fixed upstream with https://github.com/OGRECave/ogre/commit/3ee81495c6f07bfda2072fddc44c475aa6217ffe. The change that broke compilation was in libglvnd 1.3.3 to 1.3.4 (see https://github.com/OGRECave/ogre/issues/2220) and it can be solved by defining the macro USE_X11.

Loading...