Tue, 04 Jun 2013

Getting PowerPC Errors Installing Software on OS X Lion Server (Intel)?

XCode 4.2 dropped support for PPC compilation, so if you're trying to build some software (in my example, DBI, and DBD::mysql via cpan) and you're getting errors like: /usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
... then I have a simple workaround for you. (If anyone has the proper way to reconfigure the build environment such that configure/autoconf properly detect the architectures without this hack, post it in the comments)

Either set permanently, temporarily, or within the execution context of your program, the ARCHFLAGS environment variable to x86_64, as I did here: env ARCHFLAGS="-arch i386 -arch x86_64" cpan

Given that recent operating systems have dropped support for Rosetta, and that running under emulation would be slower than native, there's no point in building universal binaries on an Intel Mac anyway, so why this configuration is supported is beyond me.




Khan Klatt

Khan Klatt's photo