Go on Plan 9(front)
Here is how I typically structure my Go installs for 9front:
- GOROOT=/sys/go
- GOROOT_BOOTSTRAP=/sys/go1.4
- GOPATH=/usr/$user/go
- GOBIN=$GOPATH/bin
If you want a binary install (rather than building from source) for Go, see 9legacy
To build you should acquire 2 tar's, the bootstrap tar and the latest src tar.
The latest bootstrap tar is listed on the Installing Go from source page and the latest source is on the Go Downloads page.
You want to build the bootstrap before you build the latest src, so in your ns set GOROOT=GOROOT_BOOTSTRAP
and GOBIN=$GOROOT/bin
as to not confuse the build scripts.
cd into the src directory and run ./all.rc
. Tests will fail and this is standard for Plan 9 source builds.
Once this completes you should have go
and gofmt
binaries in /sys/go1.4/bin
.
After you finish building the bootstrap, set GOROOT=/sys/go
and cd into $GOROOT/src
. Run ./all.rc
. Tests will fail here as well.
Once this completes you should have go
and gofmt
binaries in /sys/go/bin.
Add the GO* variable initializations to your $home/lib/profile
or /rc/lib/rcmain.local
or similar file as per personal preference.
You should add a line in one of these scripts to (probably $home/lib/profile
) to bind $GOBIN onto /bin.
At this point you should have a fully functional Go installation on 9front.
Notes:
Known working build combinations are…
1.4.3 → 1.8.3 → 1.9.x
1.9.x → 1.10.x
1.4.3 does not appear to build versions after 1.8.x on plan9/amd64.