Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap tool hardcodes path to previous go binary #11209

Closed
ohir opened this issue Jun 14, 2015 · 1 comment
Closed

bootstrap tool hardcodes path to previous go binary #11209

ohir opened this issue Jun 14, 2015 · 1 comment

Comments

@ohir
Copy link

ohir commented Jun 14, 2015

version: 6b24da6 & go1.4.2 linux/amd64
trying to: compile tip 6b24da6
bug: all.bash/bootstrap tool assumes binary in $HOME/go1.4/bin/go; else fails

# repository status
$ cd /nfs/hq/ghm/golang
$ git log|head -1
commit 6b24da6ae8321387e9dd02181ccf5b425d4c05f9
$ git status
# On branch master
nothing to commit (working directory clean)

# checkout from hq approved mirror for golang
# to local tree: /x/gotip
$ git --git-dir=/nfs/hq/ghm/golang/.git \
      --work-tree=/x/gotip checkout HEAD .

# check active exports
$ env|grep GO
GOPATH=/u/hub/gva

# check PATH for old binary
$ which go
/x/go1.4/bin/go

$ go version
go version go1.4.2 linux/amd64

# make tip
$ cd /x/gotip/src
$ ./all.bash

##### Building Go bootstrap tool.
cmd/dist
ERROR: Cannot find /u/tde/v56/staff/ohir/go1.4/bin/go.
Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.
./make.bash: line 121: /u/tde/v56/staff/ohir/go1.4/bin/go: No such file or
directory

Expected: bootstrap tool should look for a working Go tree by itself.
It should allow one to compile tip/1.5 in detached tree as before (e.g 1.4.2 below):

$ git --git-dir=/nfs/hq/ghm/golang/.git \
      --work-tree=/x/go1.4 checkout go1.4.2 .
$ cd /x/go1.4/src
$ ./all.bash

[... cut compile log ...]

real    0m0.212s
user    0m0.138s
sys 0m0.011s

ALL TESTS PASSED

---
Installed Go for linux/amd64 in /x/go1.4
Installed commands in /x/go1.4/bin
*** You need to add /x/1.4/bin to your PATH.
@adg
Copy link
Contributor

adg commented Jun 15, 2015

You need to set GOROOT_BOOTSTRAP.

@adg adg closed this as completed Jun 15, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants