-
-
Notifications
You must be signed in to change notification settings - Fork 554
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
ARM builds #699
ARM builds #699
Conversation
@probonopd I'm not sure why the built runtime can't be run -- see https://travis-ci.org/AppImage/AppImageKit/jobs/352012266#L3766. |
Found the issue. The "insertion" of the magic bytes breaks the runtime file, so that it no longer runs. I am not 100% sure why, but it's probably related to "unsupported ioctl" error messages I get during all the As a workaround, we could simply insert the bytes outside the Docker container, but it's not an ideal solution, and I would not recommend it. Ideas welcome. |
It's not I'll introduce a test into |
Just tried on Armbian, the I can embed the magic bytes on my Armbian test system without any problems, therefore the problems are probably caused by |
So, after some more testing, it seems like the insertion of the magic bytes only breaks the execution with The question is, should we use the workaround I suggested (that is, insert the magic bytes outside the Docker container, e.g., right before uploading the artifacts (although in that case, we'd have to insert them into the embedded object inside This is not a priority change, but we should decide what to do. |
Would be fine for me; please be sure to leave comments in the appropriate places as to why we are doing it this way. |
@probonopd I have no clue how we could safely alter the runtime embedded in appimagetool, though. |
Uh, that's a bummer... |
@probonopd we definitely need to re-think the magic bytes thing for the next AppImage specification. Apparently, the runtime is a valid ELF file until the magic bytes are inserted. |
Re. workaround: thinking about it, it doesn't make sense to implement the workaround I suggested, even if we had implemented a method. The problem is that we need to run the tests on Travis. We could use the AppImages built without the magic bytes, sure, but that'll increase the complexity (well, it'd probably be just a few lines of code that run after all the other steps), as we'd need to take care of the insertion as a final step. That breaks our current CI build workflow, that is, build project, run unit tests, build AppImages of tools, test these AppImages, then upload to GitHub. |
@probonopd remember the new CMake flag to disable the embedding of magic bytes into the runtime? Might come in handy here as well. We just need to add a comment to make sure people won't misunderstand the intention behind. |
Yes, in fact I had assumed that this ticket was the reason for that flag in the first place ;-) |
I recently merged #731, which hides the variable from CMake interfaces. It can still be set, but it won't show up in CMake GUI, etc. |
I just had another idea how we could work around the execution issues with |
And then? ARM builds would not contain a runtime and hence need a runtime to be installed on the system? Or would the runtime be inserted at a later time in the process? |
@probonopd like on macOS, you'd have to download the runtime and specify it via a CLI parameter. |
I never had to download a runtime to run an .app on the Mac? |
@probonopd you got this wrong. You remember @teras's changes that allowed building appimagetool on macOS? At that time, we introduced the possibility to use a user-provided runtime when building an AppImage. You don't have to download a runtime to run the AppImage on a Linux computer. You need it on macOS and pass it to appimagetool, though. We could implement the same workflow for ARM platforms. We don't embed the runtime in appimagetool, we require the user to download it separately. |
Ah, right. That's of course a valid way to do it. |
What is the current state of this pull request? Having ARM binaries would be very useful for our CI process. |
Agree, this would be great to have. @TheAssassin what do we need to do to make it happen? |
Thinking about this now, we could've simply copied the binaries we just built into a tempdir, remove the magic bytes, and perform our tests. That way, we could circumvent the qemu restrictions. We could do that for all platforms even. Will re-think about this. |
9d7eb49
to
281cffb
Compare
92eb356
to
ac7e725
Compare
0006838
to
c777bd4
Compare
Fixed the remaining issues. The ARM64 AppImage of appimagetool works like a charm. The ARM config build times are roughly equivalent to the "normal" ones, which is great IMO. I'd appreciate if anyone could try the armhf AppImage, then we can merge the PR. |
Congratulations @TheAssassin the armhf one seems to work like a charm:
But hey, what happened to the AppImage magic bytes?
Another, minor thing I noticed is that when building an AppImage, the architecture gets named "ARM" rather than "armel":
Is that intentional? |
The 64-bit one says:
Is
|
Should be I'll have a look at the magic bytes issue. Strange, though... I thought we had some test in the scripts that should ensure they're embedded properly... |
e4d34dc
to
0a0d7a4
Compare
Screw you once again, printf!
0a0d7a4
to
3de952d
Compare
Not bullet proof, as it doesn't check whether they're at the right position, but it should help recognize major issues with embedding before uploading binaries.
Another occurrence of I added a check to see whether magic bytes are embedded in d48de6d (not bullet proof, but it'll catch major issues like this one), which makes the build fail if the embedding fails, as it should've been before. See https://travis-ci.org/AppImage/AppImageKit/jobs/463758810#L3708 for instance. Trying to find out why this isn't working/what would be working on ARM. |
So, @probonopd please re-check. (That script might come in handy in other places, too, by the way...) |
The magic bytes are OK but the architecture should be
The magic bytes are OK but the architecture should be |
I fully agree, but I'd say that's a minor issue. We can merge the PR now and fix that eventually. I'll create an issue for that. |
See #886 |
Experimental ARM builds (
armhf
), using aqemu-debootstrap
environment based on https://github.com/multiarch/debian-debootstrap. All binaries in the image arearmhf
and are emulated on the fly throughqemu-user-static
.The AppImageBuild image has been added in AppImageCommunity/AppImageBuild@365a034.
Closes #111.