Repository navigation
AppImage: bundle libbz2.so.1.0 - #652
Open
SmallTardigrade wants to merge 1 commit into
Open
SmallTardigrade wants to merge 1 commit into
SmallTardigrade wants to merge 1 commit into
Conversation
The binary is built on Ubuntu, where libbz2's soname is libbz2.so.1.0. Fedora-based systems ship it as libbz2.so.1 only, so the AppImage fails to start there with "libbz2.so.1.0: cannot open shared object file". Copy only the .1.0 names, so host libraries linked against libbz2.so.1 keep using the host's copy. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Description
The Linux AppImage doesn't start on Fedora-based systems:
Fixes #650 and #566, and the
libbz2part of #637.Cause
The binary is built on Ubuntu 24.04, where the library's soname is
libbz2.so.1.0. Fedora ships the same library aslibbz2.so.1, with nolibbz2.so.1.0, so the loader finds nothing.build_appimage.sh.incopies a list of libraries intousr/lib, andlibbz2isn't on it.Changes
One line in
src/platform/unix/build_appimage.sh.in, beside the similar ones:libbz2.so.1.0andlibbz2.so.1.0.4).libbz2.so.*style on purpose. Copyinglibbz2.so.1as well put Ubuntu's copy ahead of the host's for host libraries that link against it. With this pattern they keep using their own.#539 is also aimed at this error, by keeping a user's
LD_LIBRARY_PATH. It doesn't conflict with this change. Bundling means users don't have to make their own link.Screenshots/Recordings/Graphs
None. This changes packaging only, with no UI change.
Tests
Environment: the released V7.3.1.6378 AppImage, unpacked, on Fedora 44, plus an
ubuntu:24.04container (24.04.5,libbz2-1.01.0.8-5.1ubuntu0.1).libbz2.so.1.0.usr/libonLD_LIBRARY_PATH,lddreportslibbz2.so.1.0 => not found.ldd -rresolveslibbz2.so.1.0to the copy and reports nothing missing or undefined.libbz2.so.1still resolves to/lib64/libbz2.so.1.LD_DEBUG=libsshows the copy being initialised.Not tested:
🤖 Generated with Claude Code