Ticket #33286 (closed defect: fixed)
XCode 4.3 changed location of compilers
|Reported by:||snaury@…||Owned by:||macports-tickets@…|
Uninstalled XCode 4.2, installed XCode 4.3. Now anything that depends on C compiler fails to build, because path to clang is used as $DEVELOPER/usr/bin/clang, which is wrong for 4.3. For example:
$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer $ sudo port -v install graphviz [...] checking for gcc... /Applications/Xcode.app/Contents/Developer/usr/bin/clang checking for C compiler default output file name... configure: error: C compiler cannot create executables See `config.log' for more details. [...] $ sudo port -v install mercurial [...] building 'mercurial.base85' extension /Applications/Xcode.app/Contents/Developer/usr/bin/clang [...] unable to execute /Applications/Xcode.app/Contents/Developer/usr/bin/clang: No such file or directory [...] $ xcrun -find clang /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
If I use xcode-select to switch to / then xcodebuild -version calls take forever because they scan my whole hard-drive, so currently there's no xcode-select -switch path that would work for all needed tools.
Perhaps macports should use xcrun -find to find actual locations of executables.
P.S. I know XCode 4.3 was just released, I'm logging it in case it's useful.