Open chaitanyaprem opened 1 year ago
:+1: for this.
I will be soon the owner of https://computeblade.com/ and running Waku is on my list too!
Sounds good! Yeah, we should definitely produce both binaries (and make them available through standard release process) and docker images.
We can keep this issue around and close it when we verify it actually works on RPi, but I've recently created more general issue as well as it is not just raspberry and arm64: https://github.com/waku-org/nwaku/issues/1879
After applying a short try during the weekend (https://earthly.dev/blog/cross-compiling-raspberry-pi/ and/or https://deardevices.com/2019/04/18/how-to-crosscompile-raspi/) , I noticed that there are difficulties around cross-compiling nim-bearssl
.
Its C code seems not to be fully prepared and I got the following compilation error:
/home/shared/nwaku/vendor/nim-bearssl/bearssl/abi/../csources/src/inner.h:2527:23: fatal error: x86intrin.h: No such file or directory
#include <x86intrin.h>
On the other hand, in the official https://www.bearssl.org/ portal we have:
( cc @arnetheduck )
we compile bearssl successfully for raspberry in nimbus - see arm64 builds here: https://github.com/status-im/nimbus-eth2/blob/unstable/.github/workflows/release.yml#L80C20-L80C20
We can use the following repo as a good reference on how to achieve that: https://github.com/richard-ramos/gonimffi
( thanks @richard-ramos for that btw! )
Problem
I have a raspberry pi 3B which is an ARMv8 CPU and 1GB RAM. I wanted to run nwaku node on it. If i try to compile nwaku on it, it gets stuck and gets rebooted after 8-10 hours or so, probably running out of resources.
Suggested solution
We can cross-compile nwaku and then copy relevant binary and dependent files and then run it on the RPI ideally using a docker environment. Once this is successfull, we can record the steps for the same so that other can similarly follow for various other resource-restricted devices.
Nimbus team already has an option to build using docker, and this is the pointer given by them to do something similar for nwaku. We can probably take their base image (which should have all the required toolchain) and then just write instrucitons to compile nwaku within the container. follow the dist target we have for creating a binary distribution of nimbus: https://github.com/status-im/nimbus-eth2/blob/stable/Makefile#L807 - this works on linux at least
Alternatives considered
None
Additional context
Below are my environment details : RPI : Linux pi 5.15.84-v7+ #1613 SMP
Acceptance criteria