The Go tool chain was rewritten in Go, requiring a prior Go compiler to exist to perform the install.
You can point to an existing compiler using the GOROOT_BOOTSTRAP environment variable.
In my situation I have Go already installed by Homebrew. Going forward I want to compile from the source and not by 'brew upgrade go'. I want to use the Homebrew install to compile the latest source, as it already exists on the system.
the following throws an error ("Cannot find packages")
cd $GOPATH/src/github.com/golang/go/src
GOROOT_BOOTSTRAP=/usr/local/Cellar/go/1.6.2 ./all.bash
and so does this ("Cannot find /usr/local/Cellar/go/1.6.2/go/bin/go")
GOROOT_BOOTSTRAP=/usr/local/Cellar/go/1.6.2/go ./all.bash
but this works (mostly, except for me it fails with a Python _lldb.so plug-in error)
GOROOT_BOOTSTRAP=/usr/local/Cellar/go/1.6.2/libexec ./all.bash
What does the "libexec" do in this context? and is there a better way to install golang with the prior compiler being from homebrew?