svn commit: r414355: perl5 5.22.2 build broken, at least on powerpc64, powerpc, arm; e.g.: . . ./lang/perl5.22/work/perl-5.22.2/perl --version reports 5.22.1 ; more

Mark Millard markmi at dsl-only.net
Sun May 1 06:33:34 UTC 2016


[Trying MAKE_JOBS_UNSAFE=yes did not change the below, other than the detailed order. The text quoted from the logs are mostly the originals with -j4 in use.]

As of /usr/ports -r414369 attempting to update perl5.22 to perl5.22.2 from 5.22.1 produces a perl executable that says it is 5.22.1, which results in:

> --- pod/perltoc.pod ---
> LD_LIBRARY_PATH=/usr/obj/portswork/usr/ports/lang/perl5.22/work/perl\-5.22.2  ./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 was using portmaster.)

> # /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
> 
> Copyright 1987-2015, Larry Wall
> 
> Perl may be copied only under the terms of either the Artistic License or the
> GNU General Public License, which may be found in the Perl 5 source kit.
> 
> Complete documentation for Perl, including FAQ lists, should be found on
> this system using "man perl" or "perldoc perl".  If you have access to the
> Internet, point your browser at http://www.perl.org/, the Perl Home Page.

An oddity of the command sequence shown in the logs is the -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE use for the "-o perl" related command before that area has any chance of installing 5.22.2: when down under under /usr/obj/portswork/usr/ports/lang/perl5.22/work/. . .

> 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 hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pa
> ck.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  libperl.so.5.22.2 `cat ext.libs` -lpthread -lm -lcrypt -l
> util

For FreeBSD the use of the notation -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE (as seen in the log file) is odd because 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

For the "gcc49 -o perl" -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE is used but references a directory the contents of which have old 5.22.1 files, such as (for the powerpc64 and powerpc example contexts in my case):

> # ls -l /usr/local/lib/perl5/5.22/mach/CORE/libperl.so*
> lrwxr-xr-x  1 root  wheel       17 Apr 23 22:40 /usr/local/lib/perl5/5.22/mach/CORE/libperl.so -> libperl.so.5.22.1
> lrwxr-xr-x  1 root  wheel       17 Apr 23 22:40 /usr/local/lib/perl5/5.22/mach/CORE/libperl.so.5.22 -> libperl.so.5.22.1
> -r--r--r--  1 root  wheel  5379880 Apr 23 22:38 /usr/local/lib/perl5/5.22/mach/CORE/libperl.so.5.22.1

(This was powerpc64 using gcc49. For powerpc I used gcc5 but the "gcc5 -o perl" got the same sort of result.)

Looking around with find and grep shows various uses of -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE notation:

> # 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="-Wl,-R$shrpdir"
> /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.22.2/Configure.orig
>                 -L*|-R*|-Wl,-R*)
>                 xxx="-Wl,-R$shrpdir"
> /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.22.2/Configure.bak
> ccdlflags='  -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 =   -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=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -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 =   -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 =   -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


Supporting Details. . .

> # svnlite info /usr/ports
> Path: /usr/ports
> Working Copy Root Path: /usr/ports
> URL: https://svn0.us-west.freebsd.org/ports/head
> Relative URL: ^/head
> Repository Root: https://svn0.us-west.freebsd.org/ports
> Repository UUID: 35697150-7ecd-e111-bb59-0022644237b5
> Revision: 414369
> Node Kind: directory
> Schedule: normal
> Last Changed Author: mm
> Last Changed Rev: 414369
> Last Changed Date: 2016-04-30 15:14:07 -0700 (Sat, 30 Apr 2016)

The same sort of thing is seen on both of the below (powerpc64 and powerpc of different 11.0-CURRENT vintages):

> # uname -aKU
> FreeBSD FBSDG5C0 11.0-CURRENT FreeBSD 11.0-CURRENT #32 r298518M: Sat Apr 23 20:01:08 PDT 2016     root at FBSDG5C0:/usr/obj/xtoolchain/powerpc.powerpc64/usr/src/sys/GENERIC64vtsc-NODEBUG  powerpc 1100106 1100106


> # uname -aKU
> FreeBSD FBSDG4C1 11.0-CURRENT FreeBSD 11.0-CURRENT #9 r297048M: Sat Mar 19 17:33:56 PDT 2016     markmi at FreeBSDx64:/usr/obj/clang_gcc421/powerpc.powerpc/usr/src/sys/GENERICvtsc-NODEBUG  powerpc 1100103 1100103

For the powerpc64 context (using gcc49):

