Bundling OpenGL programs as AppImages: which files to include?
I'm trying to bundle someone else's native Linux video game as an AppImage, which is a packaging format that aims to be distro-agnostic by bundling (almost) all required dependencies. Some dependencies are not bundled in an AppImage, such as OpenGL/Mesa/video libraries which are system-dependent, but for some reason their absence breaks the AppImage after some time... Here's what happens:
- I compile a game and it runs fine.
- I bundle the game and its dependencies into an AppImage using a script, excluding graphics-related libraries (see below).
- The AppImage runs fine for a few months, until a random system update breaks it and it refuses to launch with errors (see below).
- I re-compile the game using the exact same source code and bundle it into a new AppImage.
- The new AppImage works until another random system update breaks it. Rinse and repeat.
Including the graphics libraries inside the AppImage prevents it from breaking in the future, but restricts it to my system only thus defeating its purpose... I'm interested in learning which libraries should be bundled, and which should not be bundled, to achieve maximum AppImage future-proofing without sacrificing portability.
The excluded graphics libraries:
/lib/libGLX.so.0
/lib/libGL.so.1
/lib/libGLdispatch.so.0
/lib/libGLX_mesa.so.0
any *_dri.so
file
The errors displayed when launching a broken AppImage:
libGL error: MESA-LOADER: failed to open iris: /usr/lib64/dri/iris_dri.so: undefined symbol: amdgpu_query_video_caps_info (search paths /usr/lib64/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open iris: /usr/lib64/dri/iris_dri.so: undefined symbol: amdgpu_query_video_caps_info (search paths /usr/lib64/dri, suffix _dri)
libGL error: failed to load driver: iris
libGL error: MESA-LOADER: failed to open swrast: /usr/lib64/dri/swrast_dri.so: undefined symbol: amdgpu_query_video_caps_info (search paths /usr/lib64/dri, suffix _dri)
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext)
Value in failed request: 0x0
Serial number of failed request: 42
Current serial number in output stream: 43
apitrace dump of the AppImage: ld-linux-x86-64.so.2.trace
An example AppImage, now broken (graphics libraries not included): Zaz-x86_64.AppImage