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

Add ARM Builds #345

Open
achow101 opened this issue Jun 22, 2020 · 9 comments
Open

Add ARM Builds #345

achow101 opened this issue Jun 22, 2020 · 9 comments

Comments

@achow101
Copy link
Member

Seems like ARM builds might be something we should do: btcpayserver/BTCPayServer.Vault#20

Which ARM platforms specifically should we build on, and what machines might be necessary? I've got Raspberry Pi 1, 3, and 4 so I think I can cover the most common ARM architectures.

@NicolasDorier
Copy link

In the wild I saw arm64 (say rock64pro) and arm32 (raspberry)

@NicolasDorier
Copy link

I think that it may interest wasabi wallet as well ping @nopara73 @lontivero @molnard

@molnard
Copy link
Contributor

molnard commented Jun 23, 2020

We decided to not support officially ARM platforms because of un-maintainability reasons. .NET core >3 is capable to compile to it. @jmacato made a successful experiment with Wasabi and Pinebook PRO.

Sooner or later we have to deal with it according to the news, Apple is moving toward ARM but not now.
https://www.executivetraveller.com/news/apple-arm-macbook

@jmacato
Copy link

jmacato commented Jun 23, 2020

ARM64 will be more relevant in the coming years.. Currently Wasabi is working on arm64 platforms, I tested and I'm using it in my arm64 laptop and works okay. Though i had to make an out-of-band support for it.. for now at least.

@NicolasDorier
Copy link

Raspberry does not seem to want to transition to arm64 though.

@jmacato
Copy link

jmacato commented Jun 28, 2020

@NicolasDorier yeah... skia would still work there btw. We have some users that uses avalonia on RPi's.

@achow101
Copy link
Member Author

It looks like AWS has ARM64 instances so I can use those to do ARM64 builds.

@KayBeSee
Copy link
Contributor

KayBeSee commented Jan 13, 2022

I'd like to +1 on having ARM64 (or aarch64?) builds. Would be cool to be able to use hardware wallets on nodes like Umbrel.

@kiminuo
Copy link
Contributor

kiminuo commented Jun 13, 2022

Feel free to help with kiminuo#1 if you feel a sudden urge to do so :)

achow101 added a commit that referenced this issue Jan 30, 2024
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
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

6 participants