Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: "there is no package called 'rsvg'" on Solaris #278

Closed
twang2218 opened this issue Mar 8, 2018 · 1 comment
Closed

Error: "there is no package called 'rsvg'" on Solaris #278

twang2218 opened this issue Mar 8, 2018 · 1 comment

Comments

@twang2218
Copy link

twang2218 commented Mar 8, 2018

Today, I received an email from CRAN team about my package pmap which depends on DiagrammeR package, the mail said:

See https://cran.r-project.org/web/checks/check_results_pmap.html (which is still updating).

You are not using the Suggests package rsvg conditionally as required in §1.1.3.1 of the manual. Please check all other uses of suggested packages, and correct before Mar 22 to safely retain the package on CRAN.

And the logs of the failed part of my package is following:

Version: 0.6.0 
Check: package dependencies 
Result: NOTE 
    Package suggested but not available for checking:rsvgFlavor: r-patched-solaris-x86

Version: 0.6.0 
Check: tests 
Result: ERROR 
     Runningtestthat.R’ [28s/30s]
    Running the tests intests/testthat.Rfailed.
    Complete output:
     > library(testthat)
     > library(pmap)
     > 
     > set.seed(101)
     > 
     > test_check("pmap")
     ── 1. Error: render_pmap_file() should be able to render to a file (@test_render
     there is no package called 'rsvg'
     1: render_pmap_file(p, file_name, format = format) at testthat/test_render_pmap_file.R:15
     2: DiagrammeR::export_graph(p, file_name = file_name, file_type = format, width = width, 
     height = height)
     3: rsvg::rsvg_pdf
     4: getExportedValue(pkg, name)
     5: asNamespace(ns)
     6: getNamespace(ns)
     7: tryCatch(loadNamespace(name), error = function(e) stop(e))
     8: tryCatchList(expr, classes, parentenv, handlers)
     9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
     10: value[[3L]](cond)

It seems caused by the DiagrammeR::export_graph() calling the suggested package rsvg without using the conditional pattern recommended at CRAN manual 1.1.3.1.

   if (requireNamespace("rgl", quietly = TRUE)) {
      rgl::plot3d(...)
   } else {
      ## do something else not involving rgl.
   }
@thirupathi-chintu
Copy link

Binary packages for OS-X or Windows can be installed directly from CRAN:
install.packages("rsvg")

Installation from source on Linux or OSX requires librsvg2. On Debian or Ubuntu install librsvg2-dev:
sudo apt-get install -y librsvg2-dev

On Fedora, CentOS or RHEL we need librsvg2-devel:
sudo yum install librsvg2-devel

On OS-X use rsvg from Homebrew:
brew install librsvg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants