r 3.0.0 failed to build on 10.7.5 #18997

Closed
jfoy opened this Issue Apr 5, 2013 · 10 comments

Projects

None yet

5 participants

@jfoy

This emerged during a 'brew upgrade'.

https://gist.github.com/jfoy/5322192

@samueljohn

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?

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.

@samueljohn

please post your brew --config, too. (And what does brew doctor)

@jfoy

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.

@jfoy

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.

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.

@ghost

@samueljohn
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.
Thank you!

@jfoy

Still failing for me after the same steps.

@kilduffec

I posted this on 18947 too. This is the error I get.

Downloading http://cran.r-project.org/src/base/R-3/R-3.0.0.tar.gz
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
==> make
rm -f libbz2.a
ar cr libbz2.a blocksort.o bzlib.o bzcompress.o crctable.o decompress.o huffman.o randtable.o
ranlib libbz2.a
make[1]: *** [R] Error 1
make: *** [R] Error 1

@coffeerv

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

So apparently the newer versions of gfortran (4.8.0) were causing the problem.

@kilduffec

That approach also worked for me after setting (prior to brew install r)

export FC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gfortran

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.

@adamv

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.

@adamv adamv closed this Apr 22, 2013
@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.