Bug 2336026 - abcm2ps fails to build with GCC 15/C23 ("int bool;")
Summary: abcm2ps fails to build with GCC 15/C23 ("int bool;")
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: abcm2ps
Version: 42
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Stuart D Gathman
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: gcc-15-mass-prebuild
TreeView+ depends on / blocked
 
Reported: 2025-01-06 22:31 UTC by Dave Malcolm
Modified: 2025-04-12 19:54 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-04-12 19:54:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2025-01-06 22:31:37 UTC
I'm experimentally rebuilding rawhide with the not-yet-released GCC 15 to see if anything breaks, and to help write the porting guide.  See https://fedoraproject.org/wiki/User:Dmalcolm/gcc-15

My test build with GCC 15 failed:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed/build/8476059/

whereas my test build with GCC 14 succeeded:
https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed.checker/build/8477617/

Looking at the failure logs e.g.
https://download.copr.fedorainfracloud.org/results/dmalcolm/gcc-15-smoketest-3.failed/fedora-rawhide-x86_64/08476059-abcm2ps/builder-live.log.gz
I see:

format.c: In function 'interpret_fmt_line'
format.c:1161:29: error: two or more data types in declaration specifiers
 1161 |                         int bool;
      |                             ^~~~
format.c:1161:25: warning: useless type name in empty declaration
 1161 |                         int bool;
      |                         ^~~

This is probably due to GCC 15 now defaulting to -std=gnu23, whereas GCC 14 defaulted to -std=gnu17: 'bool' is a keyword in C23.  It's probably fixable by renaming this variable (or by manually adding -std=gnu17 to the C build flags)


Reproducible: Always

Comment 1 Aoife Moloney 2025-02-26 13:21:25 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 2 Stuart D Gathman 2025-04-08 04:33:48 UTC
In working on this, I discovered there is a much more complete man page: https://manpages.ubuntu.com/manpages/trusty/man1/abcm2ps.1.html

I wonder where the source is?

Comment 3 Stuart D Gathman 2025-04-12 19:54:23 UTC
Release with a patch to rename bool -> ibool already released.  Forgot to select the bug to be closed.


Note You need to log in before you can comment on or make changes to this bug.