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?
Post version 1.4 Go is written in go so you need to install something that can understand and compile go natively, often called the go toolchain.
Don't change anything else just install the latest 1.4 version and point GOROOT_BOOTSTRAP at this. In my case I installed Go 1.4.3 and placed into a directory C:\Go143 and on windows did this set GOROOT_BOOTSTRAP=C:\Go143
All worked after that