Xcode 4.0.2 and XS modules

David Leadbeater dgl at dgl.cx
Sat Apr 23 11:43:10 BST 2011


On 22 Apr 2011, at 22:20, Simon Wistow wrote:
> Beyond installing my own Perl (which I can do but is kind of a ball 
> ache) what's the best solution to this. I've found an old copy of Xcode 
> on their site now after some poking around but saying "Install an old 
> version of software" is a less than ideal solution.

In an extracted copy of the dist, try something like:

  eval $(perl -V:ccflags); perl Makefile.PL CCFLAGS="$(echo "$ccflags" | sed 's/-arch ppc//')" && make && make test

i.e. take the ccflags perl was compiled with, remove the -arch ppc option and then pass that to Makefile.PL. You'll probably get some warns about ppc not being there, but it works anyway (although I'm on Xcode 3). If that works I suspect you can then convince CPAN.pm to pass that option to Makefile.PL.

(It's very nice of Apple to break their toolchain and leave it to everyone else to fix it...)


More information about the london.pm mailing list