[Rcpp-devel] Recommended procedure to depend on Rcpp

Christoph Bergmeir c.bergmeir at decsai.ugr.es
Wed Nov 17 18:44:26 CET 2010


Hello Rcpp-devel list,

so I'm glad that we finally found a solution to the GNU make dependency problem that seems suitable in the normal case (and so RSNNS).

I really didn't mean to stir up a hornets' nest when starting the discussion, and I'm sorry that I didn't have the time to follow all contributions in the other thread (with subject: Dependence on GNU make because of $(shell)). Giving appropriate credit to all contributors often is not a trivial thing in open source projects. Actually, I'm in no ways connected to the original authors of the SNNS, and we here in my Lab just thought that it's a nice piece of software, worth to put some work into. But we also saw the risks of such a project, and so contacted the original authors informing them about the fork, and putting some work into trying to give appropriate credit to everyone, so that hopefully there won't be problems in the future.

One thing I totally forgot until now (and hereby do..) is to thank all (former and current) developers of Rcpp for the really nice piece of software they built. As mentioned above, it's probably difficult and I surely don't have all necessary information to provide a proportioning of this thanks to single persons. And I think that shouldn't be necessary anyways.

Before implementing the package, I experimented with different other possibilities of getting the connection of C++ and R working, and Rcpp was the one that finally seemed to be the most reliable and flexible one. Though I didn't have a look at all the other packages using Rcpp, RSNNS is with ~80 000 lines of C++ code and about 200 wrapped functions probably one of the bigger ones. And, having in mind my experience when implementing it, I can say that Rcpp is suitable for projects of this size.


Regards,
Christoph

On 11/17/2010 05:48 PM, Romain Francois wrote:
> Le 17/11/10 17:43, Dominick Samperi a écrit :
>> In the GNU make case it is better to use ':=' instead of '=' because in
>> the latter case there
>> can be surprising side-effects (the RHS is evaluated on every use).
>
> PKG_LIBS is needed exactly once, so your point is moot.
>
>> On Wed, Nov 17, 2010 at 11:36 AM, Romain Francois
>> <romain at r-enthusiasts.com <mailto:romain at r-enthusiasts.com>> wrote:
>>
>> Dear package maintainers and members of the Rcpp-devel mailing list,
>>
>> Following the discussion that was trigerred by the (most welcome)
>> release of RSNNS, the cran maintainers have advised us about what
>> they consider the best way for a package to declare it depends on Rcpp.
>>
>> The documentation will be updated before the next Rcpp release, but
>> here are the main points.
>>
>> - In the DESCRIPTION file, you need at least these two lines:
>>
>> Depends: Rcpp
>> LinkingTo: Rcpp
>>
>>
>>
>> - In the Makevars file, you need this line:
>>
>> PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`
>>
>> So no requirement on GNU make is needed as the use of backticks
>> supported to be portable.
>>
>>
>>
>> - In the Makevars.win (where we can assume GNU make), you need this
>> line:
>>
>> PKG_LIBS = $(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" -e
>> "Rcpp:::LdFlags()")
>>
>>
>> The documentation will include as usual the alternative version
>> that uses configure and configure.win files.
>>
>>
>>
>> Those advices are from the CRAN maintainers, and we are very thankful.
>>
>> Please update your packages to implement this, there is no need to
>> wait for another release of Rcpp, and it will only take a few
>> minutes. There are for example a few packages that are still not
>> using LinkingTo: Rcpp
>> (bifactorial, cxxPack, mvabund, phylobase, sdcTable, pcaMethods)
>>
>>
>>
>> Best regards,
>>
>> Romain
>
>



More information about the Rcpp-devel mailing list