From owner-freebsd-ports-bugs@freebsd.org Sun May 1 08:35:12 2016 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EC080B28BD6 for ; Sun, 1 May 2016 08:35:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB31314DA for ; Sun, 1 May 2016 08:35:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u418ZCvb055735 for ; Sun, 1 May 2016 08:35:12 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 209173] lang/perl5.22: port build has inappropriate use of -Wl, -R/usr/local/lib/perl5/5.22/mach/CORE before the update libperl.so.5.22.2 is there to use Date: Sun, 01 May 2016 08:35:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: perl@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 May 2016 08:35:13 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209173 Bug ID: 209173 Summary: lang/perl5.22: port build has inappropriate use of -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE before the update libperl.so.5.22.2 is there to use Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: perl@FreeBSD.org Reporter: markmi@dsl-only.net Assignee: perl@FreeBSD.org Flags: maintainer-feedback?(perl@FreeBSD.org) [Mostly take from https://lists.freebsd.org/pipermail/freebsd-ports/2016-May/103059.html but simplified/shortened. ] When building lang/perl5.22 for 5.22.2 . . . The following happens when /usr/local/lib/perl5/5.22/mach/CORE does not yet exist or does yet have any libperl.so* files: --- perl --- /usr/bin/clang -target armv6--freebsd11.0-gnueabi -march=3Darmv7-a -mcpu=3Dcortex-a7 -mfloat-abi=3Dsoftfp -mno-unaligned-access -o perl -lpthr= ead -Wl,-E -fstack-protector-strong -L/usr/local/lib -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE perlmain.o libperl.so.5.22.2 `cat ext.libs` -lpthread -lm -lcrypt -lutil --- MANIFEST.srt --- --- extras.make --- --- MANIFEST.srt --- Shared object "libperl.so.5.22" not found, required by "perl" WARNING: re-sorting MANIFEST Shared object "libperl.so.5.22" not found, required by "perl" *** [MANIFEST.srt] Error code 1 make[2]: stopped in /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.= 22.2 By contrast when /usr/local/lib/perl5/5.22/mach/CORE/libperl.so.5.22.1 is in place (and libperl.so and libperl.so.5.22 reference it) the following happe= ns: --- pod/perltoc.pod --- LD_LIBRARY_PATH=3D/usr/obj/portswork/usr/ports/lang/perl5.22/work/perl\-5.2= 2.2=20 ./perl -Ilib -f pod/buildtoc -q pod/buildtoc: Perl lib version (5.22.2) doesn't match executable '/usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.22.2/perl' version (5.22.1) at lib/Config.pm line 62. Compilation failed in require at lib/locale.pm line 4. BEGIN failed--compilation aborted at lib/locale.pm line 4. Compilation failed in require at pod/buildtoc line 10. BEGIN failed--compilation aborted at pod/buildtoc line 10. *** [pod/perltoc.pod] Error code 255 make[2]: stopped in /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.= 22.2 1 error This last happens because: # /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.22.2/perl --version This is perl 5, version 22, subversion 1 (v5.22.1) built for powerpc-freebsd-thread-multi That in turn happened from linking against the wrong libperl.so or libperl.so.5.22 : an older vintage is linked to. Both of the above cases trace back to the following sorts of uses of -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE notation: (from the build's log, = note how "-o perl" uses -Wl,-R so ld will do the -R style of linking): rm -f libperl.so.5.22.2 /usr/local/bin/gcc49 -o libperl.so.5.22.2 -shared -L/usr/local/lib -fstack-protector-strong -Wl,-soname,libperl.so.5.22 op.o perl.o gv.o toke= .o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro_core.o keywords.o h= v.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regex= ec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o caretx.o DynaLoader.o -lpthread -lm -lcrypt -lutil /usr/local/bin/gcc49 -o perl -lpthread -Wl,-E -fstack-protector-strong -L/usr/local/lib -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE perlmain.o=20 libperl.so.5.22.2 `cat ext.libs` -lpthread -lm -lcrypt -lutil And were does the -Wl,-R notation come from?: # find /usr/obj/portswork/usr/ports/lang/perl5.22/ -exec grep Wl,-R {} \; -print | more . . . (most are omitted but some interesting ones follow) . . . -L*|-R*|-Wl,-R*) xxx=3D"-Wl,-R$shrpdir" /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.22.2/Configure.orig -L*|-R*|-Wl,-R*) xxx=3D"-Wl,-R$shrpdir" /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.22.2/Configure.bak ccdlflags=3D' -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE' /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.22.2/config.sh CCDLFLAGS =3D -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.22.2/Makefile dlsrc=3Ddl_dlopen.xs, dlext=3Dso, d_dlsymun=3Dundef, ccdlflags=3D'=20 -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE' /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.22.2/myconfig CCDLFLAGS =3D -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.22.2/makefile CCDLFLAGS =3D -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.22.2/makefile.old For FreeBSD the use of the notation -Wl,-R/usr/local/lib/perl5/5.22/mach/CO= RE (as seen in the log file) is also odd for the "does not exist yet" case bec= ause of the dual use of -R in ld for FreeBSD: if the -R option is followed by a directory name, rather than a file name, it is treated as the -rpath option So which interpretation does -R get when /usr/local/lib/perl5/5.22/mach/CORE does not exist yet because 5.22 has yet to even be created in /usr/local/. = . .? /usr/local/lib/perl5/5.22/mach/CORE is then neither a directory nor a named file that can supply symbols. /usr/local/lib/perl5/5.22/mach/CORE will not have appropriate material to u= se until some point during the install step: not even the staging step is enou= gh context for that path to find the right vintage of files. During the build's linking it is too early to be using -Wl,-R/usr/local/lib/perl5/5.22/mach/CO= RE . --=20 You are receiving this mail because: You are the assignee for the bug.=