-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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/cgo: building with clang 13 errors out with unknown warning group '-Wunaligned-access'
#64943
Comments
See also #62580 which has the same error message. But the CL of my version is way out of that range that Ian mentioned in the final comment. |
The CL mentioned in #62580 was reapplied in https://go.dev/cl/528935 with an additional (What does |
Sounds like a good explanation |
Not sure if this was already obvious but just to confirm, this is not actually specific to package |
Workaround: Get a newer Clang and set the For anyone else here are some commands I have previously used to successfully build/install Clang from master on a Debian-alike system:
|
Was wondering why this isn't affecting more people - suddenly noticed the |
unknown warning group '-Wunaligned-access'
@bjackman Given that this seems to possibly related to your particular version of Clang, I'm going to optimistically close this for now. If you run into any problems with a more stable (?) version of Clang, feel free to comment. Thanks. |
Just to be clear I don't think this is a case of Clang instability, I think this is probably a genuine incompatibility between Go version 1.22 and Clang version 13.0.0. However I think it's likely nobody else will ever have that combination of versions so optimistically closing still makes sense. |
The custom generator was a workaround for golang/go#64943.
Go version
go version go1.22-20230908-RC04 cl/563875016 +2fe2f08542 X:fieldtrack,boringcrypto linux/amd64
What operating system and processor architecture are you using (
go env
)?What did you do?
What did you expect to see?
Successful build
What did you see instead?
_cgo_export.c:9:32: error: unknown warning group '-Wunaligned-access', ignored [-Werror,-Wunknown-warning-option]
Exit code 1.
In case it's not obvious - I'm a Googler and this is gLinux. I'm reporting via Github per the internal instructions. Apologies if I've misunderstood there!
The text was updated successfully, but these errors were encountered: