[R-pkg-devel] vignette build failure on rhub macos-m1 platform (missing pandoc?)

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Mon May 9 21:10:07 CEST 2022


On 09/05/2022 1:07 p.m., Duncan Murdoch wrote:
> On 29/03/2022 8:58 p.m., Ben Bolker wrote:
>>        After a rather painful remote debugging process, I've figured out
>> (I think) that the 'macos-m1-bigsur-release' platform on r-hub doesn't
>> have pandoc, and doesn't have it in a way that breaks
>> rmarkdown::pandoc_available(), so that trying to build an Rmarkdown
>> vignette fails with a cryptic "subscript out of bounds" error.
>>
>>      Is this something people have seen before?
>>      Recommendations about whether it's better to raise it as an issue
>> with (1) rmarkdown maintainers, (2) r-hub maintainers, or (3) both?
> 
> Hi Ben.
> 
> I'm seeing this now for rgl.  Did you find a resolution?

I've localized the issue.  In the function 
rmarkdown:::get_pandoc_version (here: 
https://github.com/rstudio/rmarkdown/blob/84dfc6674083f355d4f8c87dca8d85f85ca53bad/R/pandoc.R#L676-L693), 
they think they know a path to pandoc, and run "pandoc --version" to get 
the version number.  It appears they get a zero length result, so line 
683 gets the subscript out of bounds error and everything dies.

To reproduce, create a test package which imports rmarkdown and has this 
single line of R code:

     available <- rmarkdown::pandoc_available()

then submit that package to rhub using

     rhub::check(platform="macos-m1-bigsur-release")

It will fail with a message like this:

  248#> * installing *source* package ‘testpkg3’ ...

  249#> ** using staged installation

  250#> ** R

  251#> ** byte-compile and prepare package for lazy loading

  252#> Error in strsplit(info, "\n")[[1]] : subscript out of bounds

  253#> Error: unable to load R code in package ‘testpkg3’

  254#> Execution halted

  255#> ERROR: lazy loading failed for package ‘testpkg3’

  256#> * removing 
‘/Users/userDqIwNAjs/Rtemp/Rtmp6N8Dtr/Rinst146057d7e12c1/testpkg3’



I've attached such a package, but it is probably going to be stripped 
off when this is posted to R-package-devel.

Duncan Murdoch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testpkg3_0.0.0.9000.tar.gz
Type: application/x-gzip
Size: 4293 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-package-devel/attachments/20220509/5eb5483a/attachment.bin>


More information about the R-package-devel mailing list