Skip to content

Bundle required shared libraries with Linux client#138

Open
eddoww wants to merge 2 commits into
AstoniaCommunity:mainfrom
eddoww:feature/bundle-linux-shared-libs
Open

Bundle required shared libraries with Linux client#138
eddoww wants to merge 2 commits into
AstoniaCommunity:mainfrom
eddoww:feature/bundle-linux-shared-libs

Conversation

@eddoww

@eddoww eddoww commented Apr 2, 2026

Copy link
Copy Markdown
Member

Fresh Linux installs (e.g. SteamDeck) fail to launch because libzip and libpng aren't installed. We already ship libSDL3, libSDL3_mixer, and libmimalloc next to the binary with $ORIGIN rpath, but libz, libpng, libzip (and their transitive deps libbz2, liblzma, libzstd) were missing.

Rather than extending the manual library list every time we add a dependency, this adds build/tools/package_linux.sh — same approach as the existing package_windows.sh. It runs ldd recursively on moac and libastonia_net.so, filters out system libs (glibc, X11/Wayland, GPU drivers, audio backends, OpenSSL), and copies everything else into the distribution. Makefile.linux distrib-stage now calls this script instead of doing a blind cp of bin/.

Dockerfile.linux also gets libz/libpng/libzip added to its library copy loop for Docker builds, and release.yml is simplified to pull binaries from the distrib-stage output instead of maintaining a separate manual list.

Tested locally — correctly bundles libz.so.1, libpng16.so.16, libzip.so.5, libbz2.so.1.0, liblzma.so.5, libzstd.so.1.

Create package_linux.sh that uses ldd to recursively discover and bundle all non-system shared library dependencies (libz, libpng, libzip and their transitive deps). Mirrors the existing package_windows.sh approach. Update Makefile.linux distrib-stage to use it.
@eddoww eddoww force-pushed the feature/bundle-linux-shared-libs branch 4 times, most recently from e50f19f to a02e0ca Compare April 2, 2026 21:47
Add libz, libpng, libzip to Dockerfile.linux Docker build library copy loop. Simplify release.yml to use distrib-stage output (which now auto-bundles all deps via package_linux.sh) instead of manually listing libraries.
@eddoww eddoww force-pushed the feature/bundle-linux-shared-libs branch from a02e0ca to eae1c93 Compare April 2, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant