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
runtime/cgo: unknown warning option '-Wno-nullability-completeness' #49913
Comments
That flag comes from here: It was apparently added for #35247 (CC @ianlancetaylor @tklauser). |
One thing isn't clear to me, though: why isn't this failure showing up on the Go project's own Big Sur builders? I wonder if this is a regression in between macOS 11.0 (Nov. 17, 2020) and 11.6 (Sept. 13, 2021) — perhaps we haven't upgraded our builder images to track the current minor releases. (CC @golang/release) |
@KeeganRen, what version of the XCode toolchain do you have installed? (What does |
Change https://golang.org/cl/368634 mentions this issue: |
Why is the compiler in the original report using |
According to https://clang.llvm.org/docs/DiagnosticsReference.html#wunknown-warning-option, |
Hi, Boss @bcmills clang --versionclang version 3.5.0 llvm-g++ --versionApple clang version 13.0.0 (clang-1300.0.29.3) |
Clang 3.5 was released in 2014. How did you come to have that installed alongside a modern 13.0.0 |
now I use clang13, it's ok. thanks. |
CL 205457 added the flag -Wno-nullability-completeness to work around a user-reported build breakage on macOS Catalina. However, according to https://golang.org/issue/35247#issuecomment-589115489 the root cause of the breakage may be a toolchain misconfiguration on the host (perhaps compiling the XCode stdlib using a Homebrew build of the "clang" compiler?). Adding an obscure warning flag to enable building stdlib.h with an otherwise-broken toolchain seems clearly inappropriate to me. If need be we can instead provide guidance to users on how to unbreak their toolchain. Updates #35247 Fixes #49913 Change-Id: I84def34e101bed7911d8d78a991a29095b8791fa Reviewed-on: https://go-review.googlesource.com/c/go/+/368634 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Bryan Mills <bcmills@google.com> Auto-Submit: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@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?
My OS is macOS Big Sur 11.6,when i use go build:
go build
runtime/cgo
error: unknown warning option '-Wno-nullability-completeness'; did you mean '-Wno-delete-incomplete'? [-Werror,-Wunknown-warning-option]
I don‘t known how to solve this problem。
The text was updated successfully, but these errors were encountered: