mountainlion apr compile lacking 'cc'
Asked Answered
E

2

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?

Evetta answered 2/9, 2012 at 22:30 Comment(3)
Have you downloaded the command line tools? either from inside Xcode or from apple's web siteElicia
Yes. I can build everything else in creation, only the build of this apache module fails.Evetta
I'm not alone, see github.com/mxcl/homebrew/issues/13586 which has a workaround.Evetta
I
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

Interlocutor answered 11/9, 2012 at 9:10 Comment(2)
I dont have OSX10.8.xctoolchain directory in my OSX 10.8.5Immixture
I am running OSX 10.10.1 I just remplace OSX10.8 by 10.10 in the solution provided by @Interlocutor and it worked like sharm. Thanks a lotWorl
A
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

Alboran answered 20/8, 2013 at 17:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.