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
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@vcabbage
Copy link
Member

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

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.

@bradfitz bradfitz added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jul 16, 2017
@crvv
Copy link
Contributor

crvv commented Aug 22, 2017

This is a duplicate of #14339

@gopherbot
Copy link
Contributor

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 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

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.

@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.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

6 participants