Skip to content
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

fix building with GCC 14 #223

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

stefantalpalaru
Copy link

Implicit function declarations are now an error, so we need to include all those missing headers: https://gcc.gnu.org/gcc-14/porting_to.html

@arch1t3cht
Copy link
Member

Thanks! Not that this is a problem, but out of interest: I have gcc 14.2.1, but none of these missing headers are errors for me. Do you know why this is? Am I missing some compiler flag? Or are these implicit declarations only errors on C, not C++?

Also, if you have the time, could you ensure the added headers are alphabetically sorted within their group? i.e. with <algorithm> coming before <limits>. If not I can do this myself before merging.

Implicit function declarations are now an error, so we need to include
all those missing headers: https://gcc.gnu.org/gcc-14/porting_to.html
@stefantalpalaru
Copy link
Author

I have gcc 14.2.1, but none of these missing headers are errors for me. Do you know why this is?

Do you have "-fpermissive" in your CXXFLAGS?

could you ensure the added headers are alphabetically sorted within their group?

Done.

@arch1t3cht
Copy link
Member

Thanks! But now that I look at this more closely, there's something fishy here. Most of the added headers are part of agi_pre.h (or agi_pre_c.h), i.e. the precompiled headers added to all main Aegisub source files. (And I'm guessing the others may be imported recursively from those) That's also why these files compile fine for me, if I remove the PCH includes, they do indeed break.

So, it seems that the real issue here is that those precompiled headers (or the headers themselves - on my machine meson compiles them into PCHs for Clang, but includes them as normal headers for gcc) aren't being properly included for you. So this could be some issue with our meson build system, or with meson itself.

@stefantalpalaru
Copy link
Author

Yes, that's it!

I'm packaging it for my Gentoo overlay and Gentoo's "meson.eclass" disables PCH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants