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

build: default GOROOT_BOOTSTRAP to go env GOROOT #21037

Closed
vcabbage opened this issue Jul 16, 2017 · 5 comments
Closed

build: default GOROOT_BOOTSTRAP to go env GOROOT #21037

vcabbage opened this issue Jul 16, 2017 · 5 comments

Comments

@vcabbage
Copy link
Member

@vcabbage vcabbage commented Jul 16, 2017

Currently, developers wanting to build Go from source need to either have a Go install at $HOME/go1.4 or explicitly set GOROOT_BOOTSTRAP. I frequently recommend prefixing the build scripts with GOROOT_BOOTSTRAP=$(go env GOROOT), this has worked well in the cases I've helped with. I believe baking this into the script would simplify the process for many developers.

To retain backward compatibility, I suggest the following precedence:

  1. Explicitly set GOROOT_BOOTSTRAP
  2. $HOME/go1.4
  3. go env GOROOT
@ianlancetaylor ianlancetaylor added this to the Go1.10 milestone Jul 16, 2017
@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Jul 16, 2017

Good idea. I'll note that if go env GOROOT == GOROOT (that is, the GOROOT we are about to use for the build), then we shouldn't use it.

@crvv
Copy link
Contributor

@crvv crvv commented Aug 22, 2017

This is a duplicate of #14339

@gopherbot
Copy link

@gopherbot gopherbot commented Aug 22, 2017

Change https://golang.org/cl/57753 mentions this issue: make.bash: add go env GOROOT as default GOROOT_BOOTSTRAP value

@mvdan
Copy link
Member

@mvdan mvdan commented Aug 22, 2017

@crvv if this is indeed a duplicate, this issue should be closed and the CL should only mention the original issue.

@vcabbage could you confirm this is a dup?

@vcabbage
Copy link
Member Author

@vcabbage vcabbage commented Aug 22, 2017

It does appear to be a dup. Though #14339 specifically refers to make.bash, I would hope that the other make scripts would be updated to follow the same logic. I'll go ahead an close this issue.

@vcabbage vcabbage closed this Aug 22, 2017
@golang golang locked and limited conversation to collaborators Aug 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
6 participants