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

大憨熊 提交于 2019-12-06 01:54:26

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/13595730/how-do-i-build-mod-jk-on-mac-os-x-mountain-lion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!