Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Static linking

TheAssassin edited this page Jul 11, 2023 · 1 revision

Why does the released AppImage contain static binaries only?

As a big exception to AppImage's conventions, which try to exclude libraries that are essential to the system (e.g., libc), critical to system security (e.g., OpenSSL), hardware specific (e.g., libGL) or commonly available anyway, linuxdeploy and its plugins are distributed as static binaries.

The main reason to do so is that users regularly use environment variables like $LD_LIBRARY_PATH to make libraries available for deployment. When built against shared libraries, linuxdeploy might accidentally use some incompatible libraries from such a path. This is effectively prevented when not using the system loader at all, i.e., linking the binary statically.

Another advantage is that we can build on newer systems using relatively recent compilers, which makes deployment a lot easier. This is just a side effect, but truly nice to have.

Clone this wiki locally