Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 803626 - dev-lang/perl-5.34.0 compilation fails with zlib-ng
Summary: dev-lang/perl-5.34.0 compilation fails with zlib-ng
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-07-24 04:21 UTC by Bogdan
Modified: 2024-04-17 07:43 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
log: emerge --info (emerge-info.txt,9.97 KB, text/plain)
2021-07-24 04:37 UTC, Bogdan
Details
log: build.log (buil.log,282.45 KB, text/x-log)
2021-07-24 04:38 UTC, Bogdan
Details
log: emerge -pv zlib-ng (emerge-pv-zlib-ng.log,365 bytes, text/x-log)
2021-07-24 04:40 UTC, Bogdan
Details
log: build.log (build.log,264.01 KB, text/x-log)
2021-07-24 14:49 UTC, Bogdan
Details
log: build.log (build.log,264.01 KB, text/x-log)
2021-07-24 14:50 UTC, Bogdan
Details
log: build.log (build.log,239.34 KB, text/x-log)
2021-07-24 14:56 UTC, Bogdan
Details
Patch for perl 5.34.0 to allow system-zlib use flag (perl-5.34.0.ebuild.patch,981 bytes, patch)
2021-07-28 08:20 UTC, Bogdan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bogdan 2021-07-24 04:21:46 UTC
I switch my system from zlib to zlib-ng.

Compilation of perl-5.34.0 and newer version 5.34.0-r1 fails with an error:

> x86_64-pc-linux-gnu-gcc  -shared -march=znver2 -O2 -pipe -Wl,-O1 -Wl,--as-needed -fuse-linker-plugin  DosGlob.o  -o ../../lib/auto/File/DosGlob/DosGlob.so  \
>       \
> 
> chmod 644 "Util.bs"
> 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);
>       |                                   ^~~~~~

Instructions for switching system from zlib to zlib-ng:
1) Install zlib-ng package:
  USE="-compat" emerge sys-apps/zlib-ng
2) Remove zlib package from system:
  emerge -C sys-apps/zlib
3) Rebuild zlib-ng as replacement for zlib:
  USE="compat" emerge -1 sys-apps/zlib-ng
4) Apply permanent "compat" use flag for zlib-ng:
  echo "sys-apps/zlib-ng compat" >> /etc/portage/package.use/custom
5) Mark zlib-ng as system package:
  echo "*sys-apps/zlib-ng" >> /etc/portage/profile/packages
6) Mark as installed last installed version of zlib package:
(this needs for packages, which require sys-libs/zlib as dependency)
  echo "sys-libs/zlib-1.2.11-r4" >> /etc/portage/profile/package.provided
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-07-24 04:24:00 UTC
Please include:
- emerge --info
- build.log
- emerge -pv zlib-ng
for these.

I'm still not sure how we're going to go about supporting this, to be honest. I also wonder if everything got applied correctly if the gzFile typedef is missing. That seems.. odd, but I haven't got zlib-ng installed here.
Comment 2 Bogdan 2021-07-24 04:36:08 UTC
As a solution to the problem - I want to compile perl with the zlib library inside (perl uses the local zlib library, not the system-wide one).

For example - by "system-zlib" use flag.
If use flag "system-zlib" is deactivated - then perl compilation use source of zlib library from system-wide sys-libs/zlib package.
If use flag "system-zlib" is activated - then perl compilation use source of zlib library from local copy of sys-libs/zlib package.
Comment 3 Bogdan 2021-07-24 04:37:27 UTC
Created attachment 726277 [details]
log: emerge --info
Comment 4 Bogdan 2021-07-24 04:38:22 UTC
Created attachment 726280 [details]
log: build.log
Comment 5 Bogdan 2021-07-24 04:40:05 UTC
Created attachment 726283 [details]
log: emerge -pv zlib-ng
Comment 6 Bogdan 2021-07-24 04:52:35 UTC
Compilation with local zlib library - is an easy way and the first thought I imagine.
If there is another way to compile perl with zlib-ng - I will only be glad.
Comment 7 Bogdan 2021-07-24 14:49:16 UTC
Created attachment 726532 [details]
log: build.log

build.log without color codes
Comment 8 Bogdan 2021-07-24 14:50:16 UTC
Created attachment 726535 [details]
log: build.log

build.log without color codes
Comment 9 Bogdan 2021-07-24 14:56:35 UTC
Created attachment 726538 [details]
log: build.log

build.log really without color codes
Comment 10 Bogdan 2021-07-28 08:20:33 UTC
Created attachment 727488 [details, diff]
Patch for perl 5.34.0 to allow system-zlib use flag

This patch allow to use system-zlib use flag.

This flag allow to compile zlib library from perl source code, not from system-wide sys-libs/zlib library.

This use flag needs for compiling perl in systems, where sys-libs/zlib library changed to sys-libs/zlib-ng. At now, perl can not be compiled with zlib-ng.