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

cmd/go: misleading message CGO_ENABLED=0 with -msan says go run: -race requires cgo #21895

Closed
odeke-em opened this issue Sep 14, 2017 · 1 comment
Milestone

Comments

@odeke-em
Copy link
Member

What did you do?

$ CGO_ENABLED=0 go run -msan main.go  

What did you expect to see?

go run: -msan requires cgo; enable cgo by setting CGO_ENABLED=1

What did you see instead?

go run: -race requires cgo; enable cgo by setting CGO_ENABLED=1

I noticed this while reading through @rsc's CL https://go-review.googlesource.com/c/go/+/63917. It is a simple oversight in which we just need to check which is being ran -race or -msan which both require cgo. The code to update is in cmd/go/internal/work/build.go. CL coming shortly.

@odeke-em odeke-em self-assigned this Sep 14, 2017
@odeke-em odeke-em added this to the Go1.10 milestone Sep 14, 2017
@gopherbot
Copy link

Change https://golang.org/cl/63930 mentions this issue: cmd/go: correctly report that -msan needs CGO_ENABLED=1

@golang golang locked and limited conversation to collaborators Sep 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants