Monday, March 25, 2013
Compiling Apache on OS X 10.8 without full XCode installation
As mentioned previously, it's possible to install the usual set of command-line tools without the full XCode installation. However this seems to confuse Apache (at least with version 2.2), which is expecting to find a C compiler in the XCode folder:
checking for chosen layout... Apache checking for working mkdir -p... yes checking build system type... x86_64-apple-darwin12.2.1 checking host system type... x86_64-apple-darwin12.2.1 checking target system type... x86_64-apple-darwin12.2.1 Configuring Apache Portable Runtime library ... checking for APR... yes setting CC to "/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc" setting CPP to "/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc -E" setting CFLAGS to " " setting CPPFLAGS to " -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK" setting LDFLAGS to " " Configuring Apache Portable Runtime Utility library... checking for APR-util... yes checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc checking whether the C compiler works... no configure: error: in `/Users/ian/src/httpd-2.2.24': configure: error: C compiler cannot create executables
Manually creating a link from this location seems to solve the problem:
root# mkdir -p /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/ root# ln -s /usr/bin/cc /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc
NOTE: this will cause Macports (see previous posts about Macports without XCode) to fail with a warning about an outdated XCode version; renaming the /Applications/Xcode.app
folder will solve that.
Posted at 1:25 AM |Comments (0)