-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: still need to set GOROOT with go1.9beta2 #20997
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
Comments
Somewhat related, it seems that GOTOOLDIR is not automatically set.
Should I file a new issue for GOTOOLDIR ? |
Please show us the output of |
The |
There's not much extra info that
|
You're right, I can recreate the problem. It's easy to recreate by building Go, and then moving the entire GOROOT directory elsewhere. Our tests don't work because we don't move the GOROOT directory--we don't want to do that, because it would break any other tests running at the same time. @bradfitz Any suggestions for how to test this? The best I can think of is to copy GOROOT, remove GOROOT/pkg, run |
CL https://golang.org/cl/48550 mentions this issue. |
Only one cmd/dist/test test runs at a time per builder machines. (A single build might have it tests sharded out over 6-8 machines) And if one fails, that buildlet ("machine") is never reused. So the test can clean up after itself (rename the goroot back to its original name) and any future tests would still work. So the src/cmd/dist/test.go test would do something like:
|
... and if you want to not mess with user machines, you can do it only if |
Oh, in dist we can't depend on testenv, but looks like it already uses |
Thanks. Added a test to the CL. |
Thanks! |
I had hoped that now that issue #18678 is resolved I never have to think about GOROOT again. That does not seem the case, though.
What version of Go are you using (
go version
)?go1.9beta2.linux-amd64 running on Fedora 26
What operating system and processor architecture are you using (
go env
)?What did you do?
As you can see GOROOT is set correctly by
go env
.But it seems
go build
has a different GOROOT/usr/local/go
.The text was updated successfully, but these errors were encountered: