rocker-org / rocker-versioned2

Run current & prior versions of R using docker. rocker/r-ver, rocker/rstudio, rocker/shiny, rocker/tidyverse, and so on.
https://rocker-project.org
GNU General Public License v2.0
409 stars 173 forks source link

running installation tests #760

Open shug0131 opened 8 months ago

shug0131 commented 8 months ago

Container image name

rocker/verse:latest

Container image digest

rocker/verse@sha256:0ac249b2528f1a8914cdf0e09f26c950e152ee11da60230e25da42c44e7481fa

What operating system are you seeing the problem on?

Linux

System information

Docker engine V4.25.1. WIndows

Bug description

I'm wanting to carry out the installation testing as described in the manual

https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Testing-a-Unix_002dalike-Installation

I can get past the first step of tools::testInstalledBasic("both"), by modifying the basic install_R_source.R to add a couple of extra lines ( make install-tests ; chmod a+w /usr/local/lib/R/tests/) . See my fork https://github.com/shug0131/rocker-versioned2/blob/master/scripts/install_R_source.sh

But the subsequent two lines fail. Running it on your unaltered image (docker desktop on windows), and my altered one gives the same results.

How to reproduce this bug?

docker run --rm -ti -e DISABLE_AUTH=true -p 8787:8787 rocker/verse

The then command and output

> tools::testInstalledPackages(scope="base")
Testing examples for package ‘base’
Testing examples for package ‘tools’
Testing examples for package ‘utils’
Running vignettes for package ‘utils’
  Running ‘Sweave.Rnw’

*** Source Errors ***

File Sweave.R:
Running 'texi2dvi' on 'example-1.tex' failed.
LaTeX errors:
! LaTeX Error: File `grfext.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

! Emergency stop.
<read *> 

l.179   \RequirePackage{grfext}\relax
                                     ^^M
!  ==> Fatal error occurred, no output PDF file produced!

*** Weave Errors ***

File Sweave.Rnw:
 chunk 2 
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
  Running 'texi2dvi' on 'example-1.tex' failed.
LaTeX errors:
! LaTeX Error: File `grfext.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

! Emergency stop.
<read *> 

l.179   \RequirePackage{grfext}\relax
                                     ^^M
!  ==> Fatal error occurred, no output PDF file produced!

Testing examples for package ‘grDevices’
Testing examples for package ‘graphics’
Testing examples for package ‘stats’
Running vignettes for package ‘stats’
  Running ‘reshape.Rnw’
Testing examples for package ‘datasets’
Testing examples for package ‘methods’
Testing examples for package ‘grid’
Running vignettes for package ‘grid’
  Running ‘displaylist.Rnw’
  Running ‘frame.Rnw’
  Running ‘grid.Rnw’
  Running ‘grobs.Rnw’
  Running ‘interactive.Rnw’
  Running ‘locndimn.Rnw’
  Running ‘moveline.Rnw’
  Running ‘nonfinite.Rnw’
  Running ‘plotexample.Rnw’
  Running ‘rotated.Rnw’
  Running ‘saveload.Rnw’
  Running ‘sharing.Rnw’
  Running ‘viewports.Rnw’
Testing examples for package ‘splines’
Testing examples for package ‘stats4’
Testing examples for package ‘tcltk’
Error: testing 'tcltk' failed
shug0131 commented 7 months ago

I think I've made progress here. Following the suggestion https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Essential-and-useful-other-programs-under-a-Unix_002dalike I added the list of latex packages "For distributions based on TeX Live the simplest approach may be to install collections collection-latex, collection-fontsrecommended, collection-latexrecommended, collection-fontsextra and collection-latexextra (assuming they are not installed by default)" into the install_texlive.sh from line 57.

There maybe a fix that works with fewer latex packages, but I have not looked any further

I learnt that tex packages are not always individually installed, and tlmgr may require an input different from the package name. For example tlmg install grfext didn't fix it.

For the tc/tk testing It was resolve by also installing the tk lib. So adding in apt-install tk to one of the install_*.sh files.

This was found with a little bit of googling around, but is not officially documented anywhere. It seems tk-dev library is not enough.

Now the set of installation testing in https://cran.r-project.org/doc/manuals/r-release/R-admin.html#Testing-a-Unix_002dalike-Installation all run successfully.