Gentoo Archives: gentoo-alt

From: "Gibson
To: "gentoo-alt@l.g.o" <gentoo-alt@l.g.o>
Subject: [gentoo-alt] OS X Yosemite XCode 7.0 bootstrap fails on stage3 perl
Date: Fri, 09 Oct 2015 18:46:44
Message-Id: 1B7A4D21-DC18-4F24-86DE-8053862C31C0@mitre.org
1 Hi fellow Alters,
2
3 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:
4
5 clang version 3.5.2 (tags/RELEASE_352/final)
6 Target: x86_64-apple-darwin14.5.0
7 Thread model: posix
8 "/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
9 ld: library not found for -lgcc_s.10.5
10 x86_64-apple-darwin14-clang-3.5.2: error: linker command failed with exit code 1 (use -v to see invocation)
11 GNUmakefile:354: recipe for target 'libperl.5.22.0.dylib' failed
12 make: *** [libperl.5.22.0.dylib] Error 1
13
14 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:
15 diff -wur perl-5.22.0.orig/hints/darwin.sh perl-5.22.0/hints/darwin.sh
16 --- perl-5.22.0.orig/hints/darwin.sh 2015-10-09 12:55:55.000000000 -0400
17 +++ perl-5.22.0/hints/darwin.sh 2015-10-09 13:39:44.000000000 -0400
18 @@ -206,7 +206,7 @@
19 lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
20 case "$ld" in
21 *MACOSX_DEVELOPMENT_TARGET*) ;;
22 - *) ld="env MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
23 + *) ld="env MACOSX_DEPLOYMENT_TARGET=10.6 ${ld}" ;;
24 esac
25 ;;
26 esac
27
28 Which works, but would obviously break stuff for anyone still targeting 10.5 or earlier (do we still have PPC Prefixed Portage users?). This thread on the Perl mailing list sounds like someone upstream wants to keep targeting old versions of OS X:
29 http://www.gossamer-threads.com/lists/perl/porters/317985
30 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.
31
32 John

Replies

Subject Author
Re: [gentoo-alt] OS X Yosemite XCode 7.0 bootstrap fails on stage3 perl Konstantin Tokarev <annulen@××××××.ru>