Opened 12 years ago

Closed 12 years ago

#33286 closed defect (fixed)

XCode 4.3 changed location of compilers

Reported by: snaury@… Owned by: macports-tickets@…
Priority: Normal Milestone: MacPorts 2.0.4
Component: base Version: 2.0.3
Keywords: Cc: sygnet@…
Port:

Description

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.

Change History (4)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Component: portsbase

We are of course aware of this; see several other tickets and extensive discussion on the mailing list today. MacPorts base in trunk already uses xcrun; we have not yet released a version of MacPorts incorporating this change, so until we do, feel free to build MacPorts from trunk, or to go back to Xcode 4.2 with which MacPorts 2.0.3 works fine.

comment:2 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

comment:3 Changed 12 years ago by sygnet@…

Cc: sygnet@… added

Cc Me!

comment:4 Changed 12 years ago by jmroot (Joshua Root)

Milestone: MacPorts 2.0.4
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.