简体   繁体   中英

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

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM