-
Notifications
You must be signed in to change notification settings - Fork 447
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 errors with gcc 14 #4700
Comments
This is an unfortunate regression introduced by gcc. |
An alternate (better?) fix would be to compile abseil with |
This issue was fixed in abseil upstream: abseil/abseil-cpp#1664 Also, it seems we also had workaround at #4638 |
The abseil fix seems best -- though it is really a gcc bug (IMO). Not sure which versions of gcc support the -g versions of builtins, but as long as all the versions we care about do, it should be ok. |
Yes. This is a mainline GCC bug. Fortunately, we saw it early as Fedora started to use unreleased version of gcc :) Abseil fix landed ~week ago, so it will be in the next LTS release (I hope). IIRC -g variants are supported by gcc 14 (released) and clang 19 (added llvm/llvm-project@c1c2551, will be released end July). |
Do older versions support them? I think we still care about gcc-11 at least, and perhaps gcc-9 as well. It looks like the way the abseil patch works is to use the -g variant if that is available and the -s version otherwise, and on gcc prior to 14 that works by (gcc internally) falling back to the basic int version. |
Right. They fallback to other implementations, if they are available. So, essentially:
|
Interesting, the fix is contained in the latest release, I wonder why it doesn't work for me. |
Ah I see, the workaround is only for the |
Hey,
with
gcc (GCC) 14.1.1 20240522
I see the following errors when attempting to build p4c:(and more with the same error...)
As suggested by the error, adding
add_compile_options(-mbmi)
to the main
CMakeLists.txt
fixes the issue, but I don't think that's a proper fix and I don't know what a proper fix would look like.The text was updated successfully, but these errors were encountered: