#1097584 pigpio: ftbfs with GCC-15

Package:
src:pigpio
Source:
src:pigpio
Submitter:
Matthias Klose
Date:
2025-09-04 22:09:51 UTC
Severity:
normal
Tags:
#1097584#5
Date:
2025-02-17 17:43:44 UTC
From:
To:
[This bug is NOT targeted to the upcoming trixie release]

Please keep this issue open in the bug tracker for the package it
was filed for.  If a fix in another package is required, please
file a bug for the other package (or clone), and add a block in this
package. Please keep the issue open until the package can be built in
a follow-up test rebuild.

The package fails to build in a test rebuild on at least amd64 with
gcc-15/g++-15, but succeeds to build with gcc-14/g++-14. The
severity of this report will be raised before the forky release.

The full build log can be found at:
http://qa-logs.debian.net/2025/02/16/amd64exp/pigpio_1.78-1.1_unstable_gccexp.log.gz
The last lines of the build log are at the end of this report.

To build with GCC 15, either set CC=gcc-15 CXX=g++-15 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++

GCC 15 now defaults to the C23/C++23 standards, exposing many FTBFS.
Other Common build failures are new warnings resulting in build failures
with -Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-15/porting_to.html

[...]
      |                      ~~~~~~~~~~~~~^~~~~~ ~
pigpio.c:936:13: note: declared here
  936 |    callbk_t func;
      |             ^~~~
pigpio.c: In function ‘pthTimerTick’:
pigpio.c:6892:22: error: too many arguments to function ‘tp->func’; expected 0, have 1
 6892 |       if (tp->ex) (tp->func)(tp->userdata);
      |                   ~~~^~~~~~~ ~~~~~~~~~~~~
pigpio.c:999:13: note: declared here
  999 |    callbk_t func;
      |             ^~~~
pigpio.c: In function ‘pthISRThread’:
pigpio.c:11793:27: error: too many arguments to function ‘isr->func’; expected 0, have 4
11793 |          if (isr->ex) (isr->func)(isr->gpio, level, tick, isr->userdata);
      |                       ~~~~^~~~~~~ ~~~~~~~~~
pigpio.c:973:13: note: declared here
  973 |    callbk_t func;
      |             ^~~~
pigpio.c:11794:27: error: too many arguments to function ‘isr->func’; expected 0, have 3
11794 |          else         (isr->func)(isr->gpio, level, tick);
      |                       ~~~~^~~~~~~ ~~~~~~~~~
pigpio.c:973:13: note: declared here
  973 |    callbk_t func;
      |             ^~~~
pigpio.c: In function ‘gpioSetGetSamplesFunc’:
pigpio.c:12375:28: error: assignment to ‘callbk_t’ {aka ‘void (*)(void)’} from incompatible pointer type ‘gpioGetSamplesFunc_t’ {aka ‘void (*)(const gpioSample_t *, int)’} [-Wincompatible-pointer-types]
12375 |    gpioGetSamples.func     = f;
      |                            ^
pigpio.c:898:16: note: ‘callbk_t’ declared here
  898 | typedef void (*callbk_t) ();
      |                ^~~~~~~~
In file included from pigpio.c:67:
pigpio.h:576:16: note: ‘gpioGetSamplesFunc_t’ declared here
  576 | typedef void (*gpioGetSamplesFunc_t)   (const gpioSample_t *samples,
      |                ^~~~~~~~~~~~~~~~~~~~
pigpio.c: In function ‘gpioSetGetSamplesFuncEx’:
pigpio.c:12398:28: error: assignment to ‘callbk_t’ {aka ‘void (*)(void)’} from incompatible pointer type ‘gpioGetSamplesFuncEx_t’ {aka ‘void (*)(const gpioSample_t *, int,  void *)’} [-Wincompatible-pointer-types]
12398 |    gpioGetSamples.func     = f;
      |                            ^
pigpio.c:898:16: note: ‘callbk_t’ declared here
  898 | typedef void (*callbk_t) ();
      |                ^~~~~~~~
pigpio.h:579:16: note: ‘gpioGetSamplesFuncEx_t’ declared here
  579 | typedef void (*gpioGetSamplesFuncEx_t) (const gpioSample_t *samples,
      |                ^~~~~~~~~~~~~~~~~~~~~~
pigpio.c: In function ‘gpioSetSignalFunc’:
pigpio.c:12838:28: error: assignment to ‘callbk_t’ {aka ‘void (*)(void)’} from incompatible pointer type ‘gpioSignalFunc_t’ {aka ‘void (*)(int)’} [-Wincompatible-pointer-types]
12838 |    gpioSignal[signum].func = f;
      |                            ^
pigpio.c:898:16: note: ‘callbk_t’ declared here
  898 | typedef void (*callbk_t) ();
      |                ^~~~~~~~
pigpio.h:571:16: note: ‘gpioSignalFunc_t’ declared here
  571 | typedef void (*gpioSignalFunc_t)   (int signum);
      |                ^~~~~~~~~~~~~~~~
pigpio.c: In function ‘gpioSetSignalFuncEx’:
pigpio.c:12860:28: error: assignment to ‘callbk_t’ {aka ‘void (*)(void)’} from incompatible pointer type ‘gpioSignalFuncEx_t’ {aka ‘void (*)(int,  void *)’} [-Wincompatible-pointer-types]
12860 |    gpioSignal[signum].func = f;
      |                            ^
pigpio.c:898:16: note: ‘callbk_t’ declared here
  898 | typedef void (*callbk_t) ();
      |                ^~~~~~~~
pigpio.h:573:16: note: ‘gpioSignalFuncEx_t’ declared here
  573 | typedef void (*gpioSignalFuncEx_t) (int    signum,
      |                ^~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:48: pigpio.o] Error 1
make[1]: Leaving directory '/build/reproducible-path/pigpio-1.78'
dh_auto_build: error: make -j8 returned exit code 2
make: *** [debian/rules:10: binary] Error 255
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2