[R-pkg-devel] Fwd: Passing CRAN checks for a package linking to a system library on CRAN machines
@ergue|@@oko| @end|ng |rom gm@||@com
Thu May 13 07:29:01 CEST 2021
Le 13/05/2021 à 07:06, SN248 a écrit :
> I am working on a package which provides an interface to the libsbml C++
> library (http://sbml.org/Software/libSBML) in R. The source code of this
> package (r2sbml) can be found at the following link
> The package passes CRAN checks with `R CMD check` on my machine, but I do
> have dependency (libsbml library) installed on my machine (OSX) with
> headers and static libs at the usual locations, i.e., /usr/local/include
> and /usr/local/lib. The package also passes CRAN check on a Windows
> with libsbml installed using Rtools40 and msys2. The DESCRIPTION file
> libsbml in SystemRequirements but `R CMD check` obviously fails on rhub
> machines because there are no instructions to install libsbml first. As I
> understand, I have the following options to pass checks on CRAN
> 1. Bundle the source code of libsbml into the package and make the static
> libs on the fly. I don't really want to try this approach even though I
> have used this approach before in another package as I think creating the
> static lib is not as straightforward for this library because of the large
> number of files and complex dependency chart.
> 2. Include header files in the `inst` folder and pull the static libs from
> rwinlib github (assuming the libs can be posted there). I am not sure if
> this approach will work on all platforms on which CRAN checks take place.
> 3. Somehow include instructions to install libsbml on CRAN machines (I
> no idea how to do this), or request CRAN maintainers to install libsbml
> with header files and libs at usual locations (i.e.,
> /usr/local/include and
I faced the same problem for my package r2sundials and in the end, I
have opted for including the third-party source code into the package.
However, a CRAN team member told me later that such kind of request
(i.e. install third-party software on CRAN machines) can be sent to the
CRAN team. Not sure that they accept but I think you can start by asking
it and if the request is rejected, you can try other options.
> I am sure some version of this question has been asked before as there are
> many packages which interface with C/C++ libraries listed as
> SystemRequirements, but I could not find a clear answer to this aspect,
> i.e., passing checks on CRAN machines.
> Any guidance here and pros/cons of the above mentioned approaches will be
> very helpful.
> [[alternative HTML version deleted]]
> R-package-devel using r-project.org mailing list
More information about the R-package-devel