macososx-mountain-lionxcode4.4apr

mountainlion apr compile lacking 'cc'


Trying to build mod_auth_openid on MountainLion with XCode Version 4.4.1 (4F1003), I get a complaint about a missing 'cc' command, as follows:

/usr/share/apr-1/build-1/libtool --silent --mode=link /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc -o mod_auth_openid.la  -rpath /usr/libexec/apache2 -module -avoid-version    libmodauthopenid.la -I/usr/include/apache2 -I/usr/include/apr-1 -I/usr/local/include -L/usr/local/lib -lopkele -lcurl -lexpat -ltidy -lssl -lcrypto -lz -L/usr/lib -lpcre -lcurl
/usr/share/apr-1/build-1/libtool: line 4574: /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc: No such file or directory
apxs:Error: Command failed with rc=8323072

What to do?


Solution

  • I faced a similar problem while trying to install mod_wsgi using homebrew on Mac (Mountain Lion). Though bmargulies posted the answer in his comment by pointing to github link. But still posting the solution here for completeness.

    Run the following command.

    sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain
    

    And then re-run the install command