Skip to content

[Bug] Crash due to dynamically linked libraries in Appimage #2604

Open

Description

@evd0kim

While using appimage-run on NixOs, the app crashes with

Uncompress Buzz_0.4.23_amd64.AppImage of type 02 @ offset 944632
[===========================================================================================================================================|] 3465/3465 100%
Buzz_0.4.23_amd64.AppImage is now installed in /home/i/.cache/appimage-run/679f0bfb1eb5287c15abc0da386d7b877a6f8302f020a80f239598e102564327
buzz-desktop: error while loading shared libraries: libzstd.so.1: cannot open shared object file: No such file or directory

Steps to reproduce the behavior:

  1. Run on NixOs or in Nix shell
  2. Launch appimage-run Buzz_0.4.23_amd64.AppImage
  3. App crashes

Expected behavior:

Running as other binaries.

Environment (please complete the following information):

  • OS: Linux NixOs
  • 26.05

Activity

  1. tw-360vier commented on Jul 24, 2026

    @tw-360vier

    I also tried the appimage on NixOS.
    I can get beyond these errors by adding some extra libs for appimage-run:

      programs.appimage.enable = true;
      programs.appimage.binfmt = true;
      programs.appimage.package = pkgs.appimage-run.override {
        extraPkgs = pkgs: [
          pkgs.zstd
          # libelf.so.1 (needed transitively via appimage-run's Mesa/LLVM GL stack).
          # NB: pkgs.libelf ships only a static libelf.a — the shared lib comes from
          # elfutils, whose `out` output buildFHSEnv pulls in automatically.
          pkgs.elfutils
        ];
      };

    but then webkit still crashes and i only see a transparent window.

    what works for me is re-packaging the debian package:

    # Buzz desktop (https://github.com/block/buzz) — a Tauri/WebKitGTK app.
    #
    {
      lib,
      pkgs,
      ...
    }:
    let
      inherit (pkgs.stdenv.hostPlatform) isLinux isAarch64;
    
      version = "0.4.24";
    
      # Prebuilt binaries + desktop entry + icons, straight out of the .deb.
      buzz-unwrapped = pkgs.stdenvNoCC.mkDerivation {
        pname = "buzz-unwrapped";
        inherit version;
        src = pkgs.fetchurl {
          url = "https://github.com/block/buzz/releases/download/v${version}/Buzz_${version}_amd64.deb";
          hash = "sha256-7p5Yz5JweZPyTy7tGHIezmAp4LhpxxdwrUpdbgX4INI=";
        };
        nativeBuildInputs = [ pkgs.dpkg ];
        unpackPhase = "dpkg-deb -x $src .";
        dontConfigure = true;
        dontBuild = true;
        # These are upstream prebuilt binaries run via the FHS env below — do not
        # strip or rewrite their interpreter/rpath.
        dontStrip = true;
        dontPatchELF = true;
        installPhase = ''
          runHook preInstall
          mkdir -p $out
          cp -r usr/. $out/
          runHook postInstall
        '';
      };
    
      # FHS env supplying the system libraries buzz-desktop needs (notably the
      # working nixpkgs WebKitGTK) plus GStreamer plugins for the voice pipeline.
      buzz = pkgs.buildFHSEnv {
        name = "buzz";
        runScript = "${buzz-unwrapped}/bin/buzz-desktop";
        profile = ''
          # nixpkgs installs GStreamer plugins here; point discovery at them so the
          # WebKit media pipeline (mic capture / TTS playback) can be built.
          export GST_PLUGIN_SYSTEM_PATH_1_0=/usr/lib/gstreamer-1.0
          # WebKitGTK's DMABUF renderer is flaky under nested/portal setups; disable
          # it for a reliable first paint. Safe to drop if hardware accel is wanted.
          export WEBKIT_DISABLE_DMABUF_RENDERER=1
        '';
        targetPkgs =
          pkgs:
          with pkgs;
          [
            # WebKit / Tauri core
            webkitgtk_4_1
            gtk3
            glib
            glib-networking
            libsoup_3
            # rendering / text stack
            cairo
            pango
            gdk-pixbuf
            harfbuzz
            librsvg
            atk
            at-spi2-atk
            at-spi2-core
            # settings / schemas
            gsettings-desktop-schemas
            dconf
            # crypto / net
            openssl
            zlib
            curl
            nss
            nspr
            # GStreamer + plugins (Buzz is a voice/transcription app)
            gst_all_1.gstreamer
            gst_all_1.gst-plugins-base
            gst_all_1.gst-plugins-good
            gst_all_1.gst-plugins-bad
            gst_all_1.gst-libav
            gst_all_1.gst-plugins-ugly
            # graphics
            libGL
            libglvnd
            mesa
            libdrm
            # X / Wayland
            xorg.libX11
            xorg.libXext
            xorg.libXrender
            xorg.libXi
            xorg.libXcursor
            xorg.libXdamage
            xorg.libXfixes
            xorg.libXcomposite
            xorg.libXrandr
            xorg.libXtst
            xorg.libxcb
            wayland
            libxkbcommon
            # fonts
            fontconfig
            freetype
            # audio backends
            alsa-lib
            libpulseaudio
            pipewire
            # misc runtime
            dbus
            libnotify
            expat
            libffi
            pcre2
          ];
        # Install the desktop entry + icons and point Exec at the FHS wrapper so
        # Buzz shows up in the app launcher.
        extraInstallCommands = ''
          mkdir -p $out/share
          cp -r ${buzz-unwrapped}/share/applications $out/share/ 2>/dev/null || true
          cp -r ${buzz-unwrapped}/share/icons $out/share/ 2>/dev/null || true
          for d in $out/share/applications/*.desktop; do
            [ -e "$d" ] || continue
            substituteInPlace "$d" \
              --replace-quiet "Exec=buzz-desktop" "Exec=buzz" \
              --replace-quiet "Exec=/usr/bin/buzz-desktop" "Exec=buzz"
          done
        '';
      };
    in
    {
      environment.systemPackages = [buzz];
    }
  2. evd0kim commented on Jul 24, 2026

    @evd0kim
    Author

    @tw-360vier thanks for sharing this.

    I've tried to build Appimage myself and ended up with only working option when using Docker image for build. This allowed me to launch app but i did see same transparent window. I will try to re-use your script, ty.

  3. chessing234 commented on Jul 24, 2026

    @chessing234
    Contributor

    Fixed in #2713 — AppImage keeps bundled libzstd.

  4. stevenroose commented on Jul 30, 2026

    @stevenroose

    Same issue with libelf:

    ➜ appimage-run ./Buzz_0.5.2_amd64.AppImage
    Uncompress Buzz_0.5.2_amd64.AppImage of type 02 @ offset 944632
    [===========================================================================================================|] 3406/3406 100%
    Buzz_0.5.2_amd64.AppImage is now installed in /home/steven/.cache/appimage-run/68c1048346720d7d3c398ccb701e9df1eebdcd1acd7ea0b25a5d42e956428b87
    buzz-desktop: error while loading shared libraries: libelf.so.1: cannot open shared object file: No such file or directory
    
  5. evd0kim commented on Jul 30, 2026

    @evd0kim
    Author

    There are bunch of libraries which are getting removed for packaging Appimage.
    For Nixos "installing" DEB works.

    I briefly looked into what agent did to fix this and i think it didn't.

  6. pepitoria commented on Aug 1, 2026

    @pepitoria

    I manage to make it work with this in my nix config (sorry for the formatting)

    programs.appimage.enable = true;
    programs.appimage.binfmt = true;
    programs.appimage.package = pkgs.appimage-run.override {
    extraPkgs = pkgs: with pkgs; [
    elfutils
    zstd
    gst_all_1.gstreamer
    gst_all_1.gst-plugins-base
    gst_all_1.gst-plugins-good
    gst_all_1.gst-plugins-bad
    gst_all_1.gst-plugins-ugly
    ];
    # Some AppImages (e.g. linuxdeploy-based ones bundling WebKitGTK) clear
    # GST_PLUGIN_SYSTEM_PATH_1_0 at startup to avoid loading a possibly
    # ABI-incompatible host GStreamer. GST_PLUGIN_PATH_1_0 is a separate,
    # untouched variable that GStreamer scans just the same.
    buildFHSEnv =
    args:
    pkgs.buildFHSEnv (
    args
    // {
    profile = (args.profile or "") + ''
    export GST_PLUGIN_PATH_1_0="/usr/lib/gstreamer-1.0:/usr/lib32/gstreamer-1.0''${GST_PLUGIN_PATH_1_0:+:$GST_PLUGIN_PATH_1_0}"
    '';
    }
    );
    };

  7. mwikala commented on Aug 1, 2026

    @mwikala

    One more Arch/Hyprland datapoint for the 0.5.3 AppImage: it opened an empty window while WebKitWebProcess repeatedly aborted. Running it from a terminal showed:

    GStreamer element autoaudiosink not found. Please install it
    

    Installing gst-plugins-good fixed the crash and the UI loaded. The next run reported a missing MPEG-4 AAC decoder; installing gst-libav fixed that too. I also cleared ~/.cache/gstreamer-1.0/registry.x86_64.bin before the successful launch.

    --safe-rendering did not change the original failure. This may be worth noting in the AppImage runtime requirements if those plugins are intentionally supplied by the host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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