-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
doc: document race detector cgo requirements #51235
Comments
@ianlancetaylor How about this doc? RequirementsThe race detector require cgo and support the os/arch below:
|
I would keep the list inline, also "s" missing on the verb, my proposal:
|
Thank you @ALTree I was under the impression that it didn't need cgo on all platforms, but if it's helpful to mention that it does! |
Change https://go.dev/cl/386454 mentions this issue: |
The race detector doc doesn't state cgo, the content is basically as ALTree suggested in issue 51235. Fixes golang/go#51235 Change-Id: I03356c01f4542e69a02c712063afb77ae68cc90f Reviewed-on: https://go-review.googlesource.com/c/website/+/386454 Reviewed-by: DO NOT USE <[email protected]> Trust: Dmitri Shuralyov <[email protected]>
Could anyone please explain why this was working perfectly on Windows with |
As far as I can tell using the race detector has required cgo on Windows for several releases. What does |
@ianlancetaylor I could pass So this works:
This doesn't:
But w/o
Despite this fancy trick everything worked until |
I don't know why |
Initially I found this was mentioned here: #27089 (comment)
|
OK, so forcing the rebuild demonstrates the problem even if you use |
Thanks Ian, it makes sense (at least on my setup (I was going mad)). I had a project that I compiled on go 1.17 and I've just now started on a new project in VS code and I had different behaviour until tonight when I rebuilt the old binary. Now it keeps failing as mention. I had passed a flag for the test environment which is Thanks a lot for this issue. I will install gcc now. |
Guys, I'm a Windows user and I still have this problem with the recent versions of Go (1.20.5; 1.20.3). An attempt to run the race detector leads to:
So I'm having a proposal: could you add a hint for Windows users, mentioning this issue on the download page and explaining what this CGO is and how to install it? |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Use goreleaser to create multi-platform release. Amongst others, goreleaser executes:
What did you expect to see?
Sucess
What did you see instead?
I would like to request documenting the cgo requirements per platform as part of https://go.dev/doc/articles/race_detector.
The text was updated successfully, but these errors were encountered: