Build for arm64 on amd64#615
Conversation
6854f65 to
4f44d39
Compare
bfd92b2 to
fc5bc9d
Compare
fc5bc9d to
44c15fd
Compare
|
@achow101 Would you have a moment to review this PR please? |
|
I've started doing arm64 builds on a raspi 4 that I have. Is this still relevant? |
I believe so. But I can see there are some conflicts now. |
# Conflicts: # contrib/build.Dockerfile # contrib/build_bin.sh
44c15fd to
d93c8f7
Compare
|
|
||
| # Setup poetry and install the dependencies | ||
| if [[ $gui_support == "--with-gui" ]]; then | ||
| if [[ $gui_support == "--with-gui" && $ARCH == "x86_64" ]]; then |
| if [[ $OS == "darwin" ]]; then | ||
| OS="mac" | ||
| fi | ||
| ARCH=$(uname -m | tr '[:upper:]' '[:lower:]') |
There was a problem hiding this comment.
Just moved up in this file.
| poetry run pyinstaller hwi.spec | ||
|
|
||
| if [[ $gui_support == "--with-gui" ]]; then | ||
| if [[ $gui_support == "--with-gui" && $ARCH == "x86_64" ]]; then |
There was a problem hiding this comment.
Do not run for arm64.
|
@achow101 It seems I succeeded in building an arm64 build using the instructions above - i.e. 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"WDYT? |
|
Can you update docs/development/release-process.rst with the instructions? |
|
|
||
| docker build --no-cache -t hwi-builder -f contrib/build.Dockerfile . | ||
| docker build --no-cache -t hwi-wine-builder -f contrib/build-wine.Dockerfile . | ||
| docker buildx build --no-cache --platform linux/arm64 -t hwi-builder-arm64 -f contrib/build.Dockerfile . |
There was a problem hiding this comment.
It seems like one can simplify it nowadays to:
| docker buildx build --no-cache --platform linux/arm64 -t hwi-builder-arm64 -f contrib/build.Dockerfile . | |
| docker build --no-cache --platform linux/arm64 -t hwi-builder-arm64 -f contrib/build.Dockerfile . |
based on https://docs.docker.com/build/guide/multi-platform/. It should be available from API 1.38 (the latest is 1.43):
Updated. I added what I find to be safest but I can only test on Ubuntu 23.04. Maybe your system differs. So it would be great if you could try the instructions and pick what works for you. |
|
ACK 3d3c02d |

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
arm64architecture. The hope is HWI's support forarm64will improve a bit.Setup
To set up your environment, install:
Build for arm64
Use docker buildx to replicate deterministic build instructions for the arm64 build:
i.e. the change is:
Resources
Limitations
No GUI support
So far I had no luck with building
hwi-qtbecause I get the following errorduring execution of
poetry install -E qtThat's why I use
build_bin.sh --without-gui(see #655)