5

I am installing lme4 using the README.md file on their github account and I fail during installing the dependencies. I tried to install them separately and still crash at installing the minqa package. I'm using R/3.0.2 on RHEL6. During the build the compiler argues about RScript not existing which as I check it is in the R/bin folder.

Here is the log to the R INSTALL:

$ R CMD INSTALL minqa_1.2.2.tar.gz 
* installing to library ‘/gpfs/apps/x86_64-rhel6/R/3.0.2/R/library’
* installing *source* package ‘minqa’ ...
** package ‘minqa’ successfully unpacked and MD5 sums checked
** libs
gfortran   -fpic  -g -O2  -c altmov.f -o altmov.o
gfortran   -fpic  -g -O2  -c bigden.f -o bigden.o
gfortran   -fpic  -g -O2  -c biglag.f -o biglag.o
gfortran   -fpic  -g -O2  -c bobyqa.f -o bobyqa.o
gfortran   -fpic  -g -O2  -c bobyqb.f -o bobyqb.o
gfortran   -fpic  -g -O2  -c lagmax.f -o lagmax.o
g++ -I/gpfs/apps/x86_64-rhel6/R/3.0.2/R/include -DNDEBUG  -I/usr/local/include -I"/gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/Rcpp/include"   -fpic  -g -O2  -c minqa.cpp -o minqa.o
gfortran   -fpic  -g -O2  -c newuoa.f -o newuoa.o
gfortran   -fpic  -g -O2  -c newuob.f -o newuob.o
gfortran   -fpic  -g -O2  -c prelim.f -o prelim.o
gfortran   -fpic  -g -O2  -c rescue.f -o rescue.o
gfortran   -fpic  -g -O2  -c trsapp.f -o trsapp.o
gfortran   -fpic  -g -O2  -c trsbox.f -o trsbox.o
gfortran   -fpic  -g -O2  -c trstep.f -o trstep.o
gfortran   -fpic  -g -O2  -c uobyqa.f -o uobyqa.o
gfortran   -fpic  -g -O2  -c uobyqb.f -o uobyqb.o
gfortran   -fpic  -g -O2  -c update.f -o update.o
gfortran   -fpic  -g -O2  -c updatebobyqa.f -o updatebobyqa.o
Rscript execution error: No such file or directory
g++ -shared -L/usr/local/lib64 -o minqa.so altmov.o bigden.o biglag.o bobyqa.o bobyqb.o lagmax.o minqa.o newuoa.o newuob.o prelim.o rescue.o trsapp.o trsbox.o trstep.o uobyqa.o uobyqb.o update.o updatebobyqa.o -lgfortran -lm -L/gpfs/apps/x86_64-rhel6/R/3.0.2/R/lib -lR
Rscript execution error: No such file or directory
installing to /gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/minqa/libs
** R
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) : 
  unable to load shared object '/gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/minqa/libs/minqa.so':
  /gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/minqa/libs/minqa.so: undefined symbol: _ZTIN4Rcpp7RObjectE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/gpfs/apps/x86_64-rhel6/R/3.0.2/R/library/minqa’
Ben Bolker
  • 211,554
  • 25
  • 370
  • 453
HoofarLotusX
  • 562
  • 2
  • 5
  • 11
  • This is pretty weird. It *might* be better to ask on r-sig-mixed-models, but ... I think this must be some kind of generic environment configuration problem. Are you able to: (1) install CRAN packages from source? (2) install other packages via `devtools::install_github`? Since `minqa` is on CRAN, please try simply `install.packages("minqa")` first, then re-try your `install_github("lme4","lme4")` ... – Ben Bolker Jan 15 '14 at 22:57
  • PS all I get from googling your error message is [this non-reproducible R bug](https://bugs.r-project.org/bugzilla3/show_bug.cgi?id=14493) ... what do you get from `system("which Rscript")` ? – Ben Bolker Jan 15 '14 at 22:59
  • @BenBolker `[install@lionxv 3.0.2]$ which Rscript /usr/global/R/3.0.2/R/bin/Rscript` – HoofarLotusX Jan 17 '14 at 00:11
  • Do agree, this is pretty weird. It worked pretty straight forward for R/3.0.1. I could install CRAN packages from source and didn't try the devtools::install_github. I'll give it a shot. I also ran `install.package("minqa", dependencies=TRUE)` and still getting the same error. – HoofarLotusX Jan 17 '14 at 00:20
  • This worked instead of g++ compiler. This log is coming from OS RHEL5: `icpc -shared -L/usr/local/lib64 -o minqa.so altmov.o bigden.o biglag.o bobyqa.o bobyqb.o lagmax.o minqa.o newuoa.o newuob.o prelim.o rescue.o trsapp.o trsbox.o trstep.o uobyqa.o uobyqb.o update.o updatebobyqa.o -L/gpfs/apps/x86_64-rhel5/R/3.0.1/lib64/R/library/Rcpp/lib -lRcpp -Wl,-rpath,/gpfs/apps/x86_64-rhel5/R/3.0.1/lib64/R/library/Rcpp/lib -lifport -lifcore -limf -lsvml -lm -lipgo -lirc -lpthread -lirc_s -ldl -L/usr/global/R/3.0.1/lib64/R/lib -lR installing to /gpfs/apps/x86_64-rhel5/R/3.0.1/lib64/R/library/minqa/libs` – HoofarLotusX Jan 17 '14 at 00:26
  • (1) I wanted you to run the `which` command from within R (so we could see what environment R thought it was running in), not from the shell. (2) If `install.package("minqa")` fails it is probably worth taking this up on the r-devel@r-project.org mailing list ... – Ben Bolker Jan 17 '14 at 00:29
  • `system("which Rscript")` gives me the same output. And, sure I will take it on the r-dev mailing list.. – HoofarLotusX Jan 17 '14 at 00:45
  • Note that I source some files in my `.Rprofile`. This actually prevented `minqa` from being installed, as somehow it could then not find these files anymore. Removing this automatic sourcing of some files temporarily allowed everything to work. – PascalVKooten Mar 02 '14 at 14:22

2 Answers2

19

A similar error also occurs when trying to upgrade lme4 from 1.0-5 to 1.0-6. The error message is something like:

Error in dyn.load(file, DLLpath = DLLpath, ...) :
  unable to load shared object '/usr/local/lib/R/site-library/minqa/libs/minqa.so':
  libRcpp.so: cannot open shared object file: No such file or directory
ERROR: lazy loading failed for package ‘lme4’

To resolve this install the packages in the order below:

install.packages('Rcpp')
install.packages('RcppEigen')
install.packages('minqa')
install.packages('lme4')

I guess it's related to RCpp; just upgrade the version from 0.10.6 to 0.11.0 and some ABI break change happens?

Credit from dmbates

iacob
  • 20,084
  • 6
  • 92
  • 119
Eric Guo
  • 1,755
  • 17
  • 25
0

/usr/share/R/share/make/shlib.mk:6: recipe for target 'minqa.so' failed make: *** [minqa.so] Error 1

I got the same error when installing minqa (needed for lme4). It was due to modify .First() in /etc/R/Rprofile.site

Desactive .First or use R --vanilla.