Bug 2336012

Summary: a2ps fails to build with GCC 15 ("error: conflicting types for 'yyprint'; have 'void(FILE *, int, YYSTYPE)'")
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: a2psAssignee: Zdenek Dohnal <zdohnal>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: sipoyare, twaugh, zdohnal
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: a2ps-4.15.6-3.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-17 09:22:58 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 22:11:56 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/8476055/

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

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

parseppd.y:157:1: error: conflicting types for 'yyprint'; have 'void(FILE *, int,  YYSTYPE)'
  157 | yyprint (FILE *file, int type, YYSTYPE value)
      | ^~~~~~~
parseppd.y:53:13: note: previous declaration of 'yyprint' with type 'void(void)'
   53 | static void yyprint ();
      |             ^~~~~~~

This is probably due to GCC 15 now defaulting to -std=gnu23, whereas GCC 14 defaulted to -std=gnu17, and C23 is stricter about function prototypes than C17.  It's probably fixable by fixing the function prototype (or by manually adding -std=gnu17 to the C build flags)


Reproducible: Always

Comment 1 Zdenek Dohnal 2025-01-13 17:42:47 UTC
Hi Dave,

I've tried to reproduce the build failure with your steps from https://fedoraproject.org/wiki/User:Dmalcolm/gcc-15#Trying_it_yourself , but the mockbuild fails when installing the buildroot, because it includes old libtool which was built with old gcc, which conflicts with the new one.

Can you update your copr project to include rebuilt libtool?

Comment 3 Siddhesh Poyarekar 2025-01-15 16:40:19 UTC
The mass rebuild will start today with the new gcc15, so hopefully it'll be easier to reproduce and fix.

Comment 4 Fedora Update System 2025-01-17 09:18:25 UTC
FEDORA-2025-7b4cc24b44 (a2ps-4.15.6-3.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-7b4cc24b44

Comment 5 Fedora Update System 2025-01-17 09:22:58 UTC
FEDORA-2025-7b4cc24b44 (a2ps-4.15.6-3.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.