paulgazz / kmax

A collection of analysis tools for Kconfig and Kbuild constraints.
42 stars 21 forks source link

Compilation on Arch Linux only with GCC 13 #272

Open 6b6279 opened 3 months ago

6b6279 commented 3 months ago

It looks like Kmax cannot be compiled with GCC 14, which is the default version of GCC on Arch Linux (Ubuntu hasn't switched to GCC 14 yet, the default GCC version is still 13.2.0). Without explicitly setting CC=/usr/bin/gcc-13, pipx install kmax fails on Arch Linux, despite working just fine until the release of GCC 14. Maybe the README file could be updated to include a warning about the required GCC version? It'd, in general, help all who are trying to compile/install Kmax on a non-Ubuntu distro.

paulgazz commented 3 months ago

Hi @6b6279 thanks for letting me know. I'll put a warning with the setting for Arch (I've also got some Fedora instructions that I need to incorporate).

Ideally, I'd like the repo to build with gcc14 eventually too.

6b6279 commented 3 months ago

Looks like the issue is mainly caused by GCC 14 "upgrading" few warnings to errors, such as implicit integer return types: https://gcc.gnu.org/gcc-14/porting_to.html#warnings-as-errors

I can try forking the last release and adapt the code for GCC 14, then I would submit a merge request.

paulgazz commented 3 months ago

@6b6279 That would be very helpful! At the very least, there may be flags that disable the additional warnings, though that's more of a temporary fix.