older macports perl XS module linking issues after Snow Leopard Install.
Ryan Schmidt
ryandesign at macports.org
Mon Sep 21 04:41:02 PDT 2009
On Sep 21, 2009, at 06:23, Mark Blackman wrote:
> Just as a heads-up and for the archives, I had a macports perl
> installation 5.8.8 that predated Leopard and Snow Leopard.
> After upgrading to Snow Leopard I was unable to
> compile XS modules for perl, resulting in messages
> something like 'ld: wrong architecture' at link time.
>
> After some detective work it seems that
>
> /opt/local/lib/perl5/5.8.8/darwin-2level/Config.pm
> had CC defined as '/usr/sbin/gcc-4.0' but
>
> /opt/local/lib/perl5/5.8.8/darwin-2level/Config_heavy.pl
> had LD defined as "ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc"
>
> 'cc' refers to gcc-4.2 and it's default loader behaviour
> appears to want objects generated by gcc-4.2 rather than
> gcc-4.0 for the default case anyway.
>
> I'm not entirely sure about the correct fix but I updated
> /opt/local/lib/perl5/5.8.8/darwin-2level/Config_heavy.pl with
> "ld='env MACOSX_DEPLOYMENT_TARGET=10.3 gcc-4.0" to resolve my
> immediate XS creation problem.
The correct fix when upgrading from one major OS version to another is
to uninstall all ports and reinstall them. See the Migration page in
the wiki:
http://trac.macports.org/wiki/Migration
More information about the macports-users
mailing list