Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I noticed a pattern of errors while trying to install PyMedia and Python Audio Tools. For both modules I run the following:

$ python setup.py install

Then I get a series of compilation errors, and then this:

lipo: can't figure out the architecture type of: /var/folders/Kx/Kxxj4868HGi6VMhZLPyZN++++TI/-Tmp-//cch1y9AO.out
error: command '/usr/bin/gcc-4.2' failed with exit status 1

I'm running Mac OS X 10.5, and this happens whether I'm using gcc-4.0 or gcc-4.2, Mac-Python 2.5 or 2.6, and MacPorts-Python 2.6. What's going on?

share|improve this question
add comment

2 Answers

You could set the following from the terminal before issuing the command:

export MACOSX_DEPLOYMENT_TARGET=10.5 CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe -no-cpp-precomp" 
export CCFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" 
export CXXFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -g -Os -pipe" 
export LDFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 -bind_at_load"

These were my default settings if something needed to compile on the box. Hope this brings you closer to a working install !

share|improve this answer
add comment

It looks like the setup process is attempting to combine several binaries into a fat binary using the lipo tool. The error occurs when lipo encounters a file whose type it does not recognize.

There's not much more that can be said without a log of the specific commands executed during the setup process.

You might want to try running file on the file that lipo complains about to see whether file can identify the file type. ls -lh might also be a good idea; it's possible the file is empty for some reason.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.