Bug 2336013 - a52dec fails to build with GCC 15 ("error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types]")
Summary: a52dec fails to build with GCC 15 ("error: passing argument 2 of 'signal' fro...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: a52dec
Version: 42
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nicolas Chauvet (kwizart)
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: gcc-15-mass-prebuild
TreeView+ depends on / blocked
 
Reported: 2025-01-06 22:16 UTC by Dave Malcolm
Modified: 2025-05-15 21:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-05-15 21:11:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2025-01-06 22:16:16 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/8476056/

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

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

a52dec.c: In function ‘print_fps’:
a52dec.c:82:25: error: passing argument 2 of ‘signal’ from incompatible pointer type [-Wincompatible-pointer-types]
   82 |         signal (SIGINT, signal_handler);
      |                         ^~~~~~~~~~~~~~
      |                         |
      |                         int (*)(int)
In file included from a52dec.c:32:
/usr/include/signal.h:88:57: note: expected ‘__sighandler_t’ {aka ‘void (*)(int)’} but argument is of type ‘int (*)(int)’
   88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler)
      |                                          ~~~~~~~~~~~~~~~^~~~~~~~~

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 Aoife Moloney 2025-02-26 13:21:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 2 Nicolas Chauvet (kwizart) 2025-05-15 21:11:12 UTC
Was fixed by running autoreconf


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