10

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?

kojiro
  • 74,557
  • 19
  • 143
  • 201
bmargulies
  • 97,814
  • 39
  • 186
  • 310

2 Answers2

18

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

Pankaj
  • 3,592
  • 2
  • 26
  • 22
  • I dont have OSX10.8.xctoolchain directory in my OSX 10.8.5 – hakunami Oct 04 '13 at 10:39
  • 1
    I am running OSX 10.10.1 I just remplace OSX10.8 by 10.10 in the solution provided by @Pankaj and it worked like sharm. Thanks a lot – lomse Jan 08 '15 at 18:12
0

Ran into exactly this problem with Mountain Lion/Homebrew/mod_wsgi. The toolchain symlink did not solve the problem in my case. Went back to another Mac where I used MacPorts to do this with no issues and looked at the Portfile for mod_wsgi. They had a --disable-framework flag in the configure step. Added this flag and everything worked great. Details available in the gist here https://gist.github.com/talonsensei/6284446

talonsensei
  • 225
  • 2
  • 3
  • 12