Mac OS X 10.6, Xcode 4, PowerPC C compiler?

1

1

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?

Andrew J. Brehm

Posted 2011-05-30T14:23:02.267

Reputation: 4 411

Just a guess, but reinstall Xcode and check all checkboxes when asked what you want to install? – Daniel Beck – 2011-05-30T14:39:08.257

Is the PowerPC compiler still part of Xcode? – Andrew J. Brehm – 2011-05-30T15:35:37.447

1That's why it's a guess. Start the installer and check the options. – Daniel Beck – 2011-05-30T15:50:45.010

Also, since there's no Xcode 5, you haven't actually told us the version you're using ;) – Daniel Beck – 2011-05-30T17:10:04.957

dupe of http://stackoverflow.com/questions/5333490

– fommil – 2013-08-25T11:12:29.573

Answers

1

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.

Justin Mrkva

Posted 2011-05-30T14:23:02.267

Reputation: 923

It's really for my own purposes. I still have PowerPC machines. – Andrew J. Brehm – 2011-06-16T15:01:52.877

0

XcodeLegacy is a too that installs older OS X compilers and SDKs on more recent versions of OS X / macOS.

This tool tells you which Xcode packages you need to download, and then extracts the compilers and SDKs from the Xcode distributions and installs them.

Frédéric Devernay

Posted 2011-05-30T14:23:02.267

Reputation: 1

0

Take a look here.

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

James Moore

Posted 2011-05-30T14:23:02.267

Reputation: 161