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 with modern compilers #474
Comments
This has nothing to do with modern compilers, undefined behavior, or legacy C code. You're promoting deprecation warnings in the ffmpeg API to errors. If you either stop promoting deprecations to errors, or compile against an older ffmpeg, it should compile fine. |
Please reread the compiler message. There are a number of lines marked "warning". I'm not talking about those. I'm talking about the lines surrounding this:
It's not a -Wdeprecated-declarations (none of which claim to be an error). I'm not in the habit of assaulting upstream projects by promoting deprecations to errors and threatening them to fix a deprecation. Deprecated code has plenty of reasons to exist. They just happened to be in the same file and I neglected to strip down the compilation log of that file on a per-diagnostic basis. |
Ah, ok. You should just need to remove that warning promotion then. |
That's not going to cut it. As I originally said:
So simply removing the warning promotion only buys us a couple weeks. These flags are being used to backport the GCC 14 functionality into GCC 13 by testers, to give advance warning so that we can make sure all packages will compile at all once GCC 14 is released. |
P.S. regarding If you like I can submit a PR. |
can confirm: this fix works on fedora 40 (at least the compile succeeds, had not yet found time to check the resulting binaries) |
Thanks for the fix. Consider re-filing this ticket as "closed as completed" instead of "closed as not planned". :) |
https://wiki.gentoo.org/wiki/Modern_C_porting#How_do_I_reproduce_these_bugs.3F
GCC 14 (not yet released but forthcoming) and clang 16 have started to error on invalid C code that was removed from the standard in c99 or even earlier. Historically, compilers accepted this code even though it was invalid in an effort to avoid breaking really old codebases. Due to the passing of time and an increasing understanding of just how dangerous this invalid code is, that leniency is going away.
Note that this is not cosmetic. It is undefined behavior and compilers will (increasingly) optimize it in weird and wonderful ways that break the original intention of the code. It will also obviously mean that the code cannot be built on newer systems with updated compilers.
An easy way to reproduce the problem even on older compiler versions is to build with the following *FLAGS:
Gentoo has been testing these flags in CI across the entire distro; alephone failed to build. Using the latest alephone commit (117c694), I reproduced this build error:
Original downstream report: https://bugs.gentoo.org/921027
Full build logs (against latest commit): build.log
The text was updated successfully, but these errors were encountered: