Bug 1218578

Summary: Unable to install OpenMW due to missing dependencies
Product: [openSUSE] openSUSE Tumbleweed Reporter: Kai Schleif <the-ill-sheep>
Component: OtherAssignee: Ferdinand Thiessen <rpm>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: dimstar, hol.jimis, jengelh, pujos.michael
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Kai Schleif 2024-01-05 22:02:18 UTC
When trying to install OpenMW on Tumbleweed the following error appears:

Problem: nothing provides 'libboost_program_options.so.1.83.0()(64bit)' needed by the to be installed openmw-0.48.0-1.4.x86_64
 Solution 1: do not install openmw-0.48.0-1.4.x86_64
 Solution 2: break openmw-0.48.0-1.4.x86_64 by ignoring some of its dependencies

Choose from above solutions by number or cancel [1/2/c/d/?] (c):
Comment 1 Michael Pujos 2024-01-05 22:15:34 UTC
Looks like its libboost_program_optiosn dependency needs to be updated to v1.84.0 which exists on TW: 

i | libboost_program_options1_84_0-x86-64-v3           | Boost.ProgramOptions runtime library                         | package
Comment 2 Michael Pujos 2024-01-05 22:19:39 UTC
This package needs some love as it does not even compile on current TW due to unresolvable deps.
Comment 3 Dominique Leuenberger 2024-01-05 22:41:19 UTC
The problem of actually 'ogre' falling to build:

https://build.opensuse.org/package/live_build_log/openSUSE:Factory/ogre/standard/x86_64
Comment 4 Michael Pujos 2024-01-05 23:10:50 UTC
Had a quick look at the broken Ogre build and it does not look trivial at all why it is broken...
Comment 5 Dominique Leuenberger 2024-01-05 23:39:01 UTC
My best guess is the update of glslang to version 14 caused this
https://build.opensuse.org/package/rdiff/openSUSE:Factory/glslang?linkrev=base&rev=49

Maybe Jan has an idea?
Comment 6 Jimis Hol 2024-01-19 09:04:45 UTC
I use Packman Essentials Repository and i get

openmw: /lib64/libavcodec.so.60: version `LIBAVCODEC_60.3_SUSE' not found (required by openmw)
openmw: /lib64/libswscale.so.7: version `LIBSWSCALE_7.1_SUSE' not found (required by openmw)
openmw: /lib64/libswresample.so.4: version `LIBSWRESAMPLE_4.10_SUSE' not found (required by openmw)
openmw: /lib64/libavformat.so.60: version `LIBAVFORMAT_60.3_SUSE' not found (required by openmw)
openmw: /lib64/libavutil.so.58: version `LIBAVUTIL_58.2_SUSE' not found (required by openmw)

If i try to install libavcodec.60 from openSUSE I end from downgrading some packages to that of an all together missing package.
Maybe developers of openmw should take a note about these requirement issues.
Comment 7 Dominique Leuenberger 2024-01-19 11:36:44 UTC
(In reply to Dominique Leuenberger from comment #3)
> The problem of actually 'ogre' falling to build:
> 
> https://build.opensuse.org/package/live_build_log/openSUSE:Factory/ogre/
> standard/x86_64

As long as this is not addressed, nothing can change.

openmw needs to be able to rebuild to get proper dependencies added.
Once the rebuild happens, deps will be automatically added for the newer ffmpeg versions/builds
Comment 8 Dominique Leuenberger 2024-01-19 11:39:55 UTC
(In reply to Michael Pujos from comment #4)
> Had a quick look at the broken Ogre build and it does not look trivial at
> all why it is broken...

There is ogre 14 out - which supposedly works together with glslang 14
Comment 9 Michael Pujos 2024-01-19 19:26:38 UTC
Had a go at updating the Ogre package to v14.1.2 but it chokes on glslang 14 (trace below)

The problem is that in v14, 'class TType' has become just an opaque forward declaration (while in v13 its definition was present in installed headers).
Likely due to this v14 change:

"Only the headers that are part of glslang's public interface are included in the install target."

It's possible that repackaging the glslang devel package to include the missing include would work.

Other than that, it would point to Ogre v14.1.2 not compatible with glslang v14, since it tries to access member of class that is now opaque.

/////////////////

[  584s] + /usr/bin/c++ -DPlugin_GLSLangProgramManager_EXPORTS -I/home/abuild/rpmbuild/BUILD/ogre-14.1.2/PlugIns/GLSLang/include -I/home/abuild/rpmbuild/BUILD/ogre-14.1.2/OgreMain/include -I/home/abuild/rpmbuild/BUILD/ogre-14.1.2/build/include -Wall -Winit-self -Wcast-qual -Wwrite-strings -Wextra -Wundef -Wmissing-declarations -Wno-unused-parameter -Wshadow -Wno-missing-field-initializers -Wno-long-long -Wsuggest-override -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -msse -O3 -DNDEBUG -std=c++17 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT PlugIns/GLSLang/CMakeFiles/Plugin_GLSLangProgramManager.dir/src/OgreGLSLang.cpp.o -MF CMakeFiles/Plugin_GLSLangProgramManager.dir/src/OgreGLSLang.cpp.o.d -o CMakeFiles/Plugin_GLSLangProgramManager.dir/src/OgreGLSLang.cpp.o -c /home/abuild/rpmbuild/BUILD/ogre-14.1.2/PlugIns/GLSLang/src/OgreGLSLang.cpp
[  586s] /home/abuild/rpmbuild/BUILD/ogre-14.1.2/PlugIns/GLSLang/src/OgreGLSLang.cpp: In member function 'virtual void Ogre::GLSLangProgram::prepareImpl()':
[  586s] /home/abuild/rpmbuild/BUILD/ogre-14.1.2/PlugIns/GLSLang/src/OgreGLSLang.cpp:379:17: error: invalid use of incomplete type 'const class glslang::TType'
[  586s]   379 |         if(utype->isOpaque())
[  586s]       |                 ^~
[  586s] In file included from /home/abuild/rpmbuild/BUILD/ogre-14.1.2/PlugIns/GLSLang/src/OgreGLSLang.cpp:11:
[  586s] /usr/include/glslang/Public/ShaderLang.h:146:7: note: forward declaration of 'class glslang::TType'
[  586s]   146 | class TType;
[  586s]       |       ^~~~~
Comment 10 Michael Pujos 2024-01-19 19:47:27 UTC
Reported here:

https://github.com/OGRECave/ogre/issues/3011
Comment 11 Dominique Leuenberger 2024-01-30 08:35:08 UTC
FTR: openmw has been initiated for removal due to not being usable for > 4 weeks

https://build.opensuse.org/request/show/1142686
Comment 12 Michael Pujos 2024-01-30 10:38:50 UTC
OpenMW does not build because glslang v14 removed some (installed) includes needed for Ogre to compile. It is been looked at by glslang dev to eventually re-add the missing includes: 

https://github.com/KhronosGroup/glslang/issues/3491


If that's fixed in glslang by an upstream patch, this patch can then be applied to glslang on OBS, making Ogre compile and finally OpenMW compile.

So I'd say to wait a bit for glslang to eventually fix it. If they don't, glslang OBS .spec file could be modified to install the missing includes.
Comment 13 Michael Pujos 2024-01-30 10:42:53 UTC
So do not remove OpenMW just yet, as this is fixable.

In fact, the proper temporary fix would be to revert to glslang v13, until v14 works.
Comment 14 Jan Engelhardt 2024-01-30 10:55:39 UTC
you can install glslang-nonstd-devel to get back the full Types.h that was present in glslang 13. That file has struct TType { ... }.
Comment 15 Michael Pujos 2024-01-30 11:43:12 UTC
Thanks, I got Ogre to compile successfully and will submit a request soon with the fix.
Comment 16 Michael Pujos 2024-01-30 11:53:55 UTC
https://build.opensuse.org/request/show/1142758
Comment 17 Dominique Leuenberger 2024-02-01 07:26:55 UTC
(In reply to Michael Pujos from comment #16)
> https://build.opensuse.org/request/show/1142758

Ogre has has been fixed - openmw still fails to build though, so remains uninstallable:

https://build.opensuse.org/package/live_build_log/openSUSE:Factory/openmw/standard/x86_64

[   51s] In file included from /home/abuild/rpmbuild/BUILD/openmw-0.48.0/components/resource/stats.cpp:17:
[   51s] /home/abuild/rpmbuild/BUILD/openmw-0.48.0/components/myguiplatform/myguidatamanager.hpp:47:24: error: conflicting return type specified for ‘virtual const std::string& osgMyGUI::DataManager::getDataPath(const std::string&) const’
[   51s]    47 |     const std::string& getDataPath(const std::string& _name) const override;
[   51s]       |                        ^~~~~~~~~~~
[   51s] In file included from /home/abuild/rpmbuild/BUILD/openmw-0.48.0/components/myguiplatform/myguidatamanager.hpp:4:
[   51s] /usr/include/MYGUI/MyGUI_DataManager.h:51:37: note: overridden function is ‘virtual std::string MyGUI::DataManager::getDataPath(const std::string&) const’
[   51s]    51 |                 virtual std::string getDataPath(const std::string& _name) const = 0;
[   51s]       |                                     ^~~~~~~~~~~
[   51s] make[2]: *** [components/CMakeFiles/components.dir/build.make:429: components/CMakeFiles/components.dir/resource/stats.cpp.o] Error 1
Comment 18 Dominique Leuenberger 2024-02-01 07:29:10 UTC
=> sounds like https://gitlab.com/OpenMW/openmw/-/commit/43a931d3c43ab147d32bd4b453c656915edd10fe is missing
Comment 19 Michael Pujos 2024-02-01 09:53:59 UTC
Looking into it to fix openmw compilation
Comment 20 Michael Pujos 2024-02-01 11:48:36 UTC
Unfortunately the patch above does not apply cleanly and there is more to it:
https://gitlab.com/OpenMW/openmw/-/merge_requests/3319/commits

So not really practical to backport it to openmw 0.48.0.

There is a -DOPENMW_USE_SYSTEM_MYGUI="OFF" cmake option to have the build system download, compile its own (proper) version of MyGUI and have the binary link to it statically but it does not work, at least on my local compile, as the build sandbox does not seem to have network access:

[   90s] -- Downloading...
[   90s]    dst='/home/abuild/rpmbuild/BUILD/openmw-0.48.0/build/_deps/mygui-subbuild/mygui-populate-prefix/src/59c1388b942721887d18743ada15f1906ff11a1f.zip'
[   90s]    timeout='none'
[   90s]    inactivity timeout='none'
[   90s] -- Using src='https://github.com/MyGUI/mygui/archive/59c1388b942721887d18743ada15f1906ff11a1f.zip'
[   90s] -- Retrying...
[   90s] -- Using src='https://github.com/MyGUI/mygui/archive/59c1388b942721887d18743ada15f1906ff11a1f.zip'
[   90s] -- Retry after 5 seconds (attempt #2) ...
[   90s] -- Using src='https://github.com/MyGUI/mygui/archive/59c1388b942721887d18743ada15f1906ff11a1f.zip'
[   90s] -- Retry after 5 seconds (attempt #3) ...
[   90s] -- Using src='https://github.com/MyGUI/mygui/archive/59c1388b942721887d18743ada15f1906ff11a1f.zip'
[   90s] -- Retry after 15 seconds (attempt #4) ...
[   90s] -- Using src='https://github.com/MyGUI/mygui/archive/59c1388b942721887d18743ada15f1906ff11a1f.zip'
[   90s] -- Retry after 60 seconds (attempt #5) ...
[   90s] -- Using src='https://github.com/MyGUI/mygui/archive/59c1388b942721887d18743ada15f1906ff11a1f.zip'
[   90s] CMake Error at /home/abuild/rpmbuild/BUILD/openmw-0.48.0/build/_deps/mygui-subbuild/mygui-populate-prefix/src/mygui-populate-stamp/download-mygui-populate.cmake:170 (message):
[   90s]   Each download failed!
[   90s] 
[   90s]     error: downloading 'https://github.com/MyGUI/mygui/archive/59c1388b942721887d18743ada15f1906ff11a1f.zip' failed
[   90s]           status_code: 6
[   90s]           status_string: "Couldn't resolve host name"
[   90s]           log:
[   90s]           --- LOG BEGIN ---
[   90s]           timeout on name lookup is not supported
[   90s] 
[   90s]   getaddrinfo(3) failed for github.com:443
[   90s] 
[   90s]   Could not resolve host: github.com

/////

Possible solutions:

- find a way to have -DOPENMW_USE_SYSTEM_MYGUI="OFF" work. Assuming it will not fails elsewhere after that
- update openmw to a git snapshot
- wait for 0.49 to be released (could take a while, official releases are not frequent)
- remove the package
Comment 21 Michael Pujos 2024-02-01 15:03:04 UTC
openmw git compiles and runs fine (with the editor disabled as it fails to compile). 
I can submit a request if that's OK.
Comment 22 Jimis Hol 2024-02-02 07:30:56 UTC
I asked for help from IRC: #openmw on irc.libera.chat
It was suggested that nobody looked for OGRE nearly a decade. Unless it is used in background and unfortunately it was forgotten by anyone, it was suggested to use mygui 3.4.2 instead and get rid of OGRE.
Can you try it?
Comment 23 Michael Pujos 2024-02-02 11:43:09 UTC
It's MyGUI that depends on Ogre.
However the problem is not Ogre but the fact that stable openmw 0.49 does not compile against MyGUI 3.4.2. openmw git is needed for that.
I will probably submit a request to update the openmw package to current git version, a temporary measure until 0.49 is released.
Comment 24 Michael Pujos 2024-02-02 11:44:06 UTC
EDIT type: meant "stable openmw 0.48" above
Comment 25 Michael Pujos 2024-02-02 15:30:22 UTC
https://build.opensuse.org/request/show/1143669


This request update openmw package to latest git version.
It cannot compile on openSUSE 15.4 and 15.5 because their 
boost version is too old vs openmw requiring C++20.
Comment 26 Michael Pujos 2024-02-04 17:45:38 UTC
I do not known if my request for the official openmw package will be accepted, but for fans of Morrowind I created a standalone openmw-git package in my personal repo with the latest git version. I will recompile from time to time with the latest git updates.

You can install it with 'opi openmw-git' then select openmw-git in the list and the home:bobbie424242 repo.
Comment 27 Jimis Hol 2024-02-05 13:55:39 UTC
Thank you very much.
Indeed yours openmw-git is downloaded and running 
but, 0.49 might have problems itself.
Whatever mods I activate, I cannot continue my saves nor, I believe, to start new game. After initial animations, there is a blank pink screen where i expected the main menu. If i hit "enter" in that I can choose a saved game but center of map, some window are pink blank and Esc menu is empty or transparent empty with pink empty options, for save for example. But all this does not concern your compilation and I thank you for that.
Comment 28 Michael Pujos 2024-02-05 14:00:57 UTC
Yes the 0.49 git version might have its own issue since it is work in progress.
Although if runs fine on the integrated Intel GPU of my laptop, with no mods.
What is your GPU ? Does it display fine on a clean install (no mods) ?
Comment 29 Jimis Hol 2024-02-05 18:09:05 UTC
I just run the installation wizard from import tab and default options there were enough to fix the problems.
All seem perfect now, on my laptop, even if game's data exist on some local network driver and not on my laptop itself.
SO, thank you, without any other concerns.
Comment 30 Michael Pujos 2024-02-05 22:44:30 UTC
Glad it is working for you. 
I may update it every 2 weeks or so to current git.
If you kept my user's repo when you installed it with opi, you will have the updates.
Comment 31 Ferdinand Thiessen 2024-02-12 14:56:26 UTC
https://build.opensuse.org/request/show/1143669