When I try to cross-compile C code for PowerPC, I get the following error:

llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2': execvp: No such file or directory

What is the best way to install the missing compiler?

link|improve this question

79% accept rate
Just a guess, but reinstall Xcode and check all checkboxes when asked what you want to install? – Daniel Beck May 30 '11 at 14:39
Is the PowerPC compiler still part of Xcode? – Andrew J. Brehm May 30 '11 at 15:35
1  
That's why it's a guess. Start the installer and check the options. – Daniel Beck May 30 '11 at 15:50
Also, since there's no Xcode 5, you haven't actually told us the version you're using ;) – Daniel Beck May 30 '11 at 17:10
feedback

2 Answers

up vote 0 down vote accepted

Xcode 4 does not include the PPC tools BUT you can migrate them over from an Xcode 3 installation with a little bit of work. There was a site detailing how but I can't find it. If you really need to work with PPC I'd recommend running Xcode 3 though.

Also, I don't know your situation, but I'd strongly recommend moving away from PPC support unless you really truly need it. Just my opinion though.

link|improve this answer
It's really for my own purposes. I still have PowerPC machines. – Andrew J. Brehm Jun 16 '11 at 15:01
feedback

Take a look here

http://stackoverflow.com/questions/5333490/how-can-we-restore-ppc-ppc64-as-well-as-full-10-4-10-5-sdk-support-to-xcode-4

and then do this in addition (edit paths as needed)

cd /Developer/usr/llvm-gcc-4.2/bin
ln -s /Developer3/usr/llvm-gcc-4.2/bin/powerpc-apple-darwin10-llvm-gcc-4.2 powerpc-apple-darwin11-llvm-gcc-4.2
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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