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

Ben Bolker bbo|ker @end|ng |rom gm@||@com
Mon May 9 21:16:33 CEST 2022


On 2022-05-09 3:10 p.m., Duncan Murdoch wrote:
> 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

   I agree with the diagnosis. I never dug any deeper because some 
combination of (1) I decided I didn't really need to check the M1 build 
(I think the CRAN macbuilder is also on M1 now) and/or (2) I may have 
found it non-reproducible, i.e. the problem seemed to stop happening? 
TBH I don't remember.

   Ben Bolker



More information about the R-package-devel mailing list