GOCACHE is not disabled by default
During the go package rebuild I noticed that testing/singularity
fails with errors like:
/usr/lib/go/src/strconv/atof.go:13:8: can't open import: "math": open /home/buildozer/.cache/go-build/79/79d9756126d791338847a2dbc18ee32a7b97d2a211859da41333ad0c3aab0060-d: no such file or directory
It builds fine locally though.
These errors seem to be related to the Go compiler. It seems that some distributions disable the compiler cache for their builders which might be a good idea. Void Linux, for instance, disables it through their go template file: https://github.com/void-linux/void-packages/blob/371de6a0318b1e7ad86c26e84d946c66004e44d9/srcpkgs/go/template#L34
One very easy way to disable it in alpine would be adding export GOCACHE=off
to /etc/abuild.conf
.