appimagetool icon indicating copy to clipboard operation
appimagetool copied to clipboard

Ubuntu 20.04 aarch64

Open monkeyx-net opened this issue 1 year ago • 8 comments

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?

monkeyx-net avatar May 17 '24 16:05 monkeyx-net

Same error also for armhf.

hipersayanX avatar May 19 '24 16:05 hipersayanX

Please describe your environment in more detail. Thanks.

probonopd avatar May 19 '24 18:05 probonopd

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

hipersayanX avatar May 19 '24 20:05 hipersayanX

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: @.***>

monkeyx-net avatar May 19 '24 20:05 monkeyx-net

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.

hipersayanX avatar May 21 '24 16:05 hipersayanX

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.

monkeyx-net avatar May 22 '24 13:05 monkeyx-net

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

probonopd avatar May 25 '24 08:05 probonopd

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😀

monkeyx-net avatar May 26 '24 05:05 monkeyx-net