Skip to content
Ismael Barros² edited this page Mar 29, 2020 · 3 revisions

One of the most important steps on packaging any application or game is embedding all its dependencies inside the package. The thing about that is you first need to find them :)

  • There are two types of dependencies:
    • Static dependencies: loaded at startup, can be detected with ldd or objdump -x
    • Dynamic dependencies: loaded at runtime, cannot be detected with ldd nor objdump. The only way I've found to detect them is to run the application or game with strace, and make some normal use of the application. We have a script that automates it for AppImages: findMissingLibraries
  • Not only the main binary has dependencies, each dependency also has dependencies, and that can continue on and on, so you must find dependencies recursively. We also have a script that automates that: copyMissingLibraries
  • Not all dependencies must be included in the AppImage:
    • libGL.so.1 must never be included, because it depends on each machine's graphic drivers
    • Other dependencies must only be copied if you're also copying you own linker (/usr/lib/ld-linux.so.2) and running the game explicitly with it (./ld-linux.so.2 game.bin). We don't have a list of them, but it's stuff like libdl.so.2, libm.so.6, libc.so.6, etc