Trying to build on ARM

@mdr0id’s build no longer works due to the automatic deprecation.

I tried to build zcashd for arm64 via transpilation, following the official docs and @garethtdavies’s cool guide but it failed. I’ll link to the terminal output below. can someone please help me figure out what went wrong?

2 Likes

aarch64-linux (arm64) binaries are available from Zecwallet: Releases · adityapk00/zcash · GitHub

3 Likes

There are a couple issues on different platforms with cross compiling for ARM, at the momemnt. My best recommendation is to use an Ubuntu20.04 system or our docker zcashd-worker image:
https://hub.docker.com/repository/docker/electriccoinco/zcashd-build-ubuntu2004

Please let us know if you have any other issues

3 Likes

thank you @adityapk00 , that’s very helpful! for now I tried your build but it crashes while “Init message: Loading block index…” is going on. after the crash it says “Killed” even though I didn’t kill it.

debug.log lists only one error:

Binding RPC on address 0.0.0.0 port 8232 failed.

but then it moves on normally. the last entry zcashd manages to add to the log file is this:

Opened LevelDB successfully

any ideas what’s going wrong?

1 Like

Out of memory, maybe.

1 Like

@hanh you were absolutely right, thank you. I had to free up some RAM and make the swap situation closer to ideal, and now it’s running properly.

@adityapk00 great build. could you share the specifics of your build environment?

1 Like

It’s built by this script: zcash/buildall.sh at master · adityapk00/zcash · GitHub

1 Like

@adityapk00 I tried to build it, but I’m getting all kinds of Docker errors, for example:

“docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post “http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/create”: dial unix /var/run/docker.sock: connect: permission denied.”

Again, can I ask you to specify the environment in which you build?

And is there a method to build only for the architecture I want, not all of them?

1 Like

Is there any way ECC or someone could make this whole process of building/deploying nodes on ARM better?

One of the criticisms I have heard about Zcash is that there are only 300ish network nodes. I think this is due to

  1. Running a full node takes more time/space to do.
  2. 16 week cycle for mandatory updates
  3. Is confusing for newbs
  4. Lack of proper ARM support.

Perhaps there could even be some sort of out-of-the-box solution for users to buy or DIY a Casa style node: Bored at home? Try building your own Casa Bitcoin node - Decrypt

But to do this requires proper support and builds pushed for all platforms every 16 weeks. It’s got to be easy for newbs and not require constant cross-compiling to work.

Perhaps an idea for @ZcashGrants ?

2 Likes

We will be publishing a call to grants in the coming weeks. Making full nodes easy to run is on our list. :slightly_smiling_face:

Meanwhile, if anyone prefers to run a solo node, zebrad start works like charm on ARM arch.

5 Likes

We are going to push some documents describing how to build on ARM and other platforms easier soon. Additionally, some of the docker work we did a couple years ago will allow some of this process to be handled through docker buildx mechanisms or similar. The work being done right now will guide ARM to being a fully supported and deployed platform, like Debian or Ubuntu packaging.

5 Likes

@slush

Here’s a vagrant file. Just do vagrant up and it will build an ARM binary automatically.

You need to install vagrant first:

Once it finishes, you can copy the binary out of the VM using

vagrant scp default:/home/vagrant/zcashd/src/zcashd .

However, I haven’t used it for nearly a year. I know it still builds a binary but I don’t have the hardware to test it.

3 Likes

Does this work for ARM64 folks?

https://ecc.mypinata.cloud/ipfs/QmZEEf3C66V2dAzHfSbiQqFa9VpNE819FPsCJkK9yJStJU

Inside includes the source/binaries for zcash v5.0.0-rc1, IIRC. There exists some issues for folks using the 4GB RAM ARM64 boards but it is documented. Otherwise default syncs should operate gracefully (e.g. none reindexes and nodes syncing without lwd/explorer/txindex configs)

(Update :tada: :stadium: :zcash: )Get v5.0.0
https://ecc.mypinata.cloud/ipfs/Qmf25mpm8BwjJTivLzcKGyrXW32u2ijsdb3cjpc88hwC71

Extract

tar -xvf Qmf25mpm8BwjJTivLzcKGyrXW32u2ijsdb3cjpc88hwC71

Output:

workspace/source/src/zcashd
workspace/source/src/zcash-cli
workspace/source/src/zcash-gtest
workspace/source/src/zcash-tx
workspace/source/log.out
3 Likes
HOST=aarch64-unknown-linux-gnu zcutil/build.sh

Cross compiled 5.0 successfully using the above for my 8GB Pi4.
Screenshot_2022-05-13_13-54-00

3 Likes

:shield: :zcash: Woot! Nice! The native compile kinda works, but it is painfully slow on those boards.

For what it is worth, looking around in the ARM64 board world, ODROID released their M1 8GB boards fairly recently:

or

(note: nvme, sata3.0, eMMc compared to other boards; tbf their are adapters for pi4s but haven’t personally used them)

2 Likes

We should probably resurrect this old thread for Zebra ARM stuff @dismad :zebra:

What ever happened to this RFP?

@ahas ?

3 Likes

Supposedly, its still in the works. There was an update a month or two ago

2 Likes

@ahas has developed a prototype and is sending one to both me and @brunchtime this month to test. He gave us a demo late last year and it appeared promising.

Ahas can provide additional details on timing and availability.

2 Likes

I’m been running one on pi5 for about 15 months. It’s neat, there are tradeoffs between that and a laptop, of course. I’ve considered modularizing it with but Idk.

6 Likes

Love it!!! :hot_pepper:

1 Like