Host Build (arm64)
You can build the RaspberryPi executable using the host itself.
This is very slow and may lead the RaspPi to become unresponsive while downloading and/or installing Go packages and likely run out of memory which will cause things to grind to a halt.
The following top
shows that the RaspPi system with 1GB RAM has effectively run out of resources while installing go install github.com/gohugoio/hugo@v0.101.0
…
top - 23:45:24 up 6 min, 5 users, load average: 4.52, 2.99, 1.41
Tasks: 183 total, 2 running, 181 sleeping, 0 stopped, 0 zombie
%Cpu(s): 17.3 us, 2.2 sy, 0.0 ni, 5.4 id, 74.9 wa, 0.0 hi, 0.2 si, 0.0 st
MiB Mem : 909.6 total, 19.6 free, 817.3 used, 72.7 buff/cache
MiB Swap: 100.0 total, 0.9 free, 99.1 used. 30.2 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1756 ubuntu 20 0 934400 260180 4404 S 60.3 27.9 0:15.15 compile
1761 ubuntu 20 0 865008 163700 4296 S 39.3 17.6 0:09.11 compile
1750 ubuntu 20 0 797772 101612 4584 D 20.0 10.9 0:12.60 compile
1766 ubuntu 20 0 864036 134056 5748 R 16.1 14.4 0:10.40 compile
...
To mitigate locking up the RaspPi during this build it is possible to restrict the resources for Go.
GOMEMLIMIT=500MiB GOMAXPROCS=2 make with-deps -j 1
The following script will download the miminim required versions of nodejs, npm and golang. It will probably run on a RaspPi 4 with ~4GB+ RAM.
#!/bin/bash
# Assuming Ubuntu/Debian/Raspbian environment
# https://flamenco.blender.org/development/getting-started/
set -e
# Toolchain
echo "Toolchain install..."
sudo apt-get update
sudo apt install -y curl gzip software-properties-common gcc g++ make build-essential
sudo apt-get install -y default-jre-headless git golang
curl -sL https://deb.nodesource.com/setup_16.x | sudo bash -
sudo apt-get update
sudo apt install -y hugo file make nodejs
sudo npm install --global yarn
# Golang - Flamenco supported version >=1.20
GOVERSION="1.20.4"
PLATFORM="arm64"
echo "Replacing go with $GOVERSION for $PLATFORM..."
wget "https://golang.org/dl/go${GOVERSION}.linux-$PLATFORM.tar.gz" -O go${GOVERSION}.linux-$PLATFORM.tar.gz
sudo tar -C /usr/local -xvf "go${GOVERSION}.linux-$PLATFORM.tar.gz"
sudo ln -fs /usr/local/go/bin/go /usr/bin/go
# Check versions
echo "Versions..."
node --version
npm --version
go version
# Clone flamenco (main branch)
echo "Cloning Flamenco..."
git clone https://projects.blender.org/studio/flamenco.git
# Build
echo "Building..."
cd flamenco/
go mod download
GOMEMLIMIT=500MiB GOMAXPROCS=2 make with-deps -j 1