XCode 4.3

Jeremy Huddleston jeremyhu at macports.org
Fri Feb 17 10:41:56 PST 2012


On Feb 17, 2012, at 6:33 AM, Jack Howarth <howarth at bromo.med.uc.edu> wrote:

> On Fri, Feb 17, 2012 at 07:39:53PM +1100, Joshua Root wrote:
>> On 2012-2-17 18:45 , Jeremy Huddleston wrote:
>>> 
>>> Also, another thing to note is that the command line tools + SDK are
>>> available as a separate download.  If you don't need any parts of XCode
>>> itself, you can probably get by with just installing these bits, but I
>>> wouldn't recommend it for the casual MP user since many pieces of
>>> MacPorts assume you have a /Developer dir somewhere and quite a bit of
>>> logic is based on determining which version of XCode is installed.
>> 
>> In light of this and the changing developer_dir, maybe it would be a
>> better idea to move back to using tools in /usr/bin when possible. The
>> only reason we started using compilers in /Developer/usr/bin is that
>> llvm-gcc-4.2 wasn't installed in /usr/bin on Leopard.
>> 
>> - Josh
> 
> Josh,
>   While using /usr/bin makes sense, port would need to be modified to
> sanity check that the developer directory path is set. Apple neglected
> to have the post installation scripts in Xcode 4.3's Command Line Tool
> installer do that with...
> 
> sudo xcode-select -switch /Applications/Xcode.app

The Command Line Tools are not responsible for that.  I believe this should be done for you when you launch Xcode.app for the first time.

> In the case of upgrading from Xcode 4.2.1 to 4.3, I have seen the /usr/bin/c++
> symlink left pointing at llvm-g++-4.2 when the developer directory path is
> unset.

This is consistent with the above.  It seems in your case xcode-select isn't being run.

> Perhaps port could check that 'xcodebuild -version' doesn't report...
> 
> Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path.

Or it can just check that 'xcode-select -print-path' exists.

> I suspect that all previous Xcode releases set the developer directory path, so it
> could be assumed safe to set it to /Applications/Xcode.app with xcode-select in that
> case (as it should be Xcode 4.3 or later).

If you have Xcode 4.2 installed, then download Xcode 4.3, and then just run Xcode.app, it should take care of the xcode-select of this for you.  I'm curious why it didn't work in your case, but that magic isn't my specialty =/

FWIW, I have one Lion machine which I keep on only GM Xcode releases, and it did this transition without issue.



More information about the macports-dev mailing list