-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime: bad GOROOT in 1.9rc1 #21313
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
We could argue that it works as documented, but until now this scenario was impossible because Go refused to start altogether. |
I've marked this to be fixed in 1.10. Basically I think it's going to be an unfortunate problem in 1.9. |
It would be possible to fix this by setting GOROOT in cmd/go for |
@fjl But that would only fix |
Maybe only fixing |
FYI - Travis CI is a build tool, and normally you'd add Go 1.9 in the test matrix as a line in the file like this:
The last line currently fails. Users have to (first) discover the problem - compiling packages in the standard library fails - and then Google around until they find the solution, which is to add these additional lines to the configuration:
It's possible Travis can do some custom work on their end. But at the moment this is going to be a problem for people trying to set up CI for their Go packages. |
See travis-ci/travis-build#1148 + travis-ci/travis-ci#8177 |
Ah, you are correct, thanks! |
New gimme was deployed to Travis-CI. |
Setting the value of As How about passing the value to the linker as I'm happy to try implementing this. |
In fact, if we convert runtime/internal/sys.DefaultGoroot from a |
Change https://golang.org/cl/61310 mentions this issue: |
It looks like gimme fixed it. Issue being tracked on golang/go#21313.
If I unpack Go 1.8.3 to a custom location, I either need to set the correct
GOROOT
, or it will fail to start.Go 1.9rc1 does not have this "limitation" any more and even correctly detects its custom
GOROOT
:However, the
runtime.GOROOT()
method still defaults to theGOROOT
environmental variable (with the build-path fallback if the env var cannot be found). This is a problem, because it produces runtime issues on systems where Go is not located at the correct path (such as currently Travis).The text was updated successfully, but these errors were encountered: