[R-SIG-Mac] [R-sig-ME] installing lme4.0 on OS X 10.9
Simon Urbanek
simon.urbanek at r-project.org
Mon Feb 10 20:12:49 CET 2014
On Feb 10, 2014, at 1:26 PM, Levy, Roger <rlevy at ucsd.edu> wrote:
> Thank you! Installing gfortran-4.2.3.pkg fixed things. FWIW, it was indeed the most recent build of R that I had installed.
>
> So that I (and perhaps other list members) understand the issues more completely: one thing that was very confounding to me is that installing gcc49 via MacPorts *does* provide a Fortran compiler, which goes in /opt/local/bin/gfortran. However, I couldn’t figure out how to get R to use this compiler. Perhaps this requires properly setting variables in ~/.R/Makevars, but I couldn’t figure out what the proper settings would be. Do you have any guidance on this?
>
The CRAN build is a native build of R and only supports native compilers. If you use MacPorts you're entirely on your own - you may want to use MacPorts R in that case or compile everything from sources accordingly.
Cheers,
Simon
> Best & thanks once more.
>
> Roger
>
>
>
> On Feb 10, 2014, at 11:08 AM, Simon Urbanek <simon.urbanek at r-project.org> wrote:
>
>> Roger does not seem to have a working Fortran compiler which is required for lme4. He may want to install one, e.g. from
>> http://cran.r-project.org/bin/macosx/tools/
>>
>> BTW: please don't point people to obsolete SO posts - the proper cure to most Mavericks problems is to simply install more recent build of R.
>>
>> Cheers,
>> Simon
>>
>>
>> On Feb 10, 2014, at 6:09 AM, Cole, Tim <tim.cole at ucl.ac.uk> wrote:
>>
>>> I'm forwarding this to R-sig-Mac.
>>>
>>> Tim Cole
>>> --
>>> Tim.Cole at ucl.ac.uk<mailto:Tim.Cole at ich.ucl.ac.uk> Phone +44(0)20 7905 2666 Fax +44(0)20 7905 2381
>>> Centre for Paediatric Epidemiology and Biostatistics
>>> UCL Institute of Child Health, London WC1N 1EH, UK
>>>
>>> From: Tobias Heed <tobias.heed.uhh at gmail.com<mailto:tobias.heed.uhh at gmail.com>>
>>> To: Levy, Roger <rlevy at ucsd.edu<mailto:rlevy at ucsd.edu>>
>>> Cc: "=?utf-8?Q?r-sig-mixed-models=40r-project.org?="
>>> <r-sig-mixed-models at r-project.org<mailto:r-sig-mixed-models at r-project.org>>
>>> Subject: Re: [R-sig-ME] installing lme4.0 on OS X 10.9
>>> Message-ID: <etPan.52f88faa.3730bb65.2e5a at Macintosh.local<mailto:etPan.52f88faa.3730bb65.2e5a at Macintosh.local>>
>>> Content-Type: text/plain
>>>
>>> Roger,
>>>
>>> sorry to hear this didn’t work. Unfortunately, I do not recall everything I tried back then. I do recall that the problem was that gcc doesn’t come with Mavericks. A few things still,
>>> 1, after reinstalling your Mac, did you update XCode? This is probably necessary.
>>> 2, after making the Makevars file, did you restart R?
>>>
>>> Assuming that most probably you did both, I found these links in my notes, maybe they can point you in the right direction.
>>> http://stackoverflow.com/questions/19503995/error-when-with-xcode-5-0-and-rcpp-command-line-tools-are-installed
>>> http://stackoverflow.com/questions/19533220/cannot-install-r-package-from-source-in-mac-osx-maverick
>>>
>>> hope this helps.
>>> Best,
>>> Tobias
>>>
>>>
>>> --
>>> --------------------------------------------------------------------------------------------------------------
>>> Tobias Heed, PhD
>>> Biological Psychology and Neuropsychology
>>> Department of Psychology & Human Movement Science | University of Hamburg
>>> Von-Melle-Park 11, Room 208 | D-20146 Hamburg, Germany
>>> Phone: (49) 40 - 42838 5831 | Fax: (49) 40 - 42838 6591
>>> tobias.heed at uni-hamburg.de<mailto:tobias.heed at uni-hamburg.de> | Website | Google Scholar
>>> --------------------------------------------------------------------------------------------------------------
>>> From: Levy, Roger rlevy at ucsd.edu<mailto:rlevy at ucsd.edu>
>>> Reply: Levy, Roger rlevy at ucsd.edu<mailto:rlevy at ucsd.edu>
>>> Date: February 9,2014 at 23:41:48
>>> To: Tobias Heed tobias.heed.uhh at gmail.com<mailto:tobias.heed.uhh at gmail.com>
>>> Cc: r-sig-mixed-models at r-project.org<mailto:r-sig-mixed-models at r-project.org> r-sig-mixed-models at r-project.org<mailto:r-sig-mixed-models at r-project.org>
>>> Subject: Re: [R-sig-ME] installing lme4.0 on OS X 10.9
>>> 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:
>>>
>>> install.packages("lme4.0", repos="http://r-forge.r-project.org",type="source")
>>> …
>>> <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<mailto:tobias.heed.uhh at gmail.com>> wrote:
>>>
>>> Dear Roger,
>>>
>>> if I remember correctly, this solved the problem for me:
>>> on the top level of your user account, create a folder .R (if it’s not there yet);
>>> in there, create a new text file named Makevars;
>>> into this file, paste the following:
>>>
>>> CC=clang
>>> CXX=clang++ -arch x86_64 -ftemplate-depth-256 -stdlib=libstdc++
>>> CXXFLAGS= -O3 -pedantic
>>>
>>> hope it helps
>>> Best,
>>> Tobias
>>>
>>>
>>> From: Levy, Roger rlevy at ucsd.edu<mailto:rlevy at ucsd.edu>
>>> Reply: Levy, Roger rlevy at ucsd.edu<mailto:rlevy at ucsd.edu>
>>> Date: February 7,2014 at 20:59:11
>>> To: r-sig-mixed-models at r-project.org<mailto:r-sig-mixed-models at r-project.org> r-sig-mixed-models at r-project.org<mailto:r-sig-mixed-models at r-project.org>
>>> Subject: [R-sig-ME] installing lme4.0 on OS X 10.9
>>> 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:
>>>
>>>> install.packages("lme4.0", repos="http://r-forge.r-project.org",type="source")
>>> 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:
>>>
>>>> sessionInfo()
>>> 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
>>>
>>> _______________________________________________
>>> R-sig-mixed-models at r-project.org<mailto:R-sig-mixed-models at r-project.org> mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>>>
>>> [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> R-SIG-Mac mailing list
>>> R-SIG-Mac at r-project.org
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>>
>> _______________________________________________
>> R-sig-mixed-models at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>
More information about the R-SIG-Mac
mailing list