Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running installation tests #760

Open
shug0131 opened this issue Feb 1, 2024 · 2 comments
Open

running installation tests #760

shug0131 opened this issue Feb 1, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@shug0131
Copy link

shug0131 commented Feb 1, 2024

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 shug0131 added the bug Something isn't working label Feb 1, 2024
@shug0131
Copy link
Author

shug0131 commented Feb 7, 2024

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.

@LDSamson
Copy link

LDSamson commented Nov 7, 2024

Just adding my two cents for anyone interested:

It a year ago I tested it, but I made the same tests work after much trial and error, by adding the following lines in the Dockerfile:

RUN apt-get update && apt-get install -y tzdata tk-dev && \
	tlmgr install colortbl booktabs fancyhdr caption grfext && \ 
	rm -rf /var/lib/apt/lists/*

I also needed to switch to libblas instead of openBLAS to reliably run the standard tests (see here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants