One of the biggest challenges is to be able to cross-compile dependencies, that’s why Grin++ uses vcpkg, which is a cross-platform open source package manager. In order to simplify the building process I decided to use dockcross. The branch is public for everyone and can be found here: https://github.com/GrinPlusPlus/GrinPlusPlus/tree/linux-arm64 and inside there is a Dockerfile.
Te process is really straight forward:
- Make use of linux-arm64 docker image (based on debian:stretch-20190326-slim) which includes the toolchain.
- Install dependencies.
- Download, build and install vcpkg.
- Build Grin++
- Build Tor.
After some minutes, maybe 10 minutes, depending on the PC resources, we can finally extract the binary and run Grin++ on your Pi4.
$ git clone firstname.lastname@example.org:GrinPlusPlus/GrinPlusPlus.git $ cd GrinPlusPlus $ git checkout linux-arm64 $ docker build -t grinpp-linux-arm64 . $ docker run -ti --rm grinpp-linux-arm64 bash $ docker container ls CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 6524f0250ac0 grinpp-linux-arm64 "/dockcross/entrypoi…" 9 seconds ago Up 9 seconds dazzling_perlman $ docker cp dazzling_perlman:/work/output/linux-arm64 output