Hot Door CORE Forum

Full Version: the "art" of XcodeLegacy.sh
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
There must be an art to getting XcodeLegacy.sh to work reliably, since it sometimes defies logic.

I've had XcodeLegacy.sh installed in Xcode 7 for some time. I haven't been able to use any compiler but the newest one, LLVM 7, but had read that if you're running Mavericks or newer (I have El Capitan), GCC compilers won't run. Using the 10.6 SDK, however, I was able to compile some simple Cocoa test projects to run under AI CS6. Once my Xcode 7.2 was automatically upgraded to Xcode 7.3, I was unable to install XcodeLegacy at all, and went back to 7.2, renamed "Xcode72" so it wouldn't be overwritten again.

Today at work I tried running some CORE sample projects on a new cylindrical Mac Pro with Yosemite, and the GCC compiler setting worked just fine. Hah! So in drilling down into my Xcode 7.2 at home, I found the directories leading to GCC aliases, but they were all broken--if only I knew how to find where they were trying to point to. I've tried to uninstall and reinstall with the same results. Perhaps there's a permissions problem preventing them from being installed, just as I had to open permissions on my Adobe Illustrator application folder in order to build the sample plugins.

Is there a technique that's helped others coax XcodeLegacy to install reliably?
(03-29-2016, 04:47 PM)Rick Johnson Wrote: [ -> ]There must be an art to getting XcodeLegacy.sh to work reliably, since it sometimes defies logic.

I have found the most reliable way to keep Xcode working is to run XcodeLegacy 'uninstall' every time Xcode is updated. Then 'buildpackages', 'install' and finally 'cleanpackages'.

Also, be sure to have the following files in the same directory as XcodeLegacy.sh:

xcode_3.2.6_and_ios_sdk_4.3.dmg
xcode_5.1.1.dmg
Xcode_6.4.dmg
xcode4630916281a.dmg

Brendon
Thanks, Brendon.

I have exactly the same files you listed. I've deleted Xcode, installed a new 7.2.1 from its .dmg, and although I can install XcodeLegacy without errors, when I open a CORE sample project I consistently get this error preventing me from building:

can't exec '/Applications/Xcode.app/Contents/Developer/usr/bin/gcc-4.2' (No such file or directory)

When I locate this "missing" gcc-4.2 file, I find a broken alias whose target cannot be found. I see a lot of similarly named executables in /usr/bin, but even an administrator can't change permissions there, which I suspect is related to what's going wrong.

Until I can solve this, CORE is just not an option for me. Confused

-- Rick
However... It is possible to build projects using Mac SDK10.6 but using the LLVM 7 compiler. What functionality or compatibility would I lose that way? I'm only going back as far as CS6, which required 64-bit Intel processors, so at least there's no PPC issue to deal with. Would this be a risky approach?
Option 3: I have a 2008 MacBook Pro that I added a second hard drive to. The SSD runs El Capitan, while the old drive, now in the optical bay, was reformatted and loaded with OS X 10.6 Snow Leopard. I miss the speed and large screen of the iMac, but no XcodeLegacy is needed. Still, I'd gladly install GCC 4.2 on the iMac by hand, if I knew how.
Frédéric Devernay has just updated his XcodeLegacy.sh script for Xcode 7.3, so I downloaded both and the install runs perfectly!

I've renamed my Xcode.app to Xcode73.app so it doesn't get overwritten by automatic incremental updates.

Onward...