-1

Im trying to install apache http server 2.4.9 on mac osx 10.9. I have downloaded the gcc compiler.

sh-3.2# gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix

I have even installed the command line tools

sh-3.2# pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 5.1.0.0.1.1393561416
volume: /
location: /
install-time: 1401740485
groups: com.apple.FindSystemFiles.pkg-group com.apple.DevToolsBoth.pkg-group com.apple.DevToolsNonRelocatableShared.pkg-group 

But I still get the following error when I try to compile apache 2.4.9 from source

sh-3.2# ./configure --prefix=/usr/local/apache2
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking build system type... x86_64-apple-darwin13.1.0
checking host system type... x86_64-apple-darwin13.1.0
checking target system type... x86_64-apple-darwin13.1.0
configure: 
configure: Configuring Apache Portable Runtime library...
configure: 
checking for APR... yes
  setting CC to "/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/cc"
  setting CPP to "/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/cc -E"
  setting CFLAGS to " "
  setting CPPFLAGS to " -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK"
  setting LDFLAGS to " "
configure: 
configure: Configuring Apache Portable Runtime Utility library...
configure: 
checking for APR-util... yes
checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain/usr/bin/cc
checking whether the C compiler works... no
configure: error: in `/Users/silango/appsrc/httpd-2.4.9':
configure: error: C compiler cannot create executables
See `config.log' for more details
admdrew
  • 3,790
  • 4
  • 27
  • 39
  • 1
    I thought I'd just share some related threads, just for the sake of completeness and as you clearly state that you're trying to compile Apache from source and get these errors: http://stackoverflow.com/questions/13587001/problems-with-compiling-apache2-on-mac-os-x-mountain-lion and http://stackoverflow.com/questions/10357804/configure-error-c-compiler-cannot-create-executables. – mattias Jun 02 '14 at 20:54

2 Answers2

1

MAC OS X 10.9 comes already with a built in httpd module, to enable it open terminal and type the follow commands:

TO START:

sudo apachectl start

TO STOP:

sudo apachectl stop

TO RESTART:

sudo apachectl restart
Cristofor
  • 2,077
  • 2
  • 15
  • 23
0

You have downgrade your Xcode command line tools. I used the April 10 Mavericks version and it worked.

Helper
  • 1