Skip Menu |
Report information
Id: 132771
Status: open
Priority: 0/
Queue: perl5

Owner: Nobody
Requestors: d.newsgroups [at] gmail.com
Cc:
AdminCc:

Operating System: (no value)
PatchStatus: (no value)
Severity: medium
Type: core
Perl Version: 5.26.1
Fixed In: (no value)



To: perlbug <perlbug [...] perl.org>
Date: Fri, 26 Jan 2018 10:53:25 +0100
From: Dominic Jänichen <d.newsgroups [...] gmail.com>
Subject: perl5 erroneously links in libcl on linux
Download (untitled) / with headers
text/plain 12.3k
This is a bug report for perl from d.newsgroups@gmail.com, generated with the help of perlbug 1.40 running under perl 5.26.1. ----------------------------------------------------------------- [Please describe your issue here] perls "Configuration" has "cl" in its libswanted. Here, libcl.so exists and is provided by beignet (OpenCL implementation for Intel GPU): $ ls -l /usr/lib64/libcl.so lrwxrwxrwx 1 root root 43 13. Okt 16:29 /usr/lib64/libcl.so -> OpenCL/vendors/beignet/lib/beignet/libcl.so 1) perl should not depend on this library, it pulls in a lot of other stuff: $ ldd miniperl linux-vdso.so.1 (0x00007ffcb276f000) libcl.so => /usr/lib64/OpenCL/vendors/beignet/libcl.so (0x00007f043ce0e000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f043c89b000) libnsl.so.2 => /usr/lib64/libnsl.so.2 (0x00007f043c680000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f043c47c000) libm.so.6 => /lib64/libm.so.6 (0x00007f043c134000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f043befc000) libutil.so.1 => /lib64/libutil.so.1 (0x00007f043bcf9000) libc.so.6 => /lib64/libc.so.6 (0x00007f043b935000) librt.so.1 => /lib64/librt.so.1 (0x00007f043b72d000) libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007f043b524000) libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007f043b305000) libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f043afa9000) libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f043ad93000) libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007f043ab8d000) libdrm_intel.so.1 => /usr/lib64/libdrm_intel.so.1 (0x00007f043a962000) libdrm.so.2 => /usr/lib64/libdrm.so.2 (0x00007f043a74e000) libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007f043a4cb000) libEGL.so.1 => /usr/lib64/libEGL.so.1 (0x00007f043a28e000) libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux- gnu/7.2.0/libstdc++.so.6 (0x00007f0439e8a000) libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux- gnu/7.2.0/libgcc_s.so.1 (0x00007f0439c73000) /lib64/ld-linux-x86-64.so.2 (0x00007f043cccd000) libtirpc.so.3 => /lib64/libtirpc.so.3 (0x00007f0439a46000) libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f043983e000) libbsd.so.0 => /usr/lib64/libbsd.so.0 (0x00007f0439622000) libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f04393f7000) libpciaccess.so.0 => /usr/lib64/libpciaccess.so.0 (0x00007f04391ed000) libz.so.1 => /lib64/libz.so.1 (0x00007f0438fce000) libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f0438d8f000) libxcb-dri3.so.0 => /usr/lib64/libxcb-dri3.so.0 (0x00007f0438b8c000) libxcb-xfixes.so.0 => /usr/lib64/libxcb-xfixes.so.0 (0x00007f0438984000) libxcb-present.so.0 => /usr/lib64/libxcb-present.so.0 (0x00007f0438781000) libxcb-sync.so.1 => /usr/lib64/libxcb-sync.so.1 (0x00007f043857a000) libxshmfence.so.1 => /usr/lib64/libxshmfence.so.1 (0x00007f0438378000) libglapi.so.0 => /usr/lib64/libglapi.so.0 (0x00007f0438147000) libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007f0437f44000) libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1 (0x00007f0437d42000) libxcb-glx.so.0 => /usr/lib64/libxcb-glx.so.0 (0x00007f0437b26000) libxcb-dri2.so.0 => /usr/lib64/libxcb-dri2.so.0 (0x00007f0437921000) libXxf86vm.so.1 => /usr/lib64/libXxf86vm.so.1 (0x00007f043771b000) libwayland-client.so.0 => /usr/lib64/libwayland-client.so.0 (0x00007f043750c000) libgbm.so.1 => /usr/lib64/libgbm.so.1 (0x00007f0437303000) libwayland-server.so.0 => /usr/lib64/libwayland-server.so.0 (0x00007f04370ef000) libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f0436eeb000) libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007f0436ce5000) libffi.so.6 => /usr/lib64/libffi.so.6 (0x00007f0436adb000) 2) perl compiles and installs. However, if run as a restricted (non-X- )user, the additional dependencies (beignet) complain and print "No protocol specified" to stderr. This for example breaks ExtUtils::MakeMaker: in find_perl ExtUtils/MM_Unix.pm:1133: my $version_check = qq{"/usr/bin/perl" -le "require $ver; print qq{VER_OK}"}; ExtUtils/MM_Unix.pm:1144: close STDERR if $stderr_duped; ExtUtils/MM_Unix.pm:1145: $val = `$version_check`; on my machine, the call to perl with libcl.so dependency returns with $?=0 but without output. Commenting the "close STDERR" solves this issue in most cases. (However I was not able to build perl itself with this modification: the test call never finishes.) Maybe this is a separate issue but highlights side-effects. 3) removing "cl" from libswanted results in perl with $ ldd perl linux-vdso.so.1 (0x00007ffcbbd5b000) libperl.so.5.26 => /usr/lib64/libperl.so.5.26 (0x00007fdb48923000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fdb48703000) libnsl.so.2 => /usr/lib64/libnsl.so.2 (0x00007fdb484e8000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fdb482e4000) libm.so.6 => /lib64/libm.so.6 (0x00007fdb47f9c000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fdb47d64000) libutil.so.1 => /lib64/libutil.so.1 (0x00007fdb47b61000) libc.so.6 => /lib64/libc.so.6 (0x00007fdb4779d000) /lib64/ld-linux-x86-64.so.2 (0x00007fdb48b69000) libtirpc.so.3 => /lib64/libtirpc.so.3 (0x00007fdb47570000) See also perl bug #131485 reported against freebsd. [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=medium --- Site configuration information for perl 5.26.1: Configured by Gentoo at Tue Nov 14 17:30:09 CET 2017. Summary of my perl5 (revision 5 version 26 subversion 1) configuration: Platform: osname=linux osvers=4.13.11-gentoo archname=x86_64-linux-thread-multi uname='linux dj 4.13.11-gentoo #1 smp preempt fri nov 10 15:53:56 cet 2017 x86_64 intel(r) core(tm) i5-3320m cpu @ 2.60ghz genuineintel gnulinux ' config_args='-des -Dinstallprefix=/usr -Dinstallusrbinperl=n -Ui_xlocale -Di_ndbm -Di_gdbm -Di_db -Dusethreads -DDEBUGGING=-g -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dnoextensions=ODBM_File -Duseshrplib -Darchname=x86_64-linux-thread -Dcc=x86_64-pc-linux-gnu- gcc -Doptimize=-pipe -frecord-gcc-switches -fuse-linker-plugin -mtune=native -march=native -fomit-frame-pointer -fstack-protector- strong -O2 -flto -fno-delete-null-pointer-checks -ggdb -fno-strict- aliasing -Dldflags=-pipe -frecord-gcc-switches -fuse-linker-plugin -mtune=native -march=native -fomit-frame-pointer -fstack-protector- strong -O2 -flto -fno-delete-null-pointer-checks -ggdb -fno-strict- aliasing -Dprefix=/usr -Dsiteprefix=/usr/local -Dvendorprefix=/usr -Dscriptdir=/usr/bin -Dprivlib=/usr/lib64/perl5/5.26.1 -Darchlib=/usr/lib64/perl5/5.26.1/x86_64-linux-thread-multi -Dsitelib=/usr/local/lib64/perl5/5.26.1 -Dsitearch=/usr/local/lib64/perl5/5.26.1/x86_64-linux-thread-multi -Dvendorlib=/usr/lib64/perl5/vendor_perl/5.26.1 -Dvendorarch=/usr/lib64/perl5/vendor_perl/5.26.1/x86_64-linux-thread- multi -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dvendorman1dir=/usr/share/man/man1 -Dvendorman3dir=/usr/share/man/man3 -Dman1ext=1 -Dman3ext=3pm -Dlibperl=libperl.so.5.26.1 -Dlocincpth=/usr/include -Dglibpth=/lib64 /usr/lib64 -Duselargefiles -Dd_semctl_semun -Dcf_by=Gentoo -Dmyhostname=localhost -Dperladmin=root @localhost -Ud_csh -Dsh=/bin/sh -Dtargetsh=/bin/sh -Uusenm -Ui_xlocale -Di_ndbm -Di_gdbm -Di_db -Dusethreads -DDEBUGGING=-g -Dlibpth=/usr/local/lib64 /lib64 /usr/lib64 -Dnoextensions=ODBM_File' hint=recommended useposix=true d_sigaction=define useithreads=define usemultiplicity=define use64bitint=define use64bitall=define uselongdouble=undef usemymalloc=n default_inc_excludes_dot=define bincompat5005=undef Compiler: cc='x86_64-pc-linux-gnu-gcc' ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' optimize='-pipe -frecord-gcc-switches -fuse-linker-plugin -mtune=native -march=native -fomit-frame-pointer -fstack-protector- strong -O2 -flto -fno-delete-null-pointer-checks -ggdb -fno-strict- aliasing' cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe' ccversion='' gccversion='7.2.0' gccosandvers='' intsize=4 longsize=8 ptrsize=8 doublesize=8 byteorder=12345678 doublekind=3 d_longlong=define longlongsize=8 d_longdbl=define longdblsize=16 longdblkind=3 ivtype='long' ivsize=8 nvtype='double' nvsize=8 Off_t='off_t' lseeksize=8 alignbytes=8 prototype=define Linker and Libraries: ld='x86_64-pc-linux-gnu-gcc' ldflags ='-pipe -frecord-gcc-switches -fuse-linker-plugin -mtune=native -march=native -fomit-frame-pointer -fstack-protector- strong -O2 -flto -fno-delete-null-pointer-checks -ggdb -fno-strict- aliasing' libpth=/usr/local/lib64 /lib64 /usr/lib64 /usr/lib/gcc/x86_64-pc- linux-gnu/7.2.0/include-fixed /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib libs=-lcl -lpthread -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat perllibs=-lcl -lpthread -ldl -lm -lcrypt -lutil -lc libc=libc-2.26.so so=so useshrplib=true libperl=libperl.so.5.26.1 gnulibc_version='2.26' Dynamic Linking: dlsrc=dl_dlopen.xs dlext=so d_dlsymun=undef ccdlflags='-Wl,-E' cccdlflags='-fPIC' lddlflags='-shared -pipe -frecord-gcc-switches -fuse-linker-plugin -mtune=native -march=native -fomit-frame-pointer -fstack-protector- strong -O2 -flto -fno-delete-null-pointer-checks -ggdb -fno-strict- aliasing -pipe -frecord-gcc-switches -fuse-linker-plugin -mtune=native -march=native -fomit-frame-pointer -fstack-protector-strong -O2 -flto -fno-delete-null-pointer-checks -ggdb -fno-strict-aliasing' Locally applied patches: gentoo/hints_hpux - Fix hpux hints gentoo/aix_soname - aix gcc detection and shared library soname support gentoo/EUMM-RUNPATH - https://bugs.gentoo.org/105054 cpan/ExtUtils- MakeMaker: drop $PORTAGE_TMPDIR from LD_RUN_PATH gentoo/config_over - Remove -rpath and append LDFLAGS to lddlflags gentoo/opensolaris_headers - Add headers for opensolaris gentoo/patchlevel - List packaged patches for perl-5.26.1-r1(#1) in patchlevel.h gentoo/cleanup-paths - Cleanup PATH and shrpenv gentoo/enc2xs - Tweak enc2xs to follow symlinks and ignore missing @INC directories. gentoo/darwin-cc-ld - https://bugs.gentoo.org/297751 darwin: Use $CC to link gentoo/cpan_definstalldirs - Provide a sensible INSTALLDIRS default for modules installed from CPAN. gentoo/interix - Fix interix hints gentoo/create_libperl_soname - https://bugs.gentoo.org/286840 Set libperl soname gentoo/mod_paths - Add /etc/perl to @INC gentoo/EUMM_perllocalpod - cpan/ExtUtils-MakeMaker: remove targets that generate perllocal.pod gentoo/drop_fstack_protector - https://bugs.gentoo.org/348557 Don't force -fstack-protector on everyone gentoo/usr_local - Configure: Don't include sources in /usr/local/ for compiling perl gentoo/D-SHA-CFLAGS - https://bugs.gentoo.org/506818 Do not set custom CFLAGS in cpan/Digest-SHA gentoo/io_socket_ip_tests - cpan/IO-Socket-IP: Disable network tests gentoo/tests - Fix EUMM podlocal tests debian/cpan-missing-site-dirs - Fix CPAN::FirstTime defaults with nonexisting site dirs if a parent is writable debian/makemaker-pasthru - Pass LD settings through to subdirectories fixes/memoize_storable_nstore - [rt.cpan.org #77790] Memoize::Storable: respect 'nstore' option not respected fixes/podman-pipe - Better errors for man pages from standard input fixes/respect_umask - Respect umask during installation fixes/net_smtp_docs - [rt.cpan.org #36038] Document the Net::SMTP 'Port' option fixes/document_makemaker_ccflags - [rt.cpan.org #68613] Document that CCFLAGS should include $Config{ccflags} fixes/parallel-manisort.patch - Fix parallel building --- @INC for perl 5.26.1: /etc/perl /usr/local/lib64/perl5/5.26.1/x86_64-linux-thread-multi /usr/local/lib64/perl5/5.26.1 /usr/lib64/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.26.1 /usr/lib64/perl5/5.26.1/x86_64-linux-thread-multi /usr/lib64/perl5/5.26.1 --- Environment for perl 5.26.1: HOME=/home/dominic LANG=en_US.utf8 LANGUAGE (unset) LC_MEASUREMENT=de_DE.utf8 LC_MONETARY=de_DE.utf8 LC_NUMERIC=de_DE.utf8 LC_PAPER=de_DE.utf8 LC_TIME=de_DE.utf8 LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/x86_64-pc-linux-gnu/gcc-bin/7.2.0:/usr/x86_64-pc-linux- gnu/m68k-elf/gcc- bin/7.2.0:/usr/lib/llvm/5/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin PERL_BADLANG (unset) SHELL=/bin/bash
RT-Send-CC: perl5-porters [...] perl.org
Download (untitled) / with headers
text/plain 5.4k
On Fri, 26 Jan 2018 09:53:39 GMT, d.newsgroups@gmail.com wrote: Show quoted text
> This is a bug report for perl from d.newsgroups@gmail.com, > generated with the help of perlbug 1.40 running under perl 5.26.1. > > > ----------------------------------------------------------------- > [Please describe your issue here] > > perls "Configuration" has "cl" in its libswanted. > Here, libcl.so exists and is provided by beignet (OpenCL implementation > for Intel GPU): > > $ ls -l /usr/lib64/libcl.so > lrwxrwxrwx 1 root root 43 13. Okt 16:29 /usr/lib64/libcl.so -> > OpenCL/vendors/beignet/lib/beignet/libcl.so > > 1) perl should not depend on this library, it pulls in a lot of other > stuff: > > $ ldd miniperl > linux-vdso.so.1 (0x00007ffcb276f000) > libcl.so => /usr/lib64/OpenCL/vendors/beignet/libcl.so > (0x00007f043ce0e000) > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f043c89b000) > libnsl.so.2 => /usr/lib64/libnsl.so.2 (0x00007f043c680000) > libdl.so.2 => /lib64/libdl.so.2 (0x00007f043c47c000) > libm.so.6 => /lib64/libm.so.6 (0x00007f043c134000) > libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007f043befc000) > libutil.so.1 => /lib64/libutil.so.1 (0x00007f043bcf9000) > libc.so.6 => /lib64/libc.so.6 (0x00007f043b935000) > librt.so.1 => /lib64/librt.so.1 (0x00007f043b72d000) > libSM.so.6 => /usr/lib64/libSM.so.6 (0x00007f043b524000) > libICE.so.6 => /usr/lib64/libICE.so.6 (0x00007f043b305000) > libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007f043afa9000) > libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007f043ad93000) > libXfixes.so.3 => /usr/lib64/libXfixes.so.3 > (0x00007f043ab8d000) > libdrm_intel.so.1 => /usr/lib64/libdrm_intel.so.1 > (0x00007f043a962000) > libdrm.so.2 => /usr/lib64/libdrm.so.2 (0x00007f043a74e000) > libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007f043a4cb000) > libEGL.so.1 => /usr/lib64/libEGL.so.1 (0x00007f043a28e000) > libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux- > gnu/7.2.0/libstdc++.so.6 (0x00007f0439e8a000) > libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux- > gnu/7.2.0/libgcc_s.so.1 (0x00007f0439c73000) > /lib64/ld-linux-x86-64.so.2 (0x00007f043cccd000) > libtirpc.so.3 => /lib64/libtirpc.so.3 (0x00007f0439a46000) > libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f043983e000) > libbsd.so.0 => /usr/lib64/libbsd.so.0 (0x00007f0439622000) > libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007f04393f7000) > libpciaccess.so.0 => /usr/lib64/libpciaccess.so.0 > (0x00007f04391ed000) > libz.so.1 => /lib64/libz.so.1 (0x00007f0438fce000) > libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f0438d8f000) > libxcb-dri3.so.0 => /usr/lib64/libxcb-dri3.so.0 > (0x00007f0438b8c000) > libxcb-xfixes.so.0 => /usr/lib64/libxcb-xfixes.so.0 > (0x00007f0438984000) > libxcb-present.so.0 => /usr/lib64/libxcb-present.so.0 > (0x00007f0438781000) > libxcb-sync.so.1 => /usr/lib64/libxcb-sync.so.1 > (0x00007f043857a000) > libxshmfence.so.1 => /usr/lib64/libxshmfence.so.1 > (0x00007f0438378000) > libglapi.so.0 => /usr/lib64/libglapi.so.0 (0x00007f0438147000) > libXdamage.so.1 => /usr/lib64/libXdamage.so.1 > (0x00007f0437f44000) > libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1 > (0x00007f0437d42000) > libxcb-glx.so.0 => /usr/lib64/libxcb-glx.so.0 > (0x00007f0437b26000) > libxcb-dri2.so.0 => /usr/lib64/libxcb-dri2.so.0 > (0x00007f0437921000) > libXxf86vm.so.1 => /usr/lib64/libXxf86vm.so.1 > (0x00007f043771b000) > libwayland-client.so.0 => /usr/lib64/libwayland-client.so.0 > (0x00007f043750c000) > libgbm.so.1 => /usr/lib64/libgbm.so.1 (0x00007f0437303000) > libwayland-server.so.0 => /usr/lib64/libwayland-server.so.0 > (0x00007f04370ef000) > libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007f0436eeb000) > libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007f0436ce5000) > libffi.so.6 => /usr/lib64/libffi.so.6 (0x00007f0436adb000) > > > 2) perl compiles and installs. However, if run as a restricted (non-X- > )user, the additional dependencies (beignet) complain and print "No > protocol specified" to stderr. This for example breaks > ExtUtils::MakeMaker: > in find_perl > ExtUtils/MM_Unix.pm:1133: my $version_check = > qq{"/usr/bin/perl" -le "require $ver; print qq{VER_OK}"}; > ExtUtils/MM_Unix.pm:1144: close STDERR if > $stderr_duped; > ExtUtils/MM_Unix.pm:1145: $val = `$version_check`; > on my machine, the call to perl with libcl.so dependency > returns with $?=0 but without output. Commenting the "close STDERR" > solves this issue in most cases. (However I was not able to build perl > itself with > this modification: the test call never finishes.) > Maybe this is a separate issue but highlights side-effects. > > 3) removing "cl" from libswanted results in perl with > > $ ldd perl > linux-vdso.so.1 (0x00007ffcbbd5b000) > libperl.so.5.26 => /usr/lib64/libperl.so.5.26 > (0x00007fdb48923000) > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fdb48703000) > libnsl.so.2 => /usr/lib64/libnsl.so.2 (0x00007fdb484e8000) > libdl.so.2 => /lib64/libdl.so.2 (0x00007fdb482e4000) > libm.so.6 => /lib64/libm.so.6 (0x00007fdb47f9c000) > libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fdb47d64000) > libutil.so.1 => /lib64/libutil.so.1 (0x00007fdb47b61000) > libc.so.6 => /lib64/libc.so.6 (0x00007fdb4779d000) > /lib64/ld-linux-x86-64.so.2 (0x00007fdb48b69000) > libtirpc.so.3 => /lib64/libtirpc.so.3 (0x00007fdb47570000) > > See also perl bug #131485 reported against freebsd. > >
Can you try to build Perl 5 in this environment from the source code in the smoke-me/jkeenan/131485-cl branch? Thank you very much. -- James E Keenan (jkeenan@cpan.org)


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org