Golang setup not complete, not able to compile anything

I have trouble compiling go packages under Haiku with latest available port Go 1.4.3-7.
The package itself runs fine and a go version gives me the installed version 1.4.3.

However I cannot seem to get packages to compile, it does not find the packages at the expected path.
Setting $GOROOT and $GOPATH also didn’t help much, and a “go get -u” in the go package’s source dir gives me a weird error:

package _/boot/home/Develop/git-lfs: unrecognized import path "_/boot/home/Develop/git-lfs

(I want to port git-lfs as I need it for working with AI models).

My GOROOT seems OK and points to /boot/home/go which has a sensible layout and contains:

~/Develop/git-lfs> ls ~/go/
bin  pkg  src

Here’s my full go env setup:

> go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="haiku"
GOOS="haiku"
GOPATH="/boot/home/go"
GORACE=""
GOROOT="/boot/home/go/src"
GOTOOLDIR="/boot/home/go/src/pkg/tool/haiku_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -fmessage-length=0 -Wl, -Bsymbolic"
CXX="g++"
CGO_ENABLED="0"

Docs I checked:

Go 1.4 is extremely outdated and likely not usable for anything current.

korli hasbeen working on go 1.18 which you can find sources for here: GitHub - korli/go at golang-1.18-haiku it is currently cross compiled from linux and I don’t know if there are binary packages available.

1 Like

Thanks, I remember now. Will check out his work then, thanks!