appimage-builder icon indicating copy to clipboard operation
appimage-builder copied to clipboard

python3 is linked against `lib64` while `runtime/compat/lib64` is missing

Open git-developer opened this issue 1 year ago • 3 comments

In recent Debian-based distros (e.g. Debian Trixie, Ubuntu Noble), python3 is linked against lib64/ld-linux-x86-64.so.2. Running an AppImage for such an application packaged with appimage-builder fails, because runtime/compat/lib64 is missing.

Workaround: create a symlink from runtime/compat/usr/lib64 to runtime/compat/lib64 (example).

git-developer avatar Oct 02 '24 05:10 git-developer

Same problem with Debian based Aarch64 linux. If you generate the AppImage with, for example, trixie and tries to run it with Bookworm, the "file not found" is raised. Strace shows again runing python. The workaround of @git-developer works fine for amd64, but ofc for aarch64 don't :)

I tried same approach, but no result:

  after_runtime: |
    set -eu

    # python3 is linked against 'lib64/ld-linux-x86-64.so.2' but 'compat/lib64' is missing
    compat="${TARGET_APPDIR}/runtime/compat"
    if [ ! -e "${compat}/lib64" ] && [ -d "${compat}/usr/lib64" ]; then
      ln -s "usr/lib64" "${compat}/"
    fi
    # For aarch64, the path is 'lib/aarch64-linux-gnu"
    if [ ! -e "${compat}/lib/aarch64-linux-gnu" ] && [ -d "${compat}/usr/lib/aarch64-linux-gnu" ]; then
      ln -s "usr/lib" "${compat}/"
    fi

dkmstr avatar Oct 10 '24 16:10 dkmstr

You should be able to find a workaround for your arch, too. The required interpreter can be detected by

readelf -a "$(command -v python3)" | grep -i requesting

File not found errors may also be caused by a transitive dependency. The direct dependencies of python3 can be found by

ldd "$(command -v python3)"

strace can also help in uncovering missing dependencies.

git-developer avatar Oct 10 '24 17:10 git-developer

Thanks a lot for the advice!. I'll try them, strace gives almost no information (as execve python3 is reached, the file not found is raised).

dkmstr avatar Oct 10 '24 18:10 dkmstr