Bug 2336047
| Summary: | aubit4gl fails to compile with GCC 15 / C23 ("json.c:435:6: error: conflicting types for 'json_validate'; have 'int(const char *)'") | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Dave Malcolm <dmalcolm> |
| Component: | aubit4gl | Assignee: | Stansoft <rpm> |
| Status: | CLOSED RAWHIDE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | jakub, josmyers, rpm, sipoyare |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2025-01-17 13:13:47 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 2333037 | ||
|
Description
Dave Malcolm
2025-01-06 23:07:39 UTC
The error is with function json_validate, which is only found in header aubit4glsrc/incl/a4gl_libaubit4gl.h and aubit4glsrc/lib/libaubit4gl/json.c source file. I can make a change to the source, what change do you think is needed to fix this? E.g. compilers/xgen/main.c fprintf(hsf,"#ifndef bool\n"); fprintf (hsf, "#define bool int\n"); fprintf(hsf,"#endif\n"); is not correct for C23, in C23 bool is a keyword, not a macro, and shouldn't be redefined. You could perhaps use fprintf(hsf,"#if !defined(bool) && __STDC_VERSION__ < 202311L\n"); instead of the first line. Ditto compilers/xgen_new/dump.c. lib/extra_libs/infx_dump_screen/fgl_prtscr.c then has #define bool char instead. The code changes have been made upstream. Does it compile using this source rpm now with GCC 15? https://download.copr.fedorainfracloud.org/results/stansoft/aubit4gl/fedora-rawhide-x86_64/08499618-aubit4gl/aubit4gl-1.6.1.p5-1.fc42.src.rpm You can try yourself... fedpkg build --scratch --target=f42-build-side-103300 It builds successfully with GCC 15 using: fedpkg build --scratch --target=f42-build-side-103300 This passed the mass rebuild: https://koji.fedoraproject.org/koji/buildinfo?buildID=2617358 |