How do I build mod_jk on Mac OS X Mountain Lion?
Asked Answered
C

1

6

I followed the instructions in BUILDING.txt in the native directory and executed

./configure --with-apxs=/usr/sbin/apxs

Here is some of the output

building connector for "apache-2.0"
checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

Naturally, I searched StackOverflow for solutions since gcc was not in /usr/bin. So I popped open XCode and installed Command Line Tools. GCC was now in /usr/bin ... but I keep getting the same error.

Any ideas?

Caporetto answered 28/11, 2012 at 0:28 Comment(0)
C
20

After an hour of digging, I finally ran into this post and added my responses that took care of my problem.

So first you need to install Command Line Tools from XCode THEN you have to create this symlink by executing

sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain

This is a problem in the APXS supplied by apple in Mac OS X 10.8. The configure script tries to find the C compiler by executing /usr/sbin/apxs -q CC. The path output is either incorrect OR Apple forgot to create the symlink for you upon install 10.8.

Once you create the symlink, everything will be ok and you'll be able to compile mod_jk

Caporetto answered 28/11, 2012 at 0:28 Comment(1)
Thanks! It's funny I didn't find this information more easily on the web…Crowley

© 2022 - 2024 — McMap. All rights reserved.