This emerged during a 'brew upgrade'.
if you brew rm gfortran (I guess you have installed that) and brew tap homebrew/dupes and brew install apple-gcc42, do you get the same err?
brew rm gfortran
brew tap homebrew/dupes
brew install apple-gcc42
I had a similar looking issue in my homebrew-python tap where people report that for older Macs the gfortran 4.7/4.8 don't build scipy.
please post your brew --config, too. (And what does brew doctor)
Sorry about that -- brew --config and brew doctor output were in the original gist, but I've broken them out into separate files for legibility.
I'll try your suggestion next.
I get what appears to be the same error from brew upgrade r after successfully running brew tap homebrew/dupes ; brew install apple-gcc42. If it's useful, I can collect and attach that output here.
brew upgrade r
brew tap homebrew/dupes ; brew install apple-gcc42
Something curious: when I ran brew uninstall gfortran, it uninstalled 4.8.0 but left 4.2.4 installed, and brew outdated continued to warn about gfortran. A second brew uninstall gfortran removed 4.2.4 and silenced the warning.
brew uninstall gfortran
I followed as you said: brew rm gfortran, brew tap homebrew/dupes and brew install apple-gcc42, and then brew install r. This time it did not give the error which I was getting with gfortran, and actually compiled R.
brew install r
Still failing for me after the same steps.
I posted this on 18947 too. This is the error I get.
Already downloaded: /Library/Caches/Homebrew/r-3.0.0.tar.gz
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> ./configure --prefix=/usr/local/Cellar/r/3.0.0 --with-aqua --enable-R-framew
rm -f libbz2.a
ar cr libbz2.a blocksort.o bzlib.o bzcompress.o crctable.o decompress.o huffman.o randtable.o
make: *** [R] Error 1
make: *** [R] Error 1
I had the same issue, but in my case the installation stopped when attempting to run ./configure
For the record: OS X 10.8.3, Xcode 4.6.2, Homebrew 0.9.4
Based on @samueljohn suggestions:
1. I checked what version of gfortran was installed, which happened to be 4.8, then brew rm gfortran which effectively uninstalled gfortran 4.8.0
2. Checked if there were previous versions left using brew list gfortran and found gfortran 4.7.2
3. Uninstalled 4.7.2 with brew rm gfortran
4. Checked again for older versions with brew list gfortran and got No such keg: /usr/local/Cellar/gfortran
5. brew tap homebrew/dupes then brew install apple-gcc42
6. brew install r succeeded building r 3.0.0
brew list gfortran
No such keg: /usr/local/Cellar/gfortran
So apparently the newer versions of gfortran (4.8.0) were causing the problem.
That approach also worked for me after setting (prior to brew install r)
The build gives a warning, saying that it is using an alternative, unsupported fortran compiler … but it builds successfully ... gfortran v 4.8.0 does seem to be the trouble.
Try brew rm gmp && brew update and reinstall; we've temporarily removed the gmp bottle as it seems to have been causing this issue due to not picking up the correct compile-time options.
brew rm gmp && brew update