zlib-ng: 2.0.5: perl Compress-Raw-Zlib module build fails
Looks like it is some inccmpatibility beteen zlib and zlib-ng.
I cannot build Compress-Raw-Zlib perl module against system installed zlib-ng
(no problem with zlib).
Git repo of the module https://github.com/pmqs/Compress-Raw-Zlib/
Log of building rpom package:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.8Y6nie
+ umask 022
+ cd /home/tkloczko/rpmbuild/BUILD
+ cd /home/tkloczko/rpmbuild/BUILD
+ rm -rf Compress-Raw-Zlib-2.103
+ /usr/bin/tar -xof -
+ /usr/bin/gzip -dc /home/tkloczko/rpmbuild/SOURCES/Compress-Raw-Zlib-2.103.tar.gz
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd Compress-Raw-Zlib-2.103
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/rm -rf zlib-src
+ RPM_EC=0
++ jobs -p
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.uyWk4U
+ umask 022
+ cd /home/tkloczko/rpmbuild/BUILD
+ cd Compress-Raw-Zlib-2.103
+ CFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -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 -fdata-sections -ffunction-sections -flto=auto -flto-partition=none'
+ CXXFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -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 -fdata-sections -ffunction-sections -flto=auto -flto-partition=none'
+ FFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -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 -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -I/usr/lib64/gfortran/modules'
+ FCFLAGS='-O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -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 -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -I/usr/lib64/gfortran/modules'
+ LDFLAGS='-Wl,-z,relro -Wl,--as-needed -Wl,--gc-sections -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -flto=auto -flto-partition=none -fuse-linker-plugin -Wl,--build-id=sha1'
+ CC=/usr/bin/gcc
+ CXX=/usr/bin/g++
+ FC=/usr/bin/gfortran
+ AR=/usr/bin/gcc-ar
+ NM=/usr/bin/gcc-nm
+ RANLIB=/usr/bin/gcc-ranlib
+ export CFLAGS CXXFLAGS FFLAGS FCFLAGS LDFLAGS CC CXX FC AR NM RANLIB
+ OLD_ZLIB=False
+ BUILD_ZLIB=False
+ ZLIB_LIB=/usr/lib64
+ ZLIB_INCLUDE=/usr/include
+ /usr/bin/perl Makefile.PL INSTALLDIRS=vendor 'OPTIMIZE= ' NO_PACKLIST=1 NO_PERLLOCAL=1
Parsing config.in...
Auto Detect Gzip OS Code..
Setting Gzip OS Code to 3 [Unix/Default]
Looks Good.
Up/Downgrade not needed.
Checking if your kit is complete...
Warning: the following files are missing in your kit:
zlib-src/adler32.c
zlib-src/compress.c
zlib-src/crc32.c
zlib-src/crc32.h
zlib-src/deflate.c
zlib-src/deflate.h
zlib-src/infback.c
zlib-src/inffast.c
zlib-src/inffast.h
zlib-src/inffixed.h
zlib-src/inflate.c
zlib-src/inflate.h
zlib-src/inftrees.c
zlib-src/inftrees.h
zlib-src/trees.c
zlib-src/trees.h
zlib-src/uncompr.c
zlib-src/zconf.h
zlib-src/zlib.h
zlib-src/zutil.c
zlib-src/zutil.h
Please inform the author.
Generating a Unix-style Makefile
Writing Makefile for Compress::Raw::Zlib
Writing MYMETA.yml and MYMETA.json
+ /usr/bin/make -O -j48 V=1 VERBOSE=1
Running Mkbootstrap for Zlib ()
chmod 644 "Zlib.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Zlib.bs blib/arch/auto/Compress/Raw/Zlib/Zlib.bs 644
cp lib/Compress/Raw/Zlib.pm blib/lib/Compress/Raw/Zlib.pm
"/usr/bin/perl" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp" -typemap '/usr/share/perl5/ExtUtils/typemap' -typemap '/home/tkloczko/rpmbuild/BUILD/Compress-Raw-Zlib-2.103/typemap' Zlib.xs > Zlib.xsc
mv Zlib.xsc Zlib.c
gcc -c -I/usr/include -D_REENTRANT -D_GNU_SOURCE -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -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 -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DVERSION=\"2.103\" -DXS_VERSION=\"2.103\" -fPIC "-I/usr/lib64/perl5/CORE" -DNO_VIZ -DZ_SOLO -DGZIP_OS_CODE=3 -DUSE_PPPORT_H Zlib.c
In file included from Zlib.xs:34:
/usr/include/zlib.h:1781:31: error: unknown type name 'gzFile'
1781 | Z_EXTERN int Z_EXPORT gzgetc_(gzFile file); /* backward compatibility */
| ^~~~~~
/usr/include/zlib.h:1791:13: error: unknown type name 'gzFile'
1791 | Z_EXTERN gzFile Z_EXPORT gzopen64(const char *, const char *);
| ^~~~~~
/usr/include/zlib.h:1792:48: error: expected ')' before 'off64_t'
1792 | Z_EXTERN z_off64_t Z_EXPORT gzseek64(gzFile, z_off64_t, int);
| ^
| )
/usr/include/zlib.h:1840:35: error: unknown type name 'gzFile'
1840 | Z_EXTERN int Z_EXPORTVA gzvprintf(gzFile file, const char *format, va_list va);
| ^~~~~~
In file included from Zlib.xs:743:
constants.h: In function 'constant':
constants.h:370:18: warning: assignment to 'IV' {aka 'long int'} from 'void *' makes integer from pointer without a cast [-Wint-conversion]
370 | *iv_return = Z_NULL;
| ^
make: *** [Makefile:348: Zlib.o] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.uyWk4U (%build)
The sam esituation is when perl is build (which have bundled that module) https://github.com/Perl/perl5/issues/19566
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 21 (10 by maintainers)
@mtl1979 I don’t think that is true in this case. It seems like this Makefile.PL tries to compile the zlib sourcefiles by name directly instead of using Makefile or CMakeFiles.txt from zlib/zlib-ng.