gvm: Error with go1.5 install

~  gvm install go1.5                                                                                                                                
Installing go1.5...
 * Compiling...
ERROR: Failed to compile. Check the logs at /home/xxxxx/.gvm/logs/go-go1.5-compile.log
ERROR: Failed to use installed version
~ cat /home/xxxxx/.gvm/logs/go-go1.5-compile.log                                                                                                   
##### Building Go bootstrap tool.
cmd/dist
ERROR: Cannot find /home/xxxxx/go1.4/bin/go.
Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.
./make.bash: line 121: /home/xxxxx/go1.4/bin/go: No such file or directory

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 1
  • Comments: 32

Commits related to this issue

Most upvoted comments

You will need go1.4 installed before you can install go1.5 (since this is compiling from go source and 1.5 doesnt use C anymore) run gvm install go1.4 gvm use go1.4 export GOROOT_BOOTSTRAP=$GOROOT then run gvm install go1.5 . This should be fixed in pull #154

Did you install it using -B option?

@dariusc93’s solution worked. Thanks.

gvm install go1.4 
gvm use go1.4 
export GOROOT_BOOTSTRAP=$GOROOT 
gvm install go1.5

thanks @dariusc93 - I needed to update this for it to work. gvm install go1.4 -B gvm use go1.4 export GOROOT_BOOTSTRAP=$GOROOT

You can also set GOROOT_BOOTSTRAP to always use your Go 1.4 so you don’t have to switch it in GVM.

export GOROOT_BOOTSTRAP="/Users/{username}/.gvm/gos/go1.4"

@IgorGanapolsky Yes. Actually, it is written in their README.

A Note on Compiling Go 1.5
Go 1.5+ removed the C compilers from the toolchain and replaced them with one written in Go. Obviously, this creates a bootstrapping problem if you don't already have a working Go install. In order to compile Go 1.5+, make sure Go 1.4 is installed first.

So this works but is it not possible to bootstrap latest go without 1.4?

@dariusc93 solution worked for me.