Subject: papi: ftbfs with GCC-15

From: Matthias Klose <[email-masked]>
Date: Mon, 17 Feb 2025 17:42:25 +0000

Package: src:papi
Version: 7.1.0-5
Severity: important
Tags: sid forky
User: [email-masked]
Usertags: ftbfs-gcc-15

[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/papi_7.1.0-5_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

[...]
Host CPU component  : perf_event
Installation DESTDIR: 
make CC=cc -C sde_lib dynamic
Installation PREFIX : /usr
make -C testlib
Installation EPREFIX: /usr
cc -E -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -DFORTRANCAPS papi_fwrappers.c > upper_PAPI_FWRAPPERS.c
cc -E -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -DFORTRANUNDERSCORE papi_fwrappers.c > papi_fwrappers_.c
make[2]: Entering directory '/build/reproducible-path/papi-7.1.0/src/testlib'
cc -I. -I.. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/papi-7.1.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2  -DHAVE_ROCM_SMI -DPAPI_NUM_COMP=5 -O1  -c test_utils.c
Installation INCDIR : /usr/include
make[2]: Entering directory '/build/reproducible-path/papi-7.1.0/src/sde_lib'
Installation LIBDIR : /usr/lib/x86_64-linux-gnu
Installation BINDIR : /usr/bin
Installation MANDIR : /usr/share/man
Installation DOCDIR : /usr/share/doc/papi
Installation DATADIR: /usr/share/papi

cc -E -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/include -DFORTRANDOUBLEUNDERSCORE papi_fwrappers.c > papi_fwrappers__.c
gfortran -I. -I.. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/papi-7.1.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2   -g -O2 -ffile-prefix-map=/build/reproducible-path/papi-7.1.0=. -fstack-protector-strong -fstack-clash-protection -fcf-protection -Dlinux -ffixed-line-length-132  -c ftests_util.F
f951: Warning: ‘-Werror=’ argument ‘-Werror=implicit-function-declaration’ is not valid for Fortran
f951: Warning: command-line option ‘-Wformat=1’ is valid for C/C++/ObjC/ObjC++ but not for Fortran
f951: Warning: ‘-Werror=’ argument ‘-Werror=format-security’ is not valid for Fortran
high-level/papi_hl.c:409:12: error: conflicting types for ‘_internal_hl_read_user_events’; have ‘int(const char *)’
  409 | static int _internal_hl_read_user_events(const char *user_events)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
high-level/papi_hl.c:170:12: note: previous declaration of ‘_internal_hl_read_user_events’ with type ‘int(void)’
  170 | static int _internal_hl_read_user_events();
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile.inc:115: papi_hl.o] Error 1
make[1]: *** Waiting for unfinished jobs....
cc -I. -I.. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/papi-7.1.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2  -DHAVE_ROCM_SMI -DPAPI_NUM_COMP=5 -O1 -O0 -c do_loops.c
cc -I. -I.. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/reproducible-path/papi-7.1.0=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2  -DHAVE_ROCM_SMI -DPAPI_NUM_COMP=5 -O1  -c clockcore.c
ar  rv libtestlib.a test_utils.o ftests_util.o
ar: creating libtestlib.a
a - test_utils.o
a - ftests_util.o
make[2]: Leaving directory '/build/reproducible-path/papi-7.1.0/src/testlib'
rm -f *_d.o
make[2]: Leaving directory '/build/reproducible-path/papi-7.1.0/src/sde_lib'
ln -sf sde_lib/libsde.so.1.0 libsde.so
make CC=cc -C sde_lib static
make[2]: Entering directory '/build/reproducible-path/papi-7.1.0/src/sde_lib'
ar rs libsde.a sde_lib_s.o sde_lib_datastructures_s.o sde_lib_misc_s.o sde_lib_ti_s.o
ar: creating libsde.a
rm -f *_s.o
make[2]: Leaving directory '/build/reproducible-path/papi-7.1.0/src/sde_lib'
ln -sf sde_lib/libsde.a libsde.a
make[1]: Leaving directory '/build/reproducible-path/papi-7.1.0/src'
dh_auto_build: error: cd src && make -j8 returned exit code 2
make: *** [debian/rules:35: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2