AppImage / appimagetool

A low-level tool to generate an AppImage from an existing AppDir
58 stars 11 forks source link

Ubuntu 20.04 aarch64 #51

Open monkeyx-net opened 1 month ago

monkeyx-net commented 1 month ago

I am trying to test and create some appimages on Ubuntu 20.04 aarch64.

# file appimagetool-aarch64.AppImage 
appimagetool-aarch64.AppImage: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped
# ./appimagetool-aarch64.AppImage 
bash: ./appimagetool-aarch64.AppImage: cannot execute binary file: Exec format error

I am running in a chroot environment is that part of the issue with this error?

hipersayanX commented 1 month ago

Same error also for armhf.

probonopd commented 1 month ago

Please describe your environment in more detail. Thanks.

hipersayanX commented 1 month ago

In my case, using uraimo/run-on-arch-action@v2 with Ubuntu 24.04.

monkeyx-net commented 1 month ago

Mine was KVM/Qemu Ubuntu 20.04 x86_64 running an aarch64 Ubuntu 20.04 chroot environment. From a Manjaro host

On Sun, 19 May 2024, 19:21 probonopd, @.***> wrote:

Please describe your environment in more detail. Thanks.

— Reply to this email directly, view it on GitHub https://github.com/AppImage/appimagetool/issues/51#issuecomment-2119320558, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABONRNVZURAMYXISLFSTW3DZDDUQZAVCNFSM6AAAAABH4OTFQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJZGMZDANJVHA . You are receiving this because you authored the thread.Message ID: @.***>

hipersayanX commented 1 month ago

FYI, the file result comparison between a native binary (working), and the appimagetool binary.

test                       : ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=51042bf9e5dbc62b268ae2874c841504a6d3109b, stripped
appimagetool-armhf.AppImage: ELF 32-bit LSB executable    , ARM, EABI5 version 1 (SYSV)     , dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=78587ddf6c7a3d0dda410a0dfa9f00afbdf30a23, stripped

Probably appimagetool being compiled as a SYSV executable is what makes the difference.

monkeyx-net commented 1 month ago

Here are some file results from the chroot aarch64

appimagetool-aarch64.AppImage: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, stripped

Henry-Stickmin-5-Fleeing-the-Complex-aarch64.AppImage: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=ecf4dd1f80c620b69e425775ac76171c6976b2c5, stripped

From my own tests I can create binary test packages with x86_64 but not aarch 64 as nothing seems to work in my chroot environment?

I am also getting the same issues testing on a docker Ubuntu 20.04 aarch64 image.

probonopd commented 1 month ago

Can this issue be reproduced without qemu/kvm and without chroot and without containers, e.g., by running the binary on a Raspberry Pi?

Also, on the systems where it is not working, does the old version from https://github.com/AppImage/AppImageKit/ work any better?

(It might have to do with the AppImage magic bytes that get inserted into the ELF header, but that is just pure speculation at the moment.)

monkeyx-net commented 1 month ago

I did try the older version and it has the same issue.

I tested running them on a native device (rg552 handheld)and it did work.

I will dust off my pi and test that too.

I was hoping there was something I could do to get it working on my VM, as it's easier to build and package via my chroot environment.

But using my pi rather than a VM could work too😀