Gentoo Archives: gentoo-alt

From: Konstantin Tokarev <annulen@××××××.ru>
To: "gentoo-alt@l.g.o" <gentoo-alt@l.g.o>
Subject: Re: [gentoo-alt] OS X Yosemite XCode 7.0 bootstrap fails on stage3 perl
Date: Fri, 09 Oct 2015 21:54:44
Message-Id: 1568021444427678@web25m.yandex.ru
In Reply to: [gentoo-alt] OS X Yosemite XCode 7.0 bootstrap fails on stage3 perl by "Gibson
1 09.10.2015, 21:46, "Gibson, John" <jgibson@×××××.org>:
2 > Hi fellow Alters,
3 >
4 > I just went through bootstrapping again on OS X after installing XCode 7.0 command line tools. Stage 3 Perl died with a linker error, after some tweaking of the makefile to get verbose errors out of clang's linker I got roughly this:
5 >
6 > clang version 3.5.2 (tags/RELEASE_352/final)
7 > Target: x86_64-apple-darwin14.5.0
8 > Thread model: posix
9 > š"/Library/Gentoo/usr/bin/ld" -demangle -dynamic -dylib -dylib_compatibility_version 5.22.0 -dylib_current_version 5.22.0 -arch x86_64 -dylib_install_name /Library/Gentoo/usr/lib/perl5/5.22.0/x86_64-darwin/CORE/libperl.5.22.dylib -macosx_version_min 10.5.0 -o libperl.5.22.0.dylib -ldylib1.10.5.o -dead_strip_dylibs 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_pack.o pp_sort.o caretx.o DynaLoader.o -lpthread -ldl -lm -lutil -lc -lSystem -lgcc_s.10.5 /Library/Gentoo/usr/bin/../lib/clang/3.5.2/lib/darwin/libclang_rt.osx.a
10 > ld: library not found for -lgcc_s.10.5
11 > x86_64-apple-darwin14-clang-3.5.2: error: linker command failed with exit code 1 (use -v to see invocation)
12 > GNUmakefile:354: recipe for target 'libperl.5.22.0.dylib' failed
13 > make: *** [libperl.5.22.0.dylib] Error 1
14 >
15 > AFAICT Apple has started dropping support for older releases, and the default build for perl tries to target 10.3. With some experiments I determined that 10.6 is the lowest version number that I could use to build perl successfully. I hacked up the ebuild to apply this patch:
16 > diff -wur perl-5.22.0.orig/hints/darwin.sh perl-5.22.0/hints/darwin.sh
17 > --- perl-5.22.0.orig/hints/darwin.sh 2015-10-09 12:55:55.000000000 -0400
18 > +++ perl-5.22.0/hints/darwin.sh 2015-10-09 13:39:44.000000000 -0400
19 > @@ -206,7 +206,7 @@
20 > ššššlddlflags="${ldflags} -bundle -undefined dynamic_lookup"
21 > ššššcase "$ld" in
22 > šššššššš*MACOSX_DEVELOPMENT_TARGET*) ;;
23 > - *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
24 > + *) ld="env MACOSX_DEPLOYMENT_TARGET=10.6 ${ld}" ;;
25 > ššššesac
26 > šššš;;
27 > šesac
28 >
29 > Which works, but would obviously break stuff for anyone still targeting 10.5 or earlier (do we still have PPC Prefixed Portage users?).
30
31 Yes.
32 I think it would be better to use current OS X version of host instead of hardcoding 10.3 or 10.6
33
34 > This thread on the Perl mailing list sounds like someone upstream wants to keep targeting old versions of OS X:
35 > http://www.gossamer-threads.com/lists/perl/porters/317985
36 > Also, it looks like the Perl ebuild doesn't use the standard patching mechanism. I have no idea how the eblit stuff works, so I'm not sure what the right way is to add new patches to the Perl ebuild.
37 >
38 > John
39
40 --
41 Regards,
42 Konstantin

Replies