Skip to content

[Bioc-devel] Failing to build vignette because of problems with ImageMagick

8 messages · Christian Mertes, Vincent Carey, Kasper Daniel Hansen +1 more

#
Dear BioC team,

I just noticed that our package is failing on the bioconductor build
system during the build of the vignette on Windows and on MacOS platforms.
#
You don't declare any systems requirements for ImageMagick (doing so will
probably not solve your problem, but you really should).

Alternatively you could look into using the tools provided by the magick
package, which wraps ImageMagick.

But it looks like you're editing PNG files for your vignette. I would
really recommend not doing so. It introduces a system dependency which is
just going to increase headaches on your end, for (perhaps) no real
tangible benefits. If you're trimming PNGs, you should be able to achieve
the same effect when using the png device(s) in R, and that will make
everything more portable anyway.
On Mon, Sep 9, 2019 at 9:42 AM Christian Mertes <mertes at in.tum.de> wrote:

            

  
    
1 day later
#
Thanks a lot for the info! So from my understanding we dont use any
trimming or editing function from ImageMagick directly. I think this is
rather knitr based since we just include png files in the vignette.

I guess it was an hickup since now the error is gone over night.

Best regards,

Christian
On 9/9/19 4:34 PM, Kasper Daniel Hansen wrote:

  
    
#
I seem to be running into a similar problem with BiocOncoTK on windows

The build report for tokay1 shows:

Loading required package: ontologyIndex
Invalid Parameter - /figure-html
Warning in shell(paste(c(cmd, args), collapse = " ")) :
  'convert "BiocOncoTK_files/figure-html/lkgbm-1.png" -trim
"BiocOncoTK_files/figure-html/lkgbm-1.png"' execution failed with
error code 4
Invalid Parameter - /figure-html

The figure code is introduced with ```{r lkgbm,fig=TRUE,message=FALSE}
... the 'convert' process is not requested by me

Is the fig=TRUE problematic for windows?  It seems unnecessary.
On Tue, Sep 10, 2019 at 11:35 AM Christian Mertes <mertes at in.tum.de> wrote:

            

  
    
#
On 9/11/19 00:50, Vincent Carey wrote:
Not sure what's going on. A few observations:

a) About 500 software packages use fig=TRUE.

b) The convert warning is just a warning. The actual error in the case 
of BiocOncoTK is:

   Error: processing vignette 'BiocOncoTK.Rmd' failed with diagnostics:
argument is of length zero

   Note that the ndexr vignette also fails with this error on tokay1 
only but it doesn't have the convert warning (this vignette does not use 
'fig' at all). So it's not clear to me that the "argument is of length 
zero" error is related to the convert warning.

c) The devel build report shows the convert warning for 4 other packages 
(CAGEfightR, CATALYST, CTDquerier, specL) but each of them actually 
fails with a different error message:

   CAGEfightR:
     colData(object1) not identical to colData(object2)

   CATALYST:
     no slot of name "reducedDims" for this object of class "daFrame"

   CTDquerier:
     bfcadd() failed; see warnings()

   specL:
     pandoc.exe: Out of memory

   These errors don't seem related to the convert warning either.

So I'm wondering: could it be that the convert warning is actually 
common but we generally don't see it because 'R CMD build' doesn't 
report warnings? And that we just happen to see the warning when 'R CMD 
build' fails to build a vignette.

We'll investigate more.

H.

  
    
#
Yeah, does this imply that the render operation uses (or tries to use)
ImageMagick? That's news to me, but I am not following this closely.
On Wed, Sep 11, 2019 at 5:21 AM Pages, Herve <hpages at fredhutch.org> wrote:

            

  
    
#
New to me too. But it seems that knitr suggests magick, which itself has

   SystemRequirements: ImageMagick++: ImageMagick-c++-devel (rpm) or 
libmagick++-dev (deb)

Don't know when this knitr dep on magick was introduced tough... Bummer!

H.
On 9/11/19 06:13, Kasper Daniel Hansen wrote:

  
    
5 days later
#
I just came across this issue on rmarkdown which links the same problem
to BiocStyle.
The post is from Nov 2017.

https://github.com/rstudio/rmarkdown/issues/1207

Maybe this helps to understand the underlying problem?

It was suggested to check this in BiocStyle:

Have you reported to the authors of BiocStyle? It seems they enabled
the?*knitr*?hook?|knitr::hook_pdfcrop|?unconditionally (i.e. without
checking if ImageMagick has been installed).

Best,

Christian
On 9/11/19 5:50 PM, Pages, Herve wrote: