-
Notifications
You must be signed in to change notification settings - Fork 769
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
Saving (with automatic build) a new .go file results in "/usr/local/go/pkg/darwin_amd64/runtime/cgo.a: permission denied" #568
Comments
To explain what's going on here to anyone not following the related issues:
I don't think there's a good reason for vscode-go to use the |
Available workaround is to set But if the analysis in microsoft/vscode-go#2836 is still true, |
I don't think anything has changed in recent Go releases that would make It's possible that we've gotten pickier about when cgo packages need to be rebuilt. They should be rebuilt whenever their cache key changes, and small things like upgrading the C compiler or changing flags could trigger that. |
Change https://golang.org/cl/251263 mentions this issue: |
Just set "go.installDependenciesWhenBuilding": false in VsCode settings. Will be fixed soon. |
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gogo version go1.15 darwin/amd64
code -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders1.48.1 3dd905126b34dcd4de81fa624eb3a8cbe7485f13 x64
v0.16.1
go env
to get the go development environment detailsShare the Go related settings you have added/edited
Describe the bug
On MacOS, after having installed Go 1.15 from the official package and having configured PATH etc... if you try to create a new Go app with VSCode and auto build kick in (as it should), you get an error mentioning
"/usr/local/go/pkg/darwin_amd64/runtime/cgo.a: permission denied"
I originally commented this bug golang/go#37962 but they mentioned this happens because VSCode Go extension still uses the
-i
option.I was able to workaround the problem by running this
sudo chown -R andrea /usr/local/go/pkg/darwin_amd64/
but I think it would be nice if this issue didn't happen at all.Steps to reproduce the behavior:
package main
(note: if yougo build .
the code compiles just fine).Screenshots or recordings
Related issues
The text was updated successfully, but these errors were encountered: