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

rhub_check() fails in processing a vignette. #629

Closed
rolfTurner opened this issue Aug 1, 2024 · 5 comments
Closed

rhub_check() fails in processing a vignette. #629

rolfTurner opened this issue Aug 1, 2024 · 5 comments

Comments

@rolfTurner
Copy link

I need to to build a Windoze binary of a package that I am developing.
I tried to do this using rhub v2. First, I created a github repository for the package,
explicitly https://github.com/rolfTurner/kanova. Then I went to the local (cloned) directory for the package, started R, and executed

library(rhub)
rhub_check(platforms="windows")

After some time, failure was reported. The problem seems to be with
the vignette. I pre-compiled the vignette, doing

pdflatex testStat.ltx

in the vignettes directory. This creates a file testStat.pdf in that directory. In "ordinary circumstances" (doing a local build), the build uses this pre-compiled file (i.e. testStat.pdf).

However when I use rhub_check(), the system seems not to use
testStat.pdf, tries to re-compile testStat.ltx and complains that
pdflatex is not available. See the screenshot:

Screenshot 2024-08-02 at 11-20-32 incredulous-allosaurus windows · rolfTurner_kanova@1444609

Is there any way to either:

(a) get rhub_check() to use the pre-compiled file testStat.pdf, or
(b) make pdflatex available to rhub_check() ?

Thanks for any ideas.

@gaborcsardi
Copy link
Collaborator

I am not sure how the prebuilt vignette is supposed to work, but this certainly needs latex for me when I run R CMD build:

❯ R CMD build kanova
* checking for file ‘kanova/DESCRIPTION’ ... OK
* preparing ‘kanova’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... ERROR
--- re-building ‘testStat.ltx’ using tex
Error: processing vignette 'testStat.ltx' failed with diagnostics:
Running 'texi2dvi' on 'testStat.ltx' failed.
LaTeX errors:
! LaTeX Error: File `isodate.sty' not found.

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

! Emergency stop.
<read *>

l.11 \usepackage
                [round]{natbib}^^M
!  ==> Fatal error occurred, no output PDF file produced!
--- failed re-building ‘testStat.ltx’

SUMMARY: processing the following file failed:
  ‘testStat.ltx’

Error: Vignette re-building failed.
Execution halted

@rolfTurner
Copy link
Author

There is some difference, somewhere, between your system and mine.
Building locally, I get

R CMD build  kanova  
* checking for file ‘kanova/DESCRIPTION’ ... OK
* preparing ‘kanova’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
* re-saving image files
* building ‘kanova_0.1-7.tar.gz’

No complaints, no problem. And the tarball can be installed, again without problem.

@gaborcsardi
Copy link
Collaborator

Because you have a complete LaTeX installation, and I don't. That's my point. R CMD build is still building the vignette, it is not using the pre-built vignette. Not just on R-hub, but on my machine as well and I would guess everywhere. So this is not an issue with R-hub.

@rolfTurner
Copy link
Author

Well, I'll have to find another approach. :-(

@gaborcsardi
Copy link
Collaborator

Literally all I did was adding back the deleted workflow file, and apart from some minor check issues, it is working fine: https://github.com/gaborcsardi/kanova/actions/runs/10226059265

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants