-
Notifications
You must be signed in to change notification settings - Fork 71
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
exclude libOpenGL.so.0* #152
Comments
Many OpenGL libraries are excluded already. See https://github.com/AppImage/pkg2appimage/blob/master/excludelist#L38. Can you please check how libOpenGL is pulled in? You can use |
I noticed that a few OpenGL libraries are already there and thought it may be related to this issue as well #89 .
|
See linuxdeploy/linuxdeploy#152 for more information.
An investigation conducted on IRC shows that it's Qt itself linking to libOpenGL. This Qt was installed via |
Excluding the library worked. Closing as resolved. |
So it seems that distros running newer Ubuntu versions (and likely Ubuntu itself), like Pop! OS no longer bundle libOpenGL.so.0 as part of their default installation. We ran into issues with RPCS3's AppImage running on these distros. We fixed it by bundling libOpenGL.so.0 manually, so it may be time to revisit this issue? |
The points is that libOpenGL.so.0 is rather a "system specific" library (different versions required with different OS versions/distributions) and is therefore not really portable. I would strongly discourage to bundle libObenGL.so.0 with the AppImage. In my case I was building for Ubuntu 16.04 (while it was still bundling the library) and I could not execute the AppImage on an Ubuntu 20.04. What you are probably missing is the package |
What? |
Which of your libraries pulls in Hint: I suspect this to be a general dependency problem in your build chain. |
RPCS3 is a 3D application, so we use OpenGL directly, it's linked at the top level. Output of lddtree on Ubuntu 18.04
|
Hmmm, looking into it further, we didn't used to link directly libOpenGL when we built on 16.04 🤔. Not sure what has changed on 18.04 |
Well, that's the question I was trying to find an answer for. Your build system (or its dependency lookup stuff) clearly pulls it in as a direct dependency. I am not sure what makes it link to some |
Browsing through the build system I found in your 3rd party CmakeLists that you try to find opengl and you want to prefer glvnd (if available, atleast what the cmake docs say) and else use lib opengl. so maybe just libglvnd is missing after 18.04? |
I checked all the libraries in my workstation's |
According to some issues on the CMake issue tracker, some forums etc., it seems like you really should try to make your build system link to GLVND again. I suppose otherwise you'd want to link against I can't imagine your problem would be solved properly if you bundled |
We should be linking against libglvnd, and we have libglvnd0 installed on the CI build configuration. # Prefer GLVND for OpenGL rather than legacy
set(OpenGL_GL_PREFERENCE GLVND)
find_package(OpenGL REQUIRED)
add_library(3rdparty_opengl INTERFACE)
target_include_directories(3rdparty_opengl INTERFACE GL)
if (WIN32)
// Irrelevant
else()
target_link_libraries(3rdparty_opengl INTERFACE ${OPENGL_LIBRARIES})
target_compile_definitions(3rdparty_opengl
INTERFACE
-DGL_GLEXT_PROTOTYPES
-DGLX_GLXEXT_PROTOTYPES)
endif() |
But apparently you link |
We're using CMake 3.16.9, do you think you could direct me towards some of the issues you mentioned so I can investigate what version they were fixed in? |
Looks like libglvnd-dev was the package that we need, testing now |
Mostly https://gitlab.kitware.com/cmake/cmake/-/issues/17437. Since CMake 3.10, I think it's best practice to just use the imported targets anyway. Linking to the entity of |
Hmmm, so it seems like the GLVND approach might be linking against libOpenGL.so.0, doing more testing... |
# value of OPENGL_LIBRARIES in RPCS3 CMake script
/usr/lib/x86_64-linux-gnu/libOpenGL.so;/usr/lib/x86_64-linux-gnu/libGLX.so;/usr/lib/x86_64-linux-gnu/libGLU.so So indeed, it's the CMake OpenGL discovery that leads to linking this library directly. Note this is on a random Ubuntu 20.04 with CMake 3.20.1. Looking at https://cmake.org/cmake/help/latest/module/FindOpenGL.html reveals that it's most likely caused by using GLVND, there's multiple hints on there. Edit: We won't be able to bundle |
legacy seems to have worked 🤔. If we use the imported targets do you think it'll work with GLVND? |
I think if you want to go for this legacy option, you need to use I think we have to take a deeper look overall into this GLVND stuff. This is actually the wrong place to discuss decisions regarding the excludelist, it would be more appropriate in https://github.com/AppImage/pkg2appimage. Reading the docs, I am relatively sure I think the recommendation for making AppImages has to be "use legacy". It should work with both GLVND and the old system. |
For the record, I also could build RPCS3 just fine with the legacy option. I guess you can safely go for it. But I'd highly appreciate if you created an issue over at pkg2appimage to discuss the issue more thoroughly. |
I have a Qt5 project where libOpenGL.so.0.0.0 gets deployed into the appimage by linuxdeploy. When starting the appimage afterwards I get this warning from Qt:
Unrecognized OpenGL version
If I preload my machines libOpenGL.so.0.0.0 it works fine. Would it be possible to exclude this shared library ?
The text was updated successfully, but these errors were encountered: