Skip to content

[Bug] fix-appimage.sh doesn't remove bundled libsystemd.so.0 — AppImage crashes on distros with newer systemd (Arch, Fedora 41+, etc.) #2335

Description

@wschwab

Describe the bug

The Buzz Desktop AppImage fails to launch on Linux distros running systemd ≥ 251 (Arch, Fedora 41+, etc.) with a dynamic linker error:

buzz-desktop: /tmp/.mount_Buzz_0AnNMee/usr/lib/libsystemd.so.0: version `LIBSYSTEMD_251' not found (required by /usr/lib/libmount.so.1)

The AppImage bundles a libsystemd.so.0 from an older systemd (version tags LIBSYSTEMD_246LIBSYSTEMD_252, with 251 missing). Because AppRun puts the bundled usr/lib first in LD_LIBRARY_PATH, the system libmount.so.1 finds the bundled libsystemd instead of the system one and fails the version check.

To Reproduce

  1. Download Buzz_0.4.22_amd64.AppImage on a distro with systemd ≥ 251 (e.g. Arch, Fedora 41+)
  2. Make it executable: chmod +x Buzz_0.4.22_amd64.AppImage
  3. Run it: ./Buzz_0.4.22_amd64.AppImage
  4. See error:
buzz-desktop: /tmp/.mount_Buzz_0AnNMee/usr/lib/libsystemd.so.0: version `LIBSYSTEMD_251' not found (required by /usr/lib/libmount.so.1)

Expected behavior

Buzz Desktop should launch successfully, using the system libsystemd.so.0 instead of the bundled copy.

Supporting Material

Workaround — preloading the system libsystemd forces it to take priority over the bundled copy and the app launches correctly:

LD_PRELOAD=/usr/lib/libsystemd.so.0 ./Buzz_0.4.22_amd64.AppImage

Version tags on bundled vs system libsystemd:

# Bundled (inside the AppImage at usr/lib/libsystemd.so.0):
$ strings libsystemd.so.0 | grep LIBSYSTEMD | sort -V
LIBSYSTEMD_246
LIBSYSTEMD_247
LIBSYSTEMD_248
LIBSYSTEMD_249
LIBSYSTEMD_252          ← jumps from 249 to 252, missing 250 and 251

# System (/usr/lib/libsystemd.so.0):
$ strings /usr/lib/libsystemd.so.0 | grep LIBSYSTEMD | sort -V
LIBSYSTEMD_246
...
LIBSYSTEMD_259
LIBSYSTEMD_260
LIBSYSTEMD_261          ← all version tags present

The system libmount.so.1 requires LIBSYSTEMD_251, which the bundled libsystemd doesn't export:

$ ldd /usr/lib/libmount.so.1 | grep systemd
libsystemd.so.0 => /usr/lib/libsystemd.so.0

Environment

  • OS: Garuda Linux (Arch-based)
  • Version: Buzz Desktop 0.4.22 (AppImage, amd64); system systemd 261

Additional context

This is the same class of bundled-lib-shadowing-system-lib problem that desktop/scripts/fix-appimage.sh already addresses for libmount, libglib, libwayland, GStreamer, and others, but libsystemd.so.0 is missing from the removal list. The existing script already removes the bundled libmount.so (so the system libmount.so.1 is used), but the system libmount then needs the system libsystemd, which is shadowed by the bundled copy.

Fix: add libsystemd.so to the rm -f list in fix-appimage.sh:

   "$LIBDIR"/libmount.so \
   "$LIBDIR"/libblkid.so \
   "$LIBDIR"/libselinux.so \
+  "$LIBDIR"/libsystemd.so \
   "$LIBDIR"/libpcre2-8.so* \

The system libsystemd.so.0 has a stable SONAME across all systemd versions and is guaranteed present on any Linux distro running systemd (i.e. all AppImage target distros), so removing the bundled copy is safe — the same reasoning already applied to the other libs in the removal list.

Related: #2315 (same class of bundled-lib-shadowing issue), #1567 (original fix-appimage.sh PR that missed libsystemd), #1856 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions