Skip to content

installing lme4.0 on OS X 10.9

5 messages · Roger Levy, Hugo.Mildenberger at web.de, Tobias Heed

#
Hi all,

My Mac laptop died and I am now reinstalling all my packages from scratch.  Previously I was using lme4_0.999999-2 and I figure that with a fresh install, I might as well install lme4.0 instead.  But I am having trouble compiling it:
trying URL 'http://r-forge.r-project.org/src/contrib/lme4.0_0.999999-4.tar.gz'
Content type 'application/x-gzip' length 772384 bytes (754 Kb)
opened URL
==================================================
downloaded 754 Kb

* installing *source* package ?lme4.0? ...
** libs
llvm-gcc-4.2 -arch x86_64 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Matrix/include" -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/stats/include"   -fPIC  -mtune=core2 -g -O2  -c init.c -o init.o
/bin/sh: llvm-gcc-4.2: command not found


This happens even after I install Xcode and also llvm-gcc42 on MacPorts; 

Does anyone have any suggestions?  FWIW:
R version 3.0.2 (2013-09-25)
Platform: x86_64-apple-darwin10.8.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] tools_3.0.2


I?ve also tried installing from the command line; this bottoms out in a different error:

$ R CMD build lme4.0
?
<snip>
?
ld: warning: directory not found for option ?-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64?
ld: warning: directory not found for option ?-L/usr/local/lib/x86_64?
ld: warning: directory not found for option ?-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3?
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [lme4.so] Error 1


More generally, I?m having trouble figuring out what I should install in order to be able to compile lme4.0 from source.

Best & many thanks in advance for any guidance,

Roger Levy
2 days later
#
Thanks so much, Tobias.  Unfortunately, setting up a Makevars file like you suggested simply leaves me with the same errors in R as I get in the command line:
?
<snip>
?
clang -dynamiclib -Wl,-headerpad_max_install_names  -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -L/usr/local/lib -o lme4.so init.o lmer.o local_stubs.o -L/Library/Frameworks/R.framework/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64 -L/usr/local/lib/x86_64 -L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3 -lgfortran  -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
?
ld: warning: directory not found for option '-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3/x86_64'
ld: warning: directory not found for option '-L/usr/local/lib/x86_64'
ld: warning: directory not found for option '-L/usr/local/lib/gcc/i686-apple-darwin8/4.2.3'
ld: library not found for -lgfortran
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any further thoughts or suggestions on this, anyone?

Best

Roger
On Feb 7, 2014, at 12:06 PM, Tobias Heed <tobias.heed.uhh at gmail.com> wrote:

            
#
Roger,

the file lme4/src/Makevars contains the line

     PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`

so reinstalling Rcpp might help? libgfortran.so comes with gcc if fortran support 
was configured. I believe Rcpp or some other packages had been compiled by a 
rather old version of gcc.  You may run the Rscript command manually to
see if the Rcpp libraries are part of the problem.

Best

Hugo


On Sun, 9 Feb 2014 22:41:46 +0000
"Levy, Roger" <rlevy at ucsd.edu> wrote:

            
--