Bundle required shared libraries with Linux client#138
Open
eddoww wants to merge 2 commits into
Open
Conversation
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.
e50f19f to
a02e0ca
Compare
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.
a02e0ca to
eae1c93
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.