-
Notifications
You must be signed in to change notification settings - Fork 0
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
Build for arm64
on amd64
#1
Conversation
06a1946
to
5c573fe
Compare
5c573fe
to
3a2089f
Compare
cc @achow101 |
Interesting, I had not considered using qemu before. I was going to just do the builds on actual hardware. What is the difference between It's probably fine to not ship hwi-qt for arm builds, but it would be nice if that would work. |
As https://docs.docker.com/buildx/working-with-buildx/ says
It's basically a more powerful wrapper if I'm not mistaken.
Yes, that's exactly the reason I use it.
So I would be happy to make it work though at the moment I don't have an idea how to fix it. Any idea how to fix it would be much appreciated. Anyway, I will try to spend a bit more time and I'll try to fix it but I have only limited time budget for this unfortunately and I don't know poetry, python and qt all that good. |
Ok, so I believe it's simply because https://pypi.org/project/shiboken2/#files does not provide arm64 wheel. |
https://doc.qt.io/qt-5/linux.html makes me think that linux/arm64 support is not officially supported. So that might be a plausible explanation why the python wheel for arm64 does not exist. https://wiki.qt.io/Qt_for_Python seems to indicate the same thing. |
Maybe try installing PySide2 (or PyQt5) with apt (in |
Yes, I have tried to do that but Debian Stretch does not have that package by default (it has some older version). Your link links Debian Bullseye version of Debian. If I'm mistaken feel free to correct me. |
3d3c02d Improve (Kiminuo) ee3cf5f Add release instructions (Kiminuo) d93c8f7 Add support for arm64 (Kiminuo) Pull request description: Related to #345 Related to WalletWasabi/WalletWasabi#4051 (comment) Discussion: Some discussion here: kiminuo#1 This PR just shows how to do a deterministic build for `arm64` architecture. The hope is HWI's support for `arm64` will improve a bit. ### Setup To set up your environment, install: ```s sudo apt install qemu-user-static ``` ### Build for arm64 Use [docker buildx](https://docs.docker.com/buildx/working-with-buildx/) to replicate [deterministic build instructions](https://github.com/bitcoin-core/HWI/blob/master/docs/development/release-process.rst#deterministic-builds-with-docker) for the arm64 build: ```s docker buildx build --no-cache --platform linux/arm64 -t hwi-builder -f contrib/build.Dockerfile . # Note the use of "--without-gui". docker run --platform linux/arm64 -it --rm --name hwi-builder -v $PWD:/opt/hwi --workdir /opt/hwi hwi-builder /bin/bash -c "contrib/build_bin.sh --without-gui && contrib/build_dist.sh --without-gui" ``` i.e. the change is: ```diff -docker build --no-cache -t hwi-builder -f contrib/build.Dockerfile . -docker run -it --name hwi-builder -v $PWD:/opt/hwi --rm --workdir /opt/hwi hwi-builder /bin/bash -c "contrib/build_bin.sh && contrib/build_dist.sh && contrib/build_wine.sh" +docker buildx build --no-cache --platform linux/arm64 -t hwi-builder -f contrib/build.Dockerfile . +docker run --platform linux/arm64 -it --rm --name hwi-builder -v $PWD:/opt/hwi --workdir /opt/hwi hwi-builder /bin/bash -c "contrib/build_bin.sh --without-gui && contrib/build_dist.sh --without-gui" ``` ### Resources * https://docs.docker.com/build/building/multi-platform/#building-multi-platform-images * https://medium.com/@artur.klauser/building-multi-architecture-docker-images-with-buildx-27d80f7e2408 ## Limitations ### No GUI support So far I had no luck with building `hwi-qt` because I get the following error ``` Installing dependencies from lock file Package operations: 14 installs, 0 updates, 0 removals • Installing shiboken2 (5.15.2): Failed RuntimeError Unable to find installation candidates for shiboken2 (5.15.2) at ~/.pyenv/versions/3.9.7/lib/python3.9/site-packages/poetry/installation/chooser.py:72 in choose_for 68│ 69│ links.append(link) 70│ 71│ if not links: → 72│ raise RuntimeError( 73│ "Unable to find installation candidates for {}".format(package) 74│ ) 75│ 76│ # Get the best link ``` during execution of [`poetry install -E qt`](https://github.com/kiminuo/HWI/blob/a025af3ee3fdf0bac8dbdbc51b9e82ab946660b4/contrib/build_bin.sh#L12) That's why I use `build_bin.sh --without-gui` (see #655) ACKs for top commit: achow101: ACK 3d3c02d Tree-SHA512: 3df877ec3da07997c8281722ea0ec4687d850f1fec33cb5664e3f03cd8854cb02a90ce799da2123a88058b681fbb2bad31bdacbb485474d19fa88b60a4b73d83
Related to bitcoin-core#345
Related to WalletWasabi/WalletWasabi#4051 (comment)
This PR just shows how to do a deterministic build for
arm64
architecture. It's not finished, polished, etc. The hope is HWI's support forarm64
will improve a bit.Setup
To set up your environment, install:
sudo apt install qemu-user-static
Build for arm64
Use docker buildx to replicate deterministic build instructions for the arm64 build:
i.e. the change is:
Limitations
So far I had no luck with building
hwi-qt
because I get the following errorduring execution of
poetry install -E qt
What about Cirrus CI and an ARM64 dockerfile...?
https://cirrus-ci.org/guide/docker-builder-vm/#dockerfile-as-a-ci-environment says
i.e. "
arm_containers
are not supported yet" is important!=> Not possible at the moment, I believe.