rdockerlittler

checkCompilerOptions Error while installing package (littler/Docker)


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.


Solution

  • 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.