4

When I try to install gcc49, I receive an error

 $  brew install https://raw.githubusercontent.com/Homebrew/homebrew-versions/master/gcc49.rb
######################################################################## 100.0%
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-4.9.3/gcc-4.9.3.tar.bz2
Already downloaded: /Library/Caches/Homebrew/gcc49-4.9.3.tar.bz2
==> ../configure --build=x86_64-apple-darwin14.5.0 --prefix=/usr/local/Cellar/gcc49/4.9.3 --libdir=/usr/local/Cellar/gcc49/4.9.3/lib/gcc/4.9 --enable-languages=c,c++,objc,obj-c++ --program-suffix=-4.9 --w
checking for version 0.10 of ISL... no
checking for version 0.11 of ISL... no
checking for version 0.12 of ISL... no
checking for version 0.14 of ISL... no
configure: error: Unable to find a usable ISL.  See config.log for details.
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.

READ THIS: https://git.io/brew-troubleshooting

However, I do have ISL:

$  brew info isl
isl: stable 0.14.1 (bottled), HEAD
Integer Set Library for the polyhedral model
http://freecode.com/projects/isl
/usr/local/Cellar/isl/0.14.1 (68 files, 3.2M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/isl.rb
==> Dependencies
Build: xz ✔
Required: gmp ✔

I do not know where is the config.log located.

IKavanagh
  • 6,089
  • 11
  • 42
  • 47

2 Answers2

3

The correct way to install GCC 4.9 is to use

$ brew install homebrew/versions/gcc49

This way Homebrew will correctly resolve the missing dependencies and install them for you. You can find this version of gcc (or any other) using

$ brew search gcc49
homebrew/versions/gcc49

or

$ brew search gcc
gcc                             homebrew/versions/gcc47
homebrew/dupes/apple-gcc42      homebrew/versions/gcc48
homebrew/versions/gcc43         homebrew/versions/gcc49
homebrew/versions/gcc44         homebrew/versions/gcc5
homebrew/versions/gcc45         homebrew/versions/llvm-gcc28
homebrew/versions/gcc46

However, the dependency you are missing is not isl but isl011. You can install it with

$ brew install isl011

We can see that this is a dependency of gcc49 with

$ brew info gcc49
==> Dependencies
Required: gmp4 ✔, libmpc08 ✔, mpfr2 ✔, cloog018 ✔, isl011 ✔
IKavanagh
  • 6,089
  • 11
  • 42
  • 47
  • 1
    The problem is caused by updated Xcode. "$ xcode-select --install" – Justus Jianxing Zhang Sep 26 '15 at 00:09
  • 1
    I've recently updated XCode and not have to run `xcode-select --install`. It would appear that you uninstalled the command line developer tools or upgraded from a version of XCode that had them bundled to one that didn't. However, the correct method to install GCC 4.9 is still that in my answer. – IKavanagh Sep 26 '15 at 11:42
  • 1
    You are right!!! My mac is broken few weeks ago, and sent to apple store to be repaired. They changed my logicBoard, and I totally forget that – Justus Jianxing Zhang Sep 26 '15 at 11:46
3

The problem is caused by updated Xcode. Need run : "$ xcode-select --install"