Bug 2333045 - 9wm fails to build with GCC 15 (C23 function prototype issues?)
Summary: 9wm fails to build with GCC 15 (C23 function prototype issues?)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: 9wm
Version: 42
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: gcc-15-mass-prebuild
TreeView+ depends on / blocked
 
Reported: 2024-12-18 17:02 UTC by Dave Malcolm
Modified: 2025-03-15 00:30 UTC (History)
1 user (show)

Fixed In Version: 9wm-1.4.2-5.fc42
Clone Of:
Environment:
Last Closed: 2025-03-15 00:30:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2024-12-18 17:02:52 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/build/8410923/

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

The build failure was numerous errors of the form:

menu.c:38:1: error: conflicting types for ‘button’; have ‘void(XButtonEvent *)’
   38 | button(XButtonEvent * e)
      | ^~~~~~
In file included from menu.c:14:
fns.h:58:9: note: previous declaration of ‘button’ with type ‘void(void)’
   58 | void    button();
      |         ^~~~~~
menu.c: In function ‘button’:
menu.c:46:13: error: too many arguments to function ‘getscreen’
   46 |         s = getscreen(e->root);
      |             ^~~~~~~~~
fns.h:14:13: note: declared here
   14 | ScreenInfo *getscreen();
      |             ^~~~~~~~~
menu.c:49:13: error: too many arguments to function ‘getclient’
   49 |         c = getclient(e->window, 0);
      |             ^~~~~~~~~
fns.h:74:10: note: declared here
   74 | Client  *getclient();
      |          ^~~~~~~~~

see the full log for details:
https://download.copr.fedorainfracloud.org/results/dmalcolm/gcc-15-smoketest-3/fedora-rawhide-x86_64/08410923-9wm/builder-live.log.gz

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 Tom "spot" Callaway 2025-01-07 02:37:58 UTC
https://github.com/9wm/9wm/pull/21

Comment 2 Fedora Update System 2025-02-24 21:40:10 UTC
FEDORA-2025-ec2e85abc6 (9wm-1.4.2-5.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-ec2e85abc6

Comment 3 Fedora Update System 2025-02-25 01:06:37 UTC
FEDORA-2025-ec2e85abc6 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-ec2e85abc6`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-ec2e85abc6

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

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

Comment 5 Fedora Update System 2025-03-15 00:30:01 UTC
FEDORA-2025-ec2e85abc6 (9wm-1.4.2-5.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.


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