> # more /etc/make.conf 
> DEFAULT_VERSIONS+=perl5=5.22
> WRKDIRPREFIX=/usr/obj/portswork
> WITH_DEBUG=
> WITH_DEBUG_FILES=
> MALLOC_PRODUCTION=
> CC=/usr/local/bin/gcc49
> CXX=/usr/local/bin/g++49
> CPP=/usr/local/bin/cpp49
> CROSS_BINUTILS_PREFIX=/usr/local/powerpc64-portbld-freebsd11.0/bin/
> AS=/usr/local/powerpc64-portbld-freebsd11.0/bin/as
> AR=/usr/local/powerpc64-portbld-freebsd11.0/bin/ar
> LD=/usr/local/powerpc64-portbld-freebsd11.0/bin/ld
> NM=/usr/local/powerpc64-portbld-freebsd11.0/bin/nm
> OBJCOPY=/usr/local/powerpc64-portbld-freebsd11.0/bin/objcopy
> OBJDUMP=/usr/local/powerpc64-portbld-freebsd11.0/bin/objdump
> RANLIB=/usr/local/powerpc64-portbld-freebsd11.0/bin/ranlib
> SIZE=/usr/local/powerpc64-portbld-freebsd11.0/bin/size
> #NO-SUCH: STRINGS=/usr/local/powerpc64-portbld-freebsd11.0/bin/strings
> STRINGS=/usr/local/bin/strings

For the powerpc context (using gcc5):

> # more /etc/make.conf 
> DEFAULT_VERSIONS+=perl5=5.22
> WRKDIRPREFIX=/usr/obj/portswork
> WITH_DEBUG=
> WITH_DEBUG_FILES=
> MALLOC_PRODUCTION=
> CC=/usr/local/bin/gcc5
> CXX=/usr/local/bin/g++5
> CPP=/usr/local/bin/cpp5
> CROSS_BINUTILS_PREFIX=/usr/local/powerpc64-portbld-freebsd11.0/bin/
> AS=/usr/local/powerpc64-portbld-freebsd11.0/bin/as
> AR=/usr/local/powerpc64-portbld-freebsd11.0/bin/ar
> LD=/usr/local/powerpc64-portbld-freebsd11.0/bin/ld
> NM=/usr/local/powerpc64-portbld-freebsd11.0/bin/nm
> OBJCOPY=/usr/local/powerpc64-portbld-freebsd11.0/bin/objcopy
> OBJDUMP=/usr/local/powerpc64-portbld-freebsd11.0/bin/objdump
> RANLIB=/usr/local/powerpc64-portbld-freebsd11.0/bin/ranlib
> SIZE=/usr/local/powerpc64-portbld-freebsd11.0/bin/size
> #NO-SUCH: STRINGS=/usr/local/powerpc64-portbld-freebsd11.0/bin/strings
> STRINGS=/usr/local/bin/strings



Another oddity that I expect also traces back to -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE use . . .

When I try to build perl5.22 for the first time ever (in a rpi2 armv7a context as it happens) the attempt results in:

> --- perl ---
> /usr/bin/clang -target armv6--freebsd11.0-gnueabi -march=armv7-a -mcpu=cortex-a7 -mfloat-abi=softfp -mno-unaligned-access -o perl -lpthread -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

Reminder: For FreeBSD the use of the notation -Wl,-R/usr/local/lib/perl5/5.22/mach/CORE (as seen in the log file) is odd because 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 name that can supply symbols.

But in contexts where the directory /usr/local/lib/perl5/5.22/mach/CORE already exists and contains a older libperl.so.5.22 beforehand (such as it referencing libperl.so.5.22.1 ) it does not get the specific not-found errors at this point because it then uses the older libperl.so.5.22 instead.

> # ls -l /usr/local/lib/perl5/5.22/mach/CORE/libperl.so*
> lrwxr-xr-x  1 root  wheel       17 Apr 23 22:40 /usr/local/lib/perl5/5.22/mach/CORE/libperl.so -> libperl.so.5.22.1
> lrwxr-xr-x  1 root  wheel       17 Apr 23 22:40 /usr/local/lib/perl5/5.22/mach/CORE/libperl.so.5.22 -> libperl.so.5.22.1
> -r--r--r--  1 root  wheel  5379880 Apr 23 22:38 /usr/local/lib/perl5/5.22/mach/CORE/libperl.so.5.22.1

This was the type of context for the powerpc64 and powerpc examples noted earlier. Again: this appears to trace back to what the earlier find-with-grep showed:

> 
> # 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="-Wl,-R$shrpdir"
> /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.22.2/Configure.orig
>                 -L*|-R*|-Wl,-R*)
>                 xxx="-Wl,-R$shrpdir"
> /usr/obj/portswork/usr/ports/lang/perl5.22/work/perl-5.22.2/Configure.bak
> ccdlflags='  -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 =   -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=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='  -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 =   -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 =   -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


===
Mark Millard
markmi at dsl-only.net



More information about the svn-ports-head mailing list