Xcode 4.3 and command line tools version mismatches

Ryan Schmidt ryandesign at macports.org
Thu Mar 22 04:04:12 PDT 2012


Now that with Xcode 4.3 the command line tools are a separate installation, it's becoming common for users to have a different version of Xcode than of the command line tools. For example:

https://trac.macports.org/ticket/30598#comment:17

And:

http://lists.macosforge.org/pipermail/macports-users/2012-March/027943.html

This is bad because we might make decisions in a portfile based on the version of Xcode. For example the version of clang in Xcode 4.2 could not compile mongodb, but the version of clang in Xcode 4.3 can. Therefore I changed mongodb to allow the use of clang when xcodeversion >= 4.3:

https://trac.macports.org/changeset/90960

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).




More information about the macports-dev mailing list