自制软件 - “brew install freetds”导致:“配置错误:C编译器无法创建可执行文件”

时间:2013-06-10 17:44:09

标签: xcode gcc homebrew

我正在使用Xcode版本4.6.2。我正在尝试brew install freetds,但我遇到了一些麻烦。

我看了this question,但仍然无法解决我的错误。

首先,这是错误:

$ brew install freetds
==> Downloading http://mirrors.ibiblio.org/freetds/stable/freetds-0.91.tar.gz
Already downloaded: /Library/Caches/Homebrew/freetds-0.91.tar.gz
==> ./configure --prefix=/usr/local/Cellar/freetds/0.91 --with-openssl=/usr/bin --with-tdsver=7.1 --mandir=/usr/local/Cellar/freetds/0.91/share/man
checking for gcc... cc
checking whether the C compiler works... no
configure: error: in `/private/tmp/freetds-prGt/freetds-0.91':
configure: error: C compiler cannot create executables
See `config.log' for more details.

我将介绍一些系统信息。

$ brew update
Already up-to-date.

$ brew doctor
Your system is ready to brew.

$ which gcc
/usr/bin/gcc

$ which cc
/usr/bin/cc

$ gcc --version
gcc (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ cc --version
cc (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ clang --version
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.3.0

$ xcrun clang --version
Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn)
Target: x86_64-apple-darwin12.3.0
Thread model: posix

ls -la /usr/bin | grep .*gcc.*
lrwxr-xr-x     1 root   wheel           32 Jun 10 11:57 cc -> i686-apple-darwin11-llvm-gcc-4.2
lrwxr-xr-x     1 root   wheel           32 Jun 10 11:58 gcc -> i686-apple-darwin11-llvm-gcc-4.2
lrwxr-xr-x     1 root   wheel           32 Jun 10 11:57 gcc-4.0 -> i686-apple-darwin11-llvm-gcc-4.2
lrwxr-xr-x     1 root   wheel           32 Jun 10 11:58 gcc-4.2 -> i686-apple-darwin11-llvm-gcc-4.2
lrwxr-xr-x     1 root   wheel           28 May 26 16:10 gcov-4.2 -> ../llvm-gcc-4.2/bin/gcov-4.2
lrwxr-xr-x     1 root   wheel           52 May 26 16:10 i686-apple-darwin11-llvm-g++-4.2 -> ../llvm-gcc-4.2/bin/i686-apple-darwin11-llvm-g++-4.2
lrwxr-xr-x     1 root   wheel           52 May 26 16:10 i686-apple-darwin11-llvm-gcc-4.2 -> ../llvm-gcc-4.2/bin/i686-apple-darwin11-llvm-gcc-4.2
-rwxr-xr-x     1 root   wheel       369408 Sep 23  2007 i686-apple-darwin9-gcc-4.0.1
lrwxr-xr-x     1 root   wheel           32 May 26 16:10 llvm-cpp-4.2 -> ../llvm-gcc-4.2/bin/llvm-cpp-4.2
lrwxr-xr-x     1 root   wheel           32 May 26 16:10 llvm-g++ -> ../llvm-gcc-4.2/bin/llvm-g++-4.2
lrwxr-xr-x     1 root   wheel           32 May 26 16:10 llvm-g++-4.2 -> ../llvm-gcc-4.2/bin/llvm-g++-4.2
lrwxr-xr-x     1 root   wheel           32 May 26 16:10 llvm-gcc -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
lrwxr-xr-x     1 root   wheel           32 May 26 16:10 llvm-gcc-4.2 -> ../llvm-gcc-4.2/bin/llvm-gcc-4.2
-rwxr-xr-x     1 root   wheel       369408 Sep 23  2007 powerpc-apple-darwin9-gcc-4.0.1

$ ls /usr/bin | grep gcc
gcc
gcc-4.0
gcc-4.2
i686-apple-darwin11-llvm-gcc-4.2
i686-apple-darwin9-gcc-4.0.1
llvm-gcc
llvm-gcc-4.2
powerpc-apple-darwin9-gcc-4.0.1

我对这样的系统问题并不十分熟悉。 config.log文件在哪里(我知道调试此错误很重要)?有没有人根据我提供的信息看到我的问题可能在哪里?

0 个答案:

没有答案