This repository has been archived by the owner. It is now read-only.

r failed to build on 10.8.3 #18947

Closed
catalandres opened this Issue Apr 3, 2013 · 23 comments

Comments

Projects
None yet
9 participants
Contributor

jacknagel commented Apr 3, 2013

This appears to be #15063, which was never resolved because nobody could reproduce it.

Contributor

catalandres commented Apr 4, 2013

The issue persists if I delete all formulas and start with a fresh brew.

Contributor

adamv commented Apr 5, 2013

Does this happen with R 3.0.0, which we recently updated to?

Contributor

catalandres commented Apr 5, 2013

Yes. I updated brew before the fresh start.
Would you want me to update the Gist?

same here. would be great if this could be resolved.

This is the error I get when I try to upgrade (or now install) R 3.0

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

Contributor

catalandres commented Apr 15, 2013

@kilduffec Yours seems to be a different error. How about you open a separate ticket? (https://github.com/mxcl/homebrew/wiki/Troubleshooting)

Contributor

catalandres commented May 22, 2013

I have been able to install it (v 3.0.1) with brew install r --env=std.

Before that, I had reinstalled gfortran, but I am not sure it has much to do with it.

Contributor

adamv commented May 22, 2013

We did have a packaging update to fortran recently, though I'm not sure if that affects this issue either. If we get more reports we may need to add env :std, but it seems most people can install without this?

@adamv adamv closed this May 22, 2013

Contributor

catalandres commented May 22, 2013

Just to be clear: I tried, and in my system it does not install without --env=std

@adamv adamv reopened this May 22, 2013

Contributor

adamv commented May 22, 2013

We probably need a gist of the full brew install -v --env=std r and config.log output to diagnose this.

Contributor

adamv commented May 22, 2013

Also for the successful build.

Contributor

catalandres commented May 22, 2013

It's all in the same gist. (The successful build did not get a config.log, though)

filkry commented Jun 11, 2013

I am unable to compile using brew install r --env=std, I still get the error above. I've reinstalled gfortran as well with no effect. brew doctor also says I'm good to go.

Contributor

samueljohn commented Jun 11, 2013

Sorry, I can't reproduce

brew install r -v
/homebrew/Cellar/r/3.0.1: 1529 files, 54M, built in 7.2 minutes

My log of successful brewing is here: https://gist.github.com/samueljohn/5757158

My brew --config:

brew --config                                                               
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew.git
HEAD: 8ceb981170d10cdb3f4f89a381201ceec9f97fa3
HOMEBREW_PREFIX: /homebrew
HOMEBREW_CELLAR: /homebrew/Cellar
CPU: 8-core 64-bit sandybridge
OS X: 10.8.3-x86_64
Xcode: 4.6.2
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: 2.7.4 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /homebrew/bin/python => /homebrew/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

keers commented Jun 11, 2013

Still fails for me:

brew install r -v

Error: r did not build
Log: https://gist.github.com/keers/5757228

brew --config
HOMEBREW_VERSION: 0.9.4
ORIGIN: https://github.com/mxcl/homebrew
HEAD: afaaab19aec1b24aa2d5a1d49bb07679ed10b563
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit sandybridge
OS X: 10.8.4-x86_64
Xcode: 4.6.2
CLT: 4.6.0.0.1.1365549073
LLVM-GCC: build 2336
Clang: 4.2 build 425
X11: 2.7.4 => /opt/X11
System Ruby: 1.8.7-358
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby

Same error with bash brew install r --env=std

Contributor

samueljohn commented Jun 11, 2013

The error seems to be

cc -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o tools.so text.o init.o Rmd5.o md5.o signals.o install.o getfmts.o http.o gramLatex.o gramRd.o -L../../../../lib -lR -dylib_file libRblas.dylib:../../../../lib/libRblas.dylib -Wl,-framework -Wl,CoreFoundation
brew: superenv removed: -L/usr/local/lib
make[6]: `Makedeps' is up to date.
mkdir ../../../../library/tools/libs
dyld: Symbol not found: _rl_sort_completion_matches
  Referenced from: /private/tmp/r-0r9Q/R-3.0.1/lib/libR.dylib
  Expected in: flat namespace
 in /private/tmp/r-0r9Q/R-3.0.1/lib/libR.dylib
/bin/sh: line 1: 55080 Done                    echo "tools:::.install_package_description('.', '"../../../library/tools"')"
     55081 Trace/BPT trap: 5       | R_DEFAULT_PACKAGES=NULL ../../../bin/R --vanilla --slave > /dev/null

posting it here because someone may have an idea ...

On my homebrew which is NOT at /usr/local, the relevant lines are:

cc -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o tools.so text.o init.o Rmd5.o md5.o signals.o install.o getfmts.o http.o gramLatex.o gramRd.o -L../../../../lib -lR -dylib_file libRblas.dylib:../../../../lib/libRblas.dylib -Wl,-framework -Wl,CoreFoundation
make[6]: `Makedeps' is up to date.
mkdir ../../../../library/tools/libs
building package 'compiler'

So could the -L/usr/local/lib be a problem here?
The only other difference is that I don't have the Command Line Tools for Xcode.

@keers if you don't mind, can you please cd /tmp and
mkdir homebrew && curl -L https://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C homebrew
Then, temporarily export PATH=/tmp/homebrew/bin:$PATH and brew install r (it should install into that temporary homebrew installation). So we see if this issue is related to some lib in /usr/local/lib. If could still find some lib you brewed at /usr/local/lib ... so one could try to brew unlink some formulae to rule that out.

keers commented Jun 11, 2013

@samueljohn seems that worked:

==> Finishing up
ln -s ../../Cellar/r/3.0.1/etc/bash_completion.d/R R
ln -s ../Cellar/r/3.0.1/bin/Rscript Rscript
ln -s ../Cellar/r/3.0.1/bin/R R
ln -s ../../../Cellar/r/3.0.1/share/man/man1/Rscript.1 Rscript.1
ln -s ../../../Cellar/r/3.0.1/share/man/man1/R.1 R.1
ln -s ../../Cellar/r/3.0.1/lib/pkgconfig/libR.pc libR.pc
ln -s ../../Cellar/r/3.0.1 r
ln -s ../Cellar/r/3.0.1 r
Warning: /private/tmp/homebrew/bin is not in your PATH
You can amend this by altering your ~/.bashrc file
==> Summary
Warning:  /private/tmp/homebrew/Cellar/r/3.0.1: 1532 files, 55M, built in 7.6 minutes

My /usr/local/lib is: https://gist.github.com/keers/5757847

Had a similar problem building R 3.0.1 on OS X 10.8.4 and gfortran upgrade fixed it for me (4.2.4 -> 4.8.1). Didn't need to use --env=std

Contributor

samueljohn commented Jun 19, 2013

So is this now fixed for all of you when upgrading gfortran?

Contributor

adamv commented Jul 18, 2013

Should we add env :std to R and close this ticket?

Contributor

adamv commented Aug 2, 2013

Presuming fixed by newer gfortran.

@adamv adamv closed this Aug 2, 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.