older macports perl XS module linking issues after Snow Leopard Install.

Mark Blackman mark at blackmans.org
Mon Sep 21 04:23:41 PDT 2009


Hi,

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.

- Mark


More information about the macports-users mailing list