Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 884333 - dev-lang/R-4.2.1 fails to compile vignette (reshape.tex)
Summary: dev-lang/R-4.2.1 fails to compile vignette (reshape.tex)
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Science Mathematics related packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-04 17:20 UTC by Kristian Niemi
Modified: 2022-12-30 13:28 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,162.36 KB, text/x-log)
2022-12-04 17:21 UTC, Kristian Niemi
Details
emerge --info (emerge_info,8.02 KB, text/plain)
2022-12-04 17:22 UTC, Kristian Niemi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kristian Niemi 2022-12-04 17:20:25 UTC
Emerge of currently stable =dev-lang/R-4.2.1 fails during compile of vignettes, specifically `reshape.tex`.

Reproducible: Always

Steps to Reproduce:
1. emerge dev-lang/R
2.
3.
Actual Results:  
```
 * ERROR: dev-lang/R-4.2.1::gentoo failed (compile phase):
 *   emake failed
```

Expected Results:  
Successful compile.



```
building/updating vignettes for package 'stats' ...
processing 'reshape.Rnw'
Error: compiling TeX file 'reshape.tex' failed with message:
Running 'texi2dvi' on 'reshape.tex' failed.
Messages:
/usr/bin/texi2dvi: TeX neither supports -recorder nor outputs \openout lines in its log file
Execution halted
make[1]: *** [Makefile:103: vignettes] Error 1
make[1]: Leaving directory '/var/tmp/portage/dev-lang/R-4.2.1/work/R-4.2.1/src/library'
make: *** [Makefile:80: vignettes] Error 2
make: *** Waiting for unfinished jobs....
Warning in file(con, "r") :
  cannot open file 'NEWS.log': No such file or directory
Error in file(con, "r") : cannot open the connection
Calls: <Anonymous> ... .get_LaTeX_errors_from_log_file -> readLines -> file
Execution halted
make[1]: *** [Makefile:74: NEWS.pdf] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/var/tmp/portage/dev-lang/R-4.2.1/work/R-4.2.1/doc'
```

Attaching full `build.log`.

Have tried with various combinations of USE-flags; have tried with unstable R-4.2.2 as well as previous (currently not in tree) 4.2.0; same error with all.
Comment 1 Kristian Niemi 2022-12-04 17:21:17 UTC
Created attachment 839903 [details]
build.log
Comment 2 Kristian Niemi 2022-12-04 17:22:12 UTC
Created attachment 839905 [details]
emerge --info
Comment 3 Kristian Niemi 2022-12-20 21:12:42 UTC
Tried the old ebuild for R-4.2.0; compile failed with the same error.

Tried the still-masked 4.2.2; compile failed with the same error.
Comment 4 Kristian Niemi 2022-12-20 21:19:47 UTC
Same with 4.1.2.
Comment 5 Kristian Niemi 2022-12-20 21:36:33 UTC
Same with 4.1.0-r2.

However, 4.0.5-r1 builds successfully!
Comment 6 Michael Orlitzky gentoo-dev 2022-12-23 03:53:55 UTC
It looks like,

> /usr/bin/texi2dvi: TeX neither supports -recorder nor outputs \openout lines in its log file

is too vague of an error message and gets output whenever the TeX installation is broken somehow. I don't suppose you have any of

  BIBER, BIBTEX, DVIPDF, DVIPS, HEVEA, LATEX, MAKEINDEX, MAKEINFO, PDFLATEX, 
  PDFTEX, SED, T4HT, TEX, TEX4HT, TEXINDEX, THUMBPDF_CMD

set in your environment? Those will be used by texi2dvi, and if any are set to a bad value it will produce the error message above.

If not, you might try running texi2dvi --debug on reshape.tex manually to see what happens.
Comment 7 Kristian Niemi 2022-12-25 13:48:54 UTC
Thank you for replying, Michael.

None of the variables you mention seem to be set.

I can't run tex2dvi reshape.tex as it doesn't exist. What I've got are three files, .R, .Rd, .Rnw. 

```
# fd reshape
work/R-4.2.1/src/library/stats/R/reshape.R
work/R-4.2.1/src/library/stats/man/reshape.Rd
work/R-4.2.1/src/library/stats/vignettes/reshape.Rnw
```

I guess compiling one or more of these would produce the .tex. I tried to find out the commands I'd have to run to accomplish this, but too unfamiliar with this part of the R system.
Comment 8 Michael Orlitzky gentoo-dev 2022-12-30 13:28:58 UTC
The "vignettes" target in src/library/Makefile is what's triggering this step, but unfortunately it calls the just-built R and executes "install_package_vignettes" from src/library/tools/R/admin.R.

I try to maintain it, but I don't actually *use* R, so I get a bit lost at this point. It looks like there's a two step process that converts the .Rnw file to .tex, and then the .tex file to PDF. I think it intends to stop if no tex file is created,

  if (vignette_is_tex(output)) {
    # here it tries to process the tex file
  }

but your error message suggests that it made it into that "if" statement above, i.e. I would naively expect you to have a reshape.tex file. However, the vignette_is_tex() function basically just looks for ".tex' at the end of the filename. So I guess the call that creates the output file,

  output <- tryCatch({
      engine$weave(file, pdf = TRUE, eps = FALSE, quiet = TRUE,
                  keep.source = keep.source, stylepath = FALSE)
      setwd(buildDir)
      find_vignette_product(name, by = "weave", engine = engine)
  }, error = function(e) {
      stop(gettextf("running %s on vignette '%s' failed with message:\n%s",
           engine[["name"]], file, conditionMessage(e)),
           domain = NA, call. = FALSE)
  })

is returning a string "reshape.tex" but somehow not actually creating a file called reshape.tex? This is where it would be nice if I knew R.