Bug 2258753

Summary: perl-5.38.2-503.fc40 FTBFS: constants.h:580:20: error: ‘F’ undeclared
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: perlAssignee: Jitka Plesnikova <jplesnik>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: iarnell, jplesnik, kasal, mmaslano, mspacek, perl-devel, ppisar, psabata, rhughes, spotrh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://koschei.fedoraproject.org/package/perl
Whiteboard:
Fixed In Version: perl-5.38.2-504.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-01-17 13:14:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2231791    

Description Petr Pisar 2024-01-17 09:02:16 UTC
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.

Comment 1 Petr Pisar 2024-01-17 09:27:04 UTC
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

Comment 2 Jitka Plesnikova 2024-01-17 12:24:20 UTC
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.