Xcode 4.3 and command line tools version mismatches

James Berry jberry at macports.org
Fri Mar 23 07:41:32 PDT 2012


On Mar 23, 2012, at 7:23 AM, Daniel Ericsson wrote:

> On 22 mar 2012, at 12:04, Ryan Schmidt wrote:
> 
>> But this fails if the user has installed Xcode 4.3 but not Xcode 4.3's command line tools.
>> 
>> Is there a way we can discover the version of Xcode that the installed command line tools belong to? If so, we should modify base to verify that it matches the installed version of Xcode, and if it doesn't, tell the user to update the command line tools (and tell them how to do so).
> 
> I'm a bit uncertain on how the new Xcode distribution works but I got notified of a command line update when starting Xcode 4.3.1 ($99 account), which I assume is the new command line tools for 4.3.2? So just so the requirements for this might be clarified, I think you can also end up in a situation reverse to the one above. Ie. your command line tools are newer than your version of Xcode.

Perhaps the solution would be to ask the compiler what it is (--version) and parse meaningful information out of its response string, rather than assuming we know what it might be, based on the Xcode version.

Presumably we'd want to do this in macports to have a single place to get it right. Since its touchy and potentially needs to be changed quickly in response to compiler changes, doing it in a port group might be interesting, though might limit us too much.

James


% gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% llvm-gcc --version
i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% clang --version
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.3.0
Thread model: posix


> 
> -- Daniel
> 
> _______________________________________________
> macports-dev mailing list
> macports-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev



More information about the macports-dev mailing list