Question

It appears that Xcode4 doesn't include PPC as a build option anymore. When using setup.py for modules that include C extensions, setup.py always attempts the build with these options:

gcc-4.2 ... -DMACOSX -arch i386 -arch ppc ...

This fails with the error message

/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

If I just remove -arch ppc from the failed command it completes fine and I can rerun setup.py build to move on to the next step.

This is okay for modules that only include one C extension, like ssl, but for something like PIL that builds a ton of extensions it is a major pain.

Is there some way to prevent setup.py from including -arch ppc in the compilation parameters?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top