perl-5.38.2-503.fc40 fails to build in Fedora 40: gcc -c -I/usr/include -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Werror=implicit-function-declaration -Werror=implicit-int -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Werror=pointer-arith -Werror=vla -Wextra -Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings -Wno-use-after-free -g -DVERSION=\"2.204_001\" -DXS_VERSION=\"2.204_001\" -fPIC "-I../.." -DNO_VIZ -DGZIP_OS_CODE=3 -DPerl_crz_BUILD_ZLIB=0 Zlib.c [...] In file included from Zlib.xs:37: constants.h: In function ‘constant’: constants.h:580:20: error: ‘F’ undeclared (first use in this function); did you mean ‘OF’? 580 | *iv_return = ZLIBNG_VER_STATUS; | ^~~~~~~~~~~~~~~~~ constants.h:580:20: note: each undeclared identifier is reported only once for each function it appears in make[1]: Leaving directory '/builddir/build/BUILD/perl-5.38.2/cpan/Compress-Raw-Zlib' make[1]: *** [Makefile:349: Zlib.o] Error 1 A difference between passing and failing build root is at <https://koschei.fedoraproject.org/build/16898677>. This is probably triggered by upgrading from zlib-devel-1.2.13-5.fc40 to zlib-ng-compat-devel-2.1.3-7.fc40.
This is an issue in bundled Compress-Raw-Zlib, fixed probably with their upstream patch: commit 0a8fb7141a43b8e49609fb06f05fad5150a97c2a Author: pmqs <pmqs> Date: Fri Jun 9 14:30:36 2023 +0100 Change storage of ZLIBNG_VER_STATUS from IV to PV https://github.com/pmqs/Compress-Raw-Zlib/issues/24
There were PR for perl and it fixed the build. https://src.fedoraproject.org/rpms/perl/pull-request/11 The dual-life package perl-Compress-Raw-Zlib already fixed.