Open dslm4515 opened 3 years ago
Looks like there is a patch for zlib-ng from OpenMandriva
https://github.com/OpenMandrivaAssociation/zlib-ng/blob/master/0001-Fix-Z_SOLO-mode.patch
Perl still fails. Only 2 of 7 errors fixed with patch.
In file included from Zlib.xs:34:
/usr/include/zlib.h:1820:13: error: unknown type name 'gzFile'
Z_EXTERN gzFile Z_EXPORT gzopen(const char *, const char *);
^
/usr/include/zlib.h:1821:45: error: unexpected type name 'off_t': expected identifier
Z_EXTERN z_off_t Z_EXPORT gzseek(gzFile, z_off_t, int);
^
/usr/include/zconf.h:159:21: note: expanded from macro 'z_off_t'
# define z_off_t off_t
^
In file included from Zlib.xs:34:
/usr/include/zlib.h:1821:54: error: expected identifier
Z_EXTERN z_off_t Z_EXPORT gzseek(gzFile, z_off_t, int);
^
/usr/include/zlib.h:1822:37: error: a parameter list without types is only allowed in a function definition
Z_EXTERN z_off_t Z_EXPORT gztell(gzFile);
^
/usr/include/zlib.h:1823:39: error: a parameter list without types is only allowed in a function definition
Z_EXTERN z_off_t Z_EXPORT gzoffset(gzFile);
^
449 warnings and 5 errors generated.
make[1]: *** [Makefile:348: Zlib.o] Error 1
make[1]: Leaving directory '/sources/perl-5.34.0/cpan/Compress-Raw-Zlib'
Unsuccessful make(cpan/Compress-Raw-Zlib): code=512 at make_ext.pl line 584.
make: *** [makefile:575: lib/auto/Compress/Raw/Zlib/Zlib.so] Error 2
For now, will allow Perl to use it's bundled zlib source:
# Ensure that we never accidentally bundle bzip2
rm -rf cpan/Compress-Raw-Bzip2/bzip2-src
sed -i '/\bzip2\-src/d' MANIFEST
Build successful without these commands. 😄 https://github.com/dslm4515/CMLFS/blob/9ff93739462b3f75406f26c707ad819c28648975/3-chroot/042-perl#L10-L13
Without those commands, perl builds with the bundled bzip2 and zlib source in the perl source.
I assume LFS forced perl to not use the bundled sources (zlib & bzip2) in case those bundled sources are out of date.
Main issue is incompatible zlib-ng headers causes the Compress-Raw-Zlib
perl module to not compile... I can't find anyone who has built perl with zlib-ng.
I do not have enough programming experience to fix the Compress-Raw-Zlib` perl module source to work with zlib-ng
Confusing ..
Normally when building a system from source, one would rather use the freshly built libraries than a package's bundled 3rd-party library source.
The perl source has bundled copies of the sourcecode for bzip2 and zlib. This is handy if building perl on a system that may not have bzip2 or zlib installed. Otherwise, its like compiling zlib and bzip2 twice: once for the system and again for perl.
Looks like zlib-ng (with zlib-compat) isn't compatible with perl?
Perl fails to build: