Heads-up, anyone who keeps their Mac software up-to-date

David Chase david.r.chase at oracle.com
Thu Sep 19 14:25:40 UTC 2013


Recipe for repair:

1. Have a copy of XCode 4.6.3 on backup (I think it might fit on a DVD, just to be extra careful).

2. Installing the tools seems to burn a particular path into their tiny pea brain, so in the end you will need to call XCode 4.6.3 "XCode.app", if that is its old name, because I cannot figure out how to convince XCode that it should re-install tools.
This may require moving the upgraded XCode.app to XCode5.0.app.

3. "sudo xcode-select --switch /Applications/XCode.app" did NOT put the tools (/usr/bin/gcc and /usr/bin/g++) back the way they should be.  Instead, it is necessary to manually remove them and recreate the symlinks, like so:

sudo bash
cd /usr/bin
mkdir xxx
mv gcc xxx
mv g++ xxx
ln -s ../llvm-gcc-4.2/bin/llvm-gcc-4.2 gcc
ln -s ../llvm-gcc-4.2/bin/llvm-g++-4.2 g++

If there's no /usr/llvm-gcc-4.2, that's a problem I didn't have.

This succeeded -- it configured properly (fastdebug), built, and the resulting java (built minutes ago) successfully ran.

David

On 2013-09-19, at 9:22 AM, David Chase <david.r.chase at oracle.com> wrote:

> That did not have the desired effect on the command line tools.  I do still have backups, but yuck.
> 
> David
> 
> On 2013-09-19, at 8:51 AM, Staffan Larsen <staffan.larsen at oracle.com> wrote:
> 
>> As a workaround, it's possible to have several versions of XCode installed and you can switch between them from the command line with "xcode-select".
>> 
>> /Staffan
>> 
>> On 19 sep 2013, at 14:05, David Chase <david.r.chase at oracle.com> wrote:
>> 
>>> XCode 5 changed things a little:
>>> 
>>> configure: The C compiler (located as /usr/bin/gcc) does not seem to be the required GCC compiler.
>>> configure: The result from running with --version was: "Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1"
>>> 
>>> Merely zipping a copy of the old one does not work -- I tried that, it has embedded references to stuff in /Applications/XCode.app.
>>> 
>>> Yes, I have backups.  I figured someone should look.
>>> 
>>> David
>>> 
>> 
> 



More information about the build-dev mailing list