Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python3 is linked against lib64 while runtime/compat/lib64 is missing #358

Open
git-developer opened this issue Oct 2, 2024 · 3 comments

Comments

@git-developer
Copy link

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).

@dkmstr
Copy link

dkmstr commented Oct 10, 2024

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

@git-developer
Copy link
Author

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.

@dkmstr
Copy link

dkmstr commented Oct 10, 2024

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants