-
Notifications
You must be signed in to change notification settings - Fork 15.3k
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
Build fails on Fedora 38 with clang 16 (-Wgnu-offsetof-extensions) #13736
Comments
I have created this issue with the wrong GitHub account, sorry. If possible, please change the reporter to @mkauf . |
When compiling upb Clang will emit a warning like this: error: defining a type within '__builtin_offsetof' is a Clang extension [-Werror,-Wgnu-offsetof-extensions] As shown in issue protocolbuffers#13736, this commit fixes that error by adding the compiler flag '-Wno-gnu-offsetof-extensions' which suppreses the warning/error.
It looks like something else is happening here; if you look at the UPB_ALIGN_OF() macro definition it already has a separate definition for #ifdef clang with a different definition: It seems like the warning you're disabling is based on hitting the non-clang path with a clang compiler, is it possible your configuration is somehow using clang but without clang defined for the preprocessor? |
I think that the bug has been fixed and the issue can be closed :-) Probably I have tested with the git revision that Envoy 1.26.0 used, and not with the main branch (sorry...). That was git revision protocolbuffers/upb@e4635f2 Commit protocolbuffers/upb@896e74c removed the compiler flags "-pedantic" and "-Werror=pedantic", so the build does not fail anymore. Commit protocolbuffers/upb@21af783 fixed |
The build fails on Fedora 38 with clang 16.
.bazelrc
file to use clang:Build error:
The text was updated successfully, but these errors were encountered: