macports broken under Mountain Lion and Xcode 4.4?

Artemio Gonzalez Lopez artemiog at
Fri Feb 17 09:54:12 PST 2012

Yesterday I installed Mountain Lion and Xcode 4.4 (including the Command Line Tools") in my MacBook Pro 15" (2011). While I succeeded in compling MacPorts from source (after completely erasing the previous installation), when I try to install any port via "sudo port -d install foo" I get the following error at the configure phase:

checking for gcc... /Applications/
checking for C compiler default output file name... 
configure: error: C compiler cannot create executables
See `config.log' for more details.
configure: error: ./configure failed for lib
shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_gperf/gperf/work/gperf-3.0.4" && ./configure --prefix=/opt/local --infodir=/opt/local/share/info " returned error 1

There is obviously some problem in properly detecting the path to the C compiler, since clang it's not in /Applications/ but in /usr/bin. Could anybody suggest a fix to this?

Thanks in advance,


Artemio Gonzalez Lopez
artemiog at

More information about the macports-users mailing list