我正在尝试在Mac OS X 10.11.6上从源安装mod_wsgi-4.6.4。 然而,clang编译器似乎存在问题
./configure
checking for apxs2... no
checking for apxs... /usr/sbin/apxs
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Downloads/mod_wsgi-4.6.4':
configure: error: C compiler cannot create executables
See `config.log' for more details
以下是config.log中的一个示例:
configure:1889: checking for apxs2
configure:1923: result: no
configure:1889: checking for apxs
configure:1908: found /usr/sbin/apxs
configure:1920: result: /usr/sbin/apxs
configure:2009: checking for gcc
configure:2025: found /usr/bin/gcc
configure:2036: result: gcc
configure:2265: checking for C compiler version
configure:2274: gcc --version >&5
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr -- with-gxx-include-dir=/usr/include/c++/4.2.1
configure:2285: $? = 0
configure:2274: gcc -v >&5
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr -- with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin15.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
configure:2285: $? = 0
configure:2274: gcc -V >&5
clang: error: argument to '-V' is missing (expected 1 value)
clang: error: no input files
configure:2285: $? = 1
configure:2274: gcc -qversion >&5
clang: error: unknown argument: '-qversion'
clang: error: no input files
configure:2285: $? = 1
configure:2305: checking whether the C compiler works
configure:2327: gcc -Qunused-arguments -Qunused-argumentssource conftest.c >&5
clang: error: unknown argument: '-Qunused-argumentssource'
configure:2331: $? = 1
configure:2369: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h. */
Xcode版本是8.2。我已经重新安装了几次命令行工具,但无济于事。此外,我尝试了一些针对StackOverflow上类似问题的解决方案,但它也没有帮助。 任何人都可以建议这个问题背后的原因是什么?