[Rd] R CMD build looking for texi2dvi in the wrong place (R-devel)

Dan Tenenbaum dtenenba at fredhutch.org
Tue Jan 13 01:50:27 CET 2015


R CMD build fails with recent R-devel because it is looking for texi2dvi in /usr/local/bin, but on this system, MacTex has installed it in /usr/bin.

$ R CMD build IRanges
* checking for file 'IRanges/DESCRIPTION' ... OK
* preparing 'IRanges':
* checking DESCRIPTION meta-information ... OK
* cleaning src
* installing the package to build vignettes
* creating vignettes ... ERROR
[...]
Warning in sub(object$syntax$docexpr, val, chunk[pos[1L]]) :
  argument 'replacement' has length > 1 and only the first element will be used
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,  : 
  Running 'texi2dvi' on 'IRangesOverview.tex' failed.
Messages:
sh: /usr/local/bin/texi2dvi: No such file or directory
Calls: <Anonymous> -> texi2pdf -> texi2dvi
Execution halted

That's with:

R Under development (unstable) (2015-01-11 r67421)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.9.5 (Mavericks)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base 

The same command works without error on:

R Under development (unstable) (2014-11-11 r66970)
Platform: x86_64-apple-darwin13.4.0 (64-bit)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

Setting 
options(texi2dvi='/usr/bin/texi2dvi')

in my ~/.Rprofile did not help, I suspect because R CMD build runs buildVignettes() in a subprocess started with --vanilla. Creating a symlink from /usr/bin/texi2dvi to /usr/local/bin/texi2dvi gave me a "too many levels of symbolic links" error. Making it a hard link works, but seems like a real hack (what if the executable was not relocatable?). 

Thanks in advance,
Dan



More information about the R-devel mailing list