mac 下已经有了clang,最近想看看gcc的反汇编,用brew install gcc5
遇到下列问题
~/Desktop/c++/test ⮀ brew install gcc5
==> Installing gcc5 from homebrew/homebrew-versions
==> Installing dependencies for homebrew/versions/gcc5: isl014
==> Installing homebrew/versions/gcc5 dependency: isl014
==> Downloading http://isl.gforge.inria.fr/isl-0.14.tar.bz2
Already downloaded: /Library/Caches/Homebrew/isl014-0.14.tar.bz2
==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/isl014/0.14 --with-gmp=system --with-gmp-prefix=/usr/local/opt/gmp
Last 15 lines from /Users/chenzhi/Library/Logs/Homebrew/isl014/01.configure:
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/private/tmp/isl01420151209-51449-1354o6r/isl-0.14':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details
READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/homebrew):
https://github.com/homebrew/homebrew-versions/issues
看不懂啊,不知道有没人能指点一下,是不是跟clang冲突啊
这个问题比较邪乎,最后Google找到了,要用Xcode-select 这个东西,而且要装一个(beta?版)的Xcode,记不太清,有同样问题的重装Xcode不行的话就按这个思路找吧。