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

Tidyverse lazy loading problem pkgdown, broom, #160

Closed Firedrops closed 5 years ago

Firedrops commented 5 years ago

I'm trying to add the functions of r-verse to an existing docker, so I traced your Dockerfiles and copied each from back to the rstudio version.

The docker is failing at the tidyverse part, with these messages:

Error: package ‘MASS’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
Execution halted
ERROR: lazy loading failed for package ‘pkgdown’
* removing ‘/usr/local/lib/R/site-library/pkgdown’
* installing *source* package ‘broom’ ...
** package ‘broom’ successfully unpacked and MD5 sums checked
** using staged installation
** R
Warning: namespace ‘nlme’ is not available and has been replaced
by .GlobalEnv when processing object ‘mjoint_fit’
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Error: package ‘nlme’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
Execution halted
ERROR: lazy loading failed for package ‘broom’
* removing ‘/usr/local/lib/R/site-library/broom’
* installing *source* package ‘DT’ ...
** package ‘DT’ successfully unpacked and MD5 sums checked
** using staged installation
** 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 from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (DT)
* installing *source* package ‘rhub’ ...
** package ‘rhub’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (rhub)
ERROR: dependency ‘broom’ is not available for package ‘modelr’
* removing ‘/usr/local/lib/R/site-library/modelr’
* installing *source* package ‘devtools’ ...
** package ‘devtools’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (devtools)
ERROR: dependencies ‘broom’, ‘modelr’ are not available for package ‘tidyverse’
* removing ‘/usr/local/lib/R/site-library/tidyverse’

The downloaded source packages are in
    ‘/tmp/downloaded_packages’
Error: installation of package ‘tidyverse’ had non-zero exit status
In addition: Warning messages:
1: In install.packages(pkgs, ...) :
  installation of package ‘pkgdown’ had non-zero exit status
2: In install.packages(pkgs, ...) :
  installation of package ‘broom’ had non-zero exit status
3: In install.packages(pkgs, ...) :
  installation of package ‘modelr’ had non-zero exit status
4: In install.packages(pkgs, ...) :
  installation of package ‘tidyverse’ had non-zero exit status

I see that it's having problems with pkgdown, broom, but not sure what this means or how to fix it. Does anyone here know?

My Dockerfile is here if anyone wants to see the whole code. R part starts on line 183.

cboettig commented 5 years ago

Thanks for the bug report. It looks like you're building on google/cloud-sdk image instead of a Rocker image. The Rocker Dockerfiles aren't generally going to work on arbitrary base images, even if those are also debian-based (though it does look like that one is also building on stretch).

Have you considered extending a rocker image instead to just add the google/cloud-sdk libs? (https://hub.docker.com/r/google/cloud-sdk/dockerfile). In general we don't really have the bandwidth right now to troubleshoot R configs in dockerfiles we don't maintain :/

(Also IANAL and it's up to RStudio and not me to enforce their trademark, but you might note that the Rocker project obtained the required explicit permission to package RStudio in containers we distribute).

Firedrops commented 5 years ago

That's a good idea.

I tried using these scripts to manually install the dependencies right before the errors above, but it does not work. The installs appear successful but docker does not detect them.

I will try basing it on rocker/verse instead, seems like a much easier way of doing things.