checkCompilerOptions Error while installing packag

2019-04-12 16:16发布

问题:

On its last line, this Docker file calls littler::install.r to install Rcpp RcppEigen and matrixStats.

The whole code was working like a charm a couple of months back. Now, it bombs at that last step. More precisely, Rcpp and RcppEigen still install perfectly, but when it comes to installing matrixStats, I get:

installing to /usr/local/lib/R/site-library/matrixStats/libs
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : 
  object 'checkCompilerOptions' not found
Calls: ::: -> get
Execution halted
ERROR: loading failed
* removing ‘/usr/local/lib/R/site-library/matrixStats’

The downloaded source packages are in
    ‘/tmp/downloaded_packages’
Warning message:
In install.packages(f, lib, if (isMatchingFile(f)) NULL else repos) :
  installation of package ‘matrixStats’ had non-zero exit status

It's an error I never had before and have trouble locating where it is even coming from. What could be causing this problem? Any info would already help a lot.

回答1:

From the top of my head I'd blame a change in matrixStats [ but see below and it appears blameless ] -- I am somewhat familiar with all the other moving parts and not aware of changes or bugs.

One thing that is fishy though is the trailing line break:

RUN install.r Rcpp RcppEigen  matrixStats \

You may try without it.

Edit: And for what it is worth I just fired up our standard base layer Docker image r-base via

docker run --rm -ti r-base /bin/bash

and invoked

install.r Rcpp RcppEigen matrixStats

which executed just fine.

So if sonething is wrong with that other Docker container you may have to take it up with its author and work through his changes relative to our Dockerfile he seems to have used as a base.



回答2:

However, with R-devel using rocker/r-devel,

docker run --rm -ti rocker/r-devel /bin/bash

RD

install.packages("matrixStats")

Gives the same error. I'm guessing this is another R-devel change which takes away things we took for granted before, in this case something to do with compiler package. I don't however have a solution, yet. Just (re-)installing or attaching compiler doesn't help.

Update

Using R CMD INSTALL --no-byte-compile allows backports to install for me, which was the package I was having trouble with.



标签: r docker littler