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
net: "cgoAvailable redeclared in this block" when using "-tags:netgo", Windows and go 1.21rc2 #61153
Comments
Thanks for the report, there is a issue with build tags after CL 487196 |
This issue also applies to plan9:
|
Change https://go.dev/cl/507636 mentions this issue: |
Change https://go.dev/cl/507655 mentions this issue: |
I just also met this issue on Linux, doing cross-compile with
Error:
|
@shenwei356 it is already fixed on gotip |
We were building it for Windows, although Windows code never calls any of these functions. When using -tags netgo that cause a multiple definition of cgoAvailable. Fixes golang#61153 Change-Id: Ib9e1de7720a8c0dacd6f12002917bf305dfa5405 Reviewed-on: https://go-review.googlesource.com/c/go/+/507655 Reviewed-by: Damien Neil <dneil@google.com> Auto-Submit: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
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?
Compiled with:
What did you expect to see?
No error.
What did you see instead?
The text was updated successfully, but these errors were encountered: