-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
AppImage for ARM Linux #5159
Comments
There are Docker images available that can run ARM-based operating systems on an amd64 CPU. See e.g. https://www.balena.io/docs/reference/base-images/base-images/#building-arm-containers-on-x86-machines |
Nice! I've been looking at https://ownyourbits.com/2018/06/27/running-and-building-arm-docker-containers-in-x86/ |
I gave this a try on my PinePhone using Manjaro/PhoSh beta 23. Result was an error from Docker:
A similar error was mentioned recently on https://discuss.getsol.us/d/8202-docker-not-working-related-to-recent-update/3. Is this perhaps due to kernel config? Currently running:
It does indeed seem that BPF_CGROUP_DEVICE is not enabled:
Note: imo we should have the image build on non-Docker installations as well. Since the project ships a binary, not a container image, requiring people to run Docker just for this purpose seems counter-intuitive. |
Researching further shows that it's CONFIG_BPF_SYSCALL that must be enabled, not (just) CONFIG_CGROUP_BPF, see opencontainers/runc#2959 (comment). I guess we'll need to file a Manjaro issue on this to get the kernel config changed. |
Filed manjaro-pinephone/phosh#35. Note that it's CONFIG_CGROUP_BPF that should also be enabled, not BPF_CGROUP_DEVICE. |
I think there is a misunderstanding here. Docker is used to build the binary. This dockerfile is not for the enduser to run Electrum on their machine. It is there to set up a container that can be used to build the binary. Another approach could be to adapt the build scripts so that at least they can also be used on arm64 machines and build arm64 binaries there (so no cross-compiling). -- I would discourage this approach as the project maintainers only have amd64 machines and would prefer to build all binaries on such machines. Also, if you are trying to run the current build scripts on arm, note that the ubuntu base image is hash-pinned, and I guess the hash might be architecture-dependent:
|
@SomberNight : thanks for the background information. No, there is no misunderstanding: I am aware Docker is used for building and not needed for running. Still, I feel that on a non-Docker machine, the binary should be able to build as well. Your comment on cross-compilation makes sense. If it's possible to cross-compile for arm64 on amd64, isn't it possible to do the other way around as well? Let me dig into that. If hardware is an issue, I am happy to contribute to get some arm64 hardware, like a Raspberry Pi or a PinePhone, to the developers so tests can be run natively on that hardware. |
Looks like "sudo docker run --platform linux/amd64 ubuntu" could work on arm64. However, I won't know until I get the 5.17 kernel running on my beta23 PinePhone, see manjaro-pinephone/phosh#35 (comment). |
Got a bit further now that I have 5.17 kernel. I ran "sudo pacman-mirrors --api --set-branch unstable" to get 5.17.1-2:
I re-ran ./build.sh, and got an error about pyqt5:
Then I installed python-pyqt5, and re-ran ./build.sh. Same error, apparently because the version I get is not exactly the same:
5.15.6-7 as opposed to the required 5.15.6. Provided I can figure out where to change the requirement, should I try? |
PyQt5 is installed here: electrum/contrib/build-linux/appimage/make_appimage.sh Lines 123 to 124 in ad41f4a
this references contrib/deterministic-build/requirements-binaries.txt :
(which is committed to the repo to pin hashes; it is generated from: https://github.com/spesmilo/electrum/blob/ad41f4aed01a8848ce9139f22f84a433c3b7c3cc/contrib/requirements/requirements-binaries.txt) So it is using pip, which downloads packages from PyPI. There are no binary releases for arm linux, see: The easy workaround is to install PyQt5 from the system package manager (note that this is all running inside a docker container, so I am not talking about your host system).
(you would also need to remove pyqt5 from contrib/deterministic-build/requirements-binaries.txt )
|
bitcoin-core/HWI#615 is interesting and simple, but it still leaves the question of what to do with pyqt. |
Is bitcoin-core/HWI#691 possibly relevant for you? |
Only to the degree that pyside6 has pre-built wheels for manylinux aarch64. Perhaps we should build Qt ourselves, just like we do it for the Android build. Then again, that might blow up the build times, just like we have seen for Android. |
Note: the latest pyqt6 release now also includes wheels for aarch64: |
is there any particular reason the project does not use pyside6? |
The historical reason is that when we started using PyQt4, pyside did not exist. PyQt works well, so to switch, there should be a good reason. Is there one? :) |
thanks for explaining the reason, I was just curious to know |
At the moment we only build AppImages for x86_64 Linux.
See https://github.com/spesmilo/electrum/tree/master/contrib/build-linux/appimage
It would be nice to be able to do the same for ARM (maybe armhf?).
Ideally, the build script would NOT assume the host to be ARM, so e.g. it would cross-compile or similar.
The text was updated successfully, but these errors were encountered: