-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: handle space in path to C compiler #43808
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
This comment has been minimized.
This comment has been minimized.
I'm not sure this is the same as #41400 although it could be related. |
@apmckinlay sorry for missing that it started with Then this looks due to the security fix in #43785 |
@AlexRouSg That's what I was assuming |
After reading the patches ... it looks like it sets the So it does look like fixing #41400 would fix this too. Tho I'm not too sure what route it would eventually take. |
Apologies. The workaround is to use c:\progra~1 in your path for now. |
@rsc No worries, thanks. |
Imagining a new user downloading fresh go version and bumping into inability to compile anything that requires "cgo" |
@rsc This is a release blocker and doesn't have an assignee right now. Are you planning to work on it, or should someone else? Thanks. |
I can take a look at this. I was able to reproduce it on macOS by the way. It looks like it's an issue with spaces in the This will likely need to be backported, so I'd rather not attempt a complete fix for #41400 yet. |
@jayconrod, if the alternative approach in #41400 (comment) doesn't work out, another interim mitigation on Windows in particular might be to use |
Change https://golang.org/cl/285873 mentions this issue: |
It looks like the alternative approach works out. It just means we revert CL 284780. That was part of the security fix, but it was a "belt and suspenders" fix, and we still have the belt: |
@gopherbot Please backport to 1.14 and 1.15. This was a regression. |
Backport issue(s) opened: #43859 (for 1.14), #43860 (for 1.15). Remember to create the cherry-pick CL(s) as soon as the patch is submitted to master, according to https://golang.org/wiki/MinorReleases. |
What version of Go are you using (
go version
)?What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
What did you expect to see?
Successful build
What did you see instead?
It builds successfully on 1.15.6 (and 1.16beta1)
I cut my path down to:
In particular, mingw-w64 is in c:\program files
I think that was the default, but I can't remember for sure.
Cmd finds g++ using this path
The text was updated successfully, but these errors were encountered: