Closed shaneHowearth closed 10 months ago
I appreciate that me using a Raspberry Pi might be the core issue here, but would love to be able to use the Pi as my dev machine (albeit with limitations), rather than ssh'ing from my Pi into a desktop to do the work.
Can you try with CGO_CFLAGS="-arch arm64" CGO_LDFLAGS="-arch arm64" go build main.go
?
Might be a duplicate of https://github.com/golang/go/issues/43842
Edit: NVM, just read you tried that, my bad
That appears to be the fix (I had missed this in one of the comments)
GOHOSTARCH=arm GOARCH=arm go run cmd/main.go
# command-line-arguments
cmd/main.go:7:7: undefined: chi
cmd/main.go:8:8: undefined: middleware
Hmm, even those are specified in the go env
output... hmmm
Ok, so the issue is that in go env
those variables are set:
GOARCH='arm64'
GOHOSTARCH='arm64'
And the fix is to have them as
GOARCH='arm'
GOHOSTARCH='arm'
Should I raise a bug for that?
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputNote: I am running this on a Raspberry Pi 4 - aarch64
What did you do?
I first noticed this when trying to install linters and such with
vim-go
(:GoInstallBinaries).Looking through older issues I found: https://github.com/golang/go/issues/43842 Which advised something to the effect of
A troubleshooting step was
or
or
For a very simple piece of code
Things are fine:
But for
I get