Bug 2336273

Summary: ags fails to build with C23 ("error: too many arguments to function 'create_packfile'")
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: agsAssignee: Dominik 'Rathann' Mierzejewski <dominik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 42CC: dominik, releng
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: ags-3.6.2.7-1.fc43 ags-3.6.2.7-1.fc42 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-27 23:59:51 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: 2260875, 2300528, 2333037    

Description Dave Malcolm 2025-01-07 23:33:48 UTC
https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora

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/8476067/

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

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

I see:

../libsrc/allegro/src/file.c: In function 'pack_fopen_vtable':
../libsrc/allegro/src/file.c:661:13: error: too many arguments to function 'create_packfile'
  661 |    if ((f = create_packfile(FALSE)) == NULL)
      |             ^~~~~~~~~~~~~~~
../libsrc/allegro/src/file.c:601:18: note: declared here
  601 | static PACKFILE *create_packfile()
      |                  ^~~~~~~~~~~~~~~

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 prototypes (or by manually adding -std=gnu17 to the C build flags)



Reproducible: Always

Comment 1 Dominik 'Rathann' Mierzejewski 2025-01-23 11:19:38 UTC
*** Bug 2339876 has been marked as a duplicate of this bug. ***

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

Comment 3 Fedora Update System 2025-02-27 23:28:32 UTC
FEDORA-2025-5a5fde9035 (ags-3.6.2.7-1.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-5a5fde9035

Comment 4 Fedora Update System 2025-02-27 23:35:28 UTC
FEDORA-2025-e7c97de888 (ags-3.6.2.7-1.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-e7c97de888

Comment 5 Fedora Update System 2025-02-27 23:59:51 UTC
FEDORA-2025-e7c97de888 (ags-3.6.2.7-1.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2025-02-28 01:10:46 UTC
FEDORA-2025-5a5fde9035 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-5a5fde9035`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-5a5fde9035

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2025-03-15 00:34:25 UTC
FEDORA-2025-5a5fde9035 (ags-3.6.2.7-1.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.