Bug 2336031 - adjtimex fails to build with GCC 15 ("adjtimex.c:1415:7: error: too many arguments to function ‘failntpdate’")
Summary: adjtimex fails to build with GCC 15 ("adjtimex.c:1415:7: error: too many argu...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: adjtimex
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: gcc-15-mass-prebuild
TreeView+ depends on / blocked
 
Reported: 2025-01-06 22:49 UTC by Dave Malcolm
Modified: 2025-01-07 10:03 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-01-07 10:03:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2025-01-06 22:49:34 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/8476065/

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

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

I see:

adjtimex.c: In function ‘log_times’:
adjtimex.c:1415:7: error: too many arguments to function ‘failntpdate’
 1415 |       failntpdate("cannot find ntpdate");
      |       ^~~~~~~~~~~
adjtimex.c:188:13: note: declared here
  188 | static void failntpdate();
      |             ^~~~~~~~~~~

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 Miroslav Lichvar 2025-01-07 10:03:14 UTC
It should be fixed now. Thanks for the report.


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