[R-pkg-devel] SystemRequirements: Berkeley DB STL

Toby Hocking tdhock5 @ending from gm@il@com
Tue Oct 23 23:02:52 CEST 2018


I would like to put the https://github.com/tdhock/PeakSegDisk package on
CRAN. This package needs Berkeley DB C++ Standard Template Library. What do
I need to do to get this package (with compiled mac/windows binaries) on
CRAN?

This C++ library is relatively easy to install
https://github.com/tdhock/PeakSegPipeline/wiki/FAQ#installing-berkeleydb-stl
but probably too big (tar.gz source code is 43MB) to include in the R
package, so I have indicated this external library dependency in the
SystemRequirements field of DESCRIPTION. I have also put PKG_LIBS=-ldb_stl
in my src/Makevars. Is that OK?

My Linux travis builds pass CRAN checks just fine
https://travis-ci.org/tdhock/PeakSegDisk/jobs/442813478 because I have
installed the libdb5.1-stl-dev package which provides -ldb_stl.

Usually I check my packages on win-builder prior to CRAN submission. When I
check PeakSegDisk on win-builder, I get a linker error (db_stl not found)
because presumbly it is not installed on the win-builder machine. So
presumably my package would not pass checks on CRAN.

I have emailed Uwe Ligges to ask to install BerkeleyDB STL on win-builder
but I have got no response. Is there anybody else I should ask?

Is there anything else I should do?

FYI I believe that I have done my homework. From a search of
"systemrequirements" on r-package-devel I saw that there are several
related threads, for example a message on Feb 4 from Dirk who explains how
to use PKG_LIBS. However I did not see any specific explanation of how to
get a package with dependent compiled code on CRAN. Maybe the officially
accepted method should be added to Writing R Extensions or CRAN Repository
policies?

Thanks in advance for any help/advice you can provide.
Toby Dylan Hocking

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list