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

aarch64 builds made from debian repository are not working. #278

Closed
JohnXLivingston opened this issue Dec 6, 2022 · 16 comments
Closed

aarch64 builds made from debian repository are not working. #278

JohnXLivingston opened this issue Dec 6, 2022 · 16 comments

Comments

@JohnXLivingston
Copy link

JohnXLivingston commented Dec 6, 2022

I have issues to make aarch64 AppImage based on Debian repository, build from an x86_64 machine.
I have errors like APPRUN_ERROR: No such file or directory, but the file missing file/directory is not shown.
And when I run strace, the execute ends with a execve on the exec script, and it fails although the file exists.

Note: the same build for x86_64 works fine.

So, I decided to test with an official example.
I copied this one: https://appimage-builder.readthedocs.io/en/latest/examples/bash.html
Well, it is working fine!

Then, I just replaced the ubuntu repository by the debian ones.
And I got the same error as in my project !

Here is the yml file:

version: 1

AppDir:
  path: ./AppDir

  app_info:
    id: org.gnu.bash
    name: bash
    icon: utilities-terminal
    version: 4.4.20
    exec: bin/bash
    exec_args: $@

  apt:
    arch: arm64
    sources:
      # - sourceline: 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports bionic main'
      #   key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3b4fe6acc0b21f32'
      - sourceline: 'deb [arch=arm64] https://deb.debian.org/debian/ bullseye main contrib'
        key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x648ACFD622F3D138'

    include:
      - bash
      - coreutils
    exclude:
      - libpcre3


AppImage:
  arch: aarch64

And the error when running on a ARM64:

$ ./bash-4.4.20-aarch64.AppImage 
APPRUN_ERROR: No such file or director

appimage-builder version: 1.1.0

PS: Thanks for your work, appimage-builder helped me a lot in my project!

@JohnXLivingston
Copy link
Author

For the record, it seems that I have the same error using «ubuntu focal» repository (sourceline: 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse')

I'm not quite sure, as I am testing many things at the same time, and I may be mixing up multiple issues.

@carlonluca
Copy link
Contributor

carlonluca commented Dec 13, 2022

Maybe the same I already reported in #272?

@JohnXLivingston
Copy link
Author

Maybe the same I already reported in #272?

I think you are right.

@goldstar611
Copy link
Contributor

FWIW, I can execute the resulting binary from appimage-builder using the recipe above on my oracle arm64 instance with no issue.

ubuntu@host:~$ ./bash-4.4.20-aarch64.AppImage 
ubuntu@host:/home/ubuntu# 
exit

ubuntu@host:~$ uname -a
Linux host ver  #11 SMP Sat Sep 3 13:45:09 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

@JohnXLivingston
Copy link
Author

JohnXLivingston commented Dec 14, 2022

@goldstar611 , I'm building on a Debian x86_64, and running in a Debian 11 aarch64 VM (using libvirt).
Here is the appimage I get: https://cloud.john-livingston.fr/s/obN2wtsw9x7CRBm

Edit: The given link is not the good one, it is. https://cloud.john-livingston.fr/s/jKc7besKdzWm6pf . See below. The first link works, but was made by mixing up multiple recipe. Don't know why it works.

Can you try it on your arm64 CPU?

@goldstar611
Copy link
Contributor

@JohnXLivingston, the appimage linked above runs without error on a debian 11 VM (host is a Macbook M1). Just to be sure, I ran env and there were several indicators such as the AppImage and AppDir environment variables.

@JohnXLivingston
Copy link
Author

JohnXLivingston commented Dec 14, 2022

@JohnXLivingston, the appimage linked above runs without error on a debian 11 VM (host is a Macbook M1). Just to be sure, I ran env and there were several indicators such as the AppImage and AppDir environment variables.

What??
That's really weird. Inded, the appimage I made yesterday works.

I just recreated one, with the same .yml file. I just deleted the AppDir et appimage-build directories, to be sure there is no side effect of a previous build.
Then i got this one:
https://cloud.john-livingston.fr/s/jKc7besKdzWm6pf
Which does not work.
image

The filesize are not the same:

-rwxr--r-- 1 john john 12616064 Dec 14 15:53 bash-4.4.20-aarch64.2.AppImage
-rwxr--r-- 1 john john 16257408 Dec 14 15:49 bash-4.4.20-aarch64.AppImage

I don't know why these 2 builds are not the same, and why the bigger one works.

@JohnXLivingston
Copy link
Author

john@debian-arm:~/appimage$ file bash-4.4.20-aarch64.AppImage
bash-4.4.20-aarch64.AppImage: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=fc6df1a3b6286fbe8fcb6b6d714b0f081c3a7ea8, stripped
john@debian-arm:~/appimage$ file bash-4.4.20-aarch64.2.AppImage
bash-4.4.20-aarch64.2.AppImage: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, BuildID[sha1]=fc6df1a3b6286fbe8fcb6b6d714b0f081c3a7ea8, stripped

They have the same «BuildID» (don't know what it is), but not the same filesize!

@JohnXLivingston
Copy link
Author

Oh, sorry @goldstar611 , I mixed up me recipe files. The first link I gave is not the correct appImage.
It is the 2nd one that is made with the bash recipe. And that does not work.

(but for an unknown reason, the first one works... no idea why)

@goldstar611
Copy link
Contributor

goldstar611 commented Dec 14, 2022

I'm confused.

Will the recipe included in this issue produce an AppImage that displays the error or not?

@JohnXLivingston
Copy link
Author

Sorry for the mess up.

The recipe I gave in the first message produce this appimage: https://cloud.john-livingston.fr/s/jKc7besKdzWm6pf

This AppImage fails as explained in the first message (debian 11 VM, emulating ARM 64 CPU). «APPRUN_ERROR: No such file or director»

@carlonluca
Copy link
Contributor

Is #283 fixing this issue?

@goldstar611
Copy link
Contributor

The recipe I gave in the first message produce this appimage: https://cloud.john-livingston.fr/s/jKc7besKdzWm6pf
This AppImage fails as explained in the first message (debian 11 VM, emulating ARM 64 CPU). «APPRUN_ERROR: No such file or director»

Just had time to test this 2nd file on the Debian 11 VM (Macbook with M1 is the host). It also works without error. I can't test on my oracle cloud VM since it doesn't have snapshot ability like VMWare fusion does.

@JohnXLivingston
Copy link
Author

Is #283 fixing this issue?

Yes!

I use the v1.1.0 version, that has not the same file. But I modified appimagebuilder/modules/setup/apprun_2/apprun2.py by adding the same line as you do in appimagebuilder/modules/setup/file_matching_patterns.py.
And this works fine with my bash recipe.

Thanks!

@JohnXLivingston
Copy link
Author

Do you think it would be possible to release a v1.1.1 with this fix?

@JohnXLivingston
Copy link
Author

I'm closing this issue, as it seems to be fixed by #283

azubieta pushed a commit that referenced this issue Mar 29, 2023
Add armhf to the list like in #283
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

3 participants