Penguin, small TECH.BARWICK.DE
Mac OS X

Recent posts





Powered By


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/"
  setting CPP to "/Applications/ -E"
  setting CFLAGS to " "
  setting LDFLAGS to " "

Configuring Apache Portable Runtime Utility library...

checking for APR-util... yes
checking for gcc... /Applications/
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/
root# ln -s /usr/bin/cc /Applications/

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/ folder will solve that.

Posted at 1:25 AM |Comments (0)