rocker-org / rocker-versioned

Run current & prior versions of R using docker
https://hub.docker.com/r/rocker/r-ver
GNU General Public License v2.0
297 stars 169 forks source link

littler (r) fails in rocker/tidyverse:latest #214

Closed danielarantes closed 4 years ago

danielarantes commented 4 years ago

Some builds (devtools::build()) started failing and I noticed it happens under r (littler) and not Rscript.

> docker run rocker/tidyverse:latest r -pe 'sessionInfo()'
Error in La_library() : LAPACK routines cannot be loaded
In addition: Warning message:
In La_library() :
  unable to load shared object '/usr/local/lib/R/modules//lapack.so':
  libRlapack.so: cannot open shared object file: No such file or directory

Using Rscript

> docker run rocker/tidyverse:latest Rscript -e 'sessionInfo()'
R version 4.0.0 (2020-04-24)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04 LTS

Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C             
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

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

loaded via a namespace (and not attached):
[1] compiler_4.0.0

Using rocker/tidyverse:3.6.3

> docker run rocker/tidyverse:3.6.3 r -pe 'sessionInfo()'
R version 3.6.3 (2020-02-29)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 10 (buster)

Matrix products: default
BLAS/LAPACK: /usr/lib/x86_64-linux-gnu/libopenblasp-r0.3.5.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=C             
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] utils base 

loaded via a namespace (and not attached):
[1] compiler_3.6.3
cboettig commented 4 years ago

@danielarantes thanks very much for the report. confirmed.

@eddelbuettel Must admit I'm not sure what I've done wrong here. littler is installed as before, but I must have done something untoward with the BLAS setup? As @danielarantes shows above, it is looking for BLAS in /usr/local/lib/R/modules//lapack.so, which does exist on the container (though not sure what's up with that extra /). As you can also see in @danielarantes 's example, the standard R script is happy, though it is binding to openblas, /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.8.so. Any ideas?

eddelbuettel commented 4 years ago

I also scratched my head. I don't have the exact same container here but a 'close enough' rocker/rstudio:latest and it looks similar. And I don't understand how.

It doesn't seem to happen to my containers. And r is also happy within the container when invoked. Beats me.

cboettig commented 4 years ago

@danielarantes Dirk spotted my bug, we should have a fix up soon. Thanks again for the report

danielarantes commented 4 years ago

Glad you guys could find it. What was it? Something in the libpath? Rocker is a beautiful resource!

eddelbuettel commented 4 years ago

Just an oversight / basic bug in the configure step and due to the (currently used) local compilation (which we may be able to overcome once R 4.0.0 is formally in Debian / Ubuntu). Nothing nefarious :)

cboettig commented 4 years ago

Thanks @danielarantes , specifically it was https://github.com/rocker-org/rocker-versioned2/commit/bb69efd47695675f465c3b725953549696f0aefa#diff-13c178e5bbfd4ebb324258f759ea0d69R121

(Under the hood, we're migrating the rocker-versioned stack to Ubuntu LTS base and constructing the stack with templating, which should make it easier to mix and match. Apparently it also meant me messing up some copy-paste! We'll have a formal announcement of these changes once good folks like yourself have helped us squash any bugs it may have introduced!)