| From | Sent On | Attachments |
|---|---|---|
| Dan Kogai | Aug 9, 2011 2:00 am | |
| Todd Rinaldo | Aug 9, 2011 3:14 pm | |
| Jesse Vincent | Aug 9, 2011 3:16 pm |
| Subject: | Perl vs. OS X Lion + XCode 4.1 | |
|---|---|---|
| From: | Dan Kogai (dank...@dan.co.jp) | |
| Date: | Aug 9, 2011 2:00:34 am | |
| List: | org.perl.perl5-porters | |
Porters,
You guys may have noticed that perl does not build out-of-the-box on OS X Lion +
Xcode 4.1
% sh Configure -des
# …snip…
This may take a while................../usr/bin/nm didn't seem to work right.
Trying /usr/bin/ar instead...
ar: /usr/lib/libc.dylib is a fat file (use libtool(1) or lipo(1) and ar(1) on
it)
ar: /usr/lib/libc.dylib: Inappropriate file type or format
/usr/bin/ar didn't seem to work right.
Maybe this is a Cray...trying bld instead...
Configure: line 7765: bld: command not found
That didn't work either. Giving up.
The problem had been there since Lion Developers Release.
Looks like MacPorts has already addressed the problem. So if you have one you
can use the following workaround.
# order does motter
patch -p0 <
/opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/perl5.14/files/patch-hints_darwin.sh.diff
patch -p0 -R <
/opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/perl5.14/files/patch-darwin.sh.diff
MacPorts has other patches but the patch to hints/darwin.sh alone suffices to
build perl normally. It also "make test"s fine. So I appreciate if porters fix
the hints file according. Diff after the signature.
Dan the Zookeeper
--- perl-5.14.1/hints/darwin.sh 2011-06-10 05:04:29.000000000 +0900 +++ perl-5.14.1-lion/hints/darwin.sh 2011-08-09 17:38:29.000000000 +0900 @@ -179,6 +179,20 @@ ldflags="${ldflags} -flat_namespace" lddlflags="${ldflags} -bundle -undefined suppress" ;; +9.*) + lddlflags="${ldflags} -bundle -undefined dynamic_lookup" + case "$ld" in + *MACOSX_DEVELOPMENT_TARGET*) ;; + *) ld="env MACOSX_DEPLOYMENT_TARGET=10.5 ${ld}" ;; + esac + ;; +10.*) + lddlflags="${ldflags} -bundle -undefined dynamic_lookup" + case "$ld" in + *MACOSX_DEVELOPMENT_TARGET*) ;; + *) ld="env MACOSX_DEPLOYMENT_TARGET=10.6 ${ld}" ;; + esac + ;; *) lddlflags="${ldflags} -bundle -undefined dynamic_lookup" case "$ld" in @@ -260,6 +274,10 @@ ;; esac
+# When the bind9 port is installed, its libbind includes dups from +# /usr/lib/libdl, so remove libbind +libswanted=`echo $libswanted | sed 's/ bind / /'` + ## # System libraries ## @@ -324,3 +342,5 @@ # makefile in the same place. Since Darwin uses GNU make, this dodges # the problem. firstmakefile=GNUmakefile; + +usenm='false'





