[Rcpp-devel] R - couchbase R client using Rcpp

amine gassem amine.gassem at ag-study.com
Wed Mar 19 18:36:11 CET 2014


On Wed, Mar 19, 2014 at 6:04 PM, Dirk Eddelbuettel <edd at debian.org> wrote:

>
> On 19 March 2014 at 17:32, amine gassem wrote:
> |
> | Context:
> |
> | I develop a new rcouchbase package client for couchbase.
> | I am following the example of rhiredis package.
> | Including libcouchbase headers using : #include
> <libcouchbase/couchbase.h>works
> | fine.
> |
> | Problem:
> |
> | dyn.load failed to load symbol due to and undefined symbol: lcb_destroy.
> | I think this is a link problem because I don't tell Rcpp compiler
> where/how to
> | find libcouchebase libs.
> | Ho can I fix this?
>
> There is no 'Rcpp compiler', only a C++ compiler called by 'R CMD ...'.
>

> You tell it what to link with via src/Makevars (Linux, OS X, ...) or
> src/Makevars.win. See rhiredis for an (at this point) unconditional use of
> the -lhiredis library.
>
>


> | What I have tried:
> |
> | Should I create configure.in and makvers.in like in this RcppGSL
> package?
>
> It use a call to a script gsl-config --- and I use that same trick in other
> packages.  It depends on what Couchbase supplies.
>

libcouchbase provides a script ( I think a perl script) called
cmake/configure <https://github.com/couchbase/libcouchbase>
that I used it to build from sources. Do you think that this script is a
good start?


>
> You could look at RPostgreSQL; or any other R packages using external
> libraries. There are lots.
>
> | Reading the vignette I did not see how can I adopt it for my needs.
> | Also from this vignette  it looks like this changed with Rcpp release
> 0.11.0.
> | These files are now optional.
> | And also, The rhiredis package don't provide a configure for autoconf,
> and I
> | think  it works fine.
>
> rhiredis is not a good example as it is not a CRAN -- so its build system
> is
> not as polished.  It may not have gotten used anywhere but on Linux (and
> build a hiredis library for CRAN / win-builder is on my TODO list).
>
> Hope this helps, and as is this more-or-less "just" a basic "how do I
> write a
> package" question, should we take this over to r-devel?
>

As you like, you can take it over r-devel.
Thanks.


>
> Dirk
>
> --
> Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
>
Amine.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20140319/c437627f/attachment.html>


More information about the Rcpp-devel mailing list