[Rcpp-devel] C++11 Solaris cmath/math.H

Jan Wijffels jwijffels at bnosac.be
Sun Sep 10 22:35:06 CEST 2017


 Solaris no longer really matters.
Does that mean that CRAN will accept a package which gives errors on
Solaris?

You could add C++11 conditionally, ie only on Linux/macOS/Windows
Yes, but I always need C++11 for this package. I just wanted to make a
small reproducible example. The bigger reproducible example is the package
at https://github.com/bnosac/udpipe

If I add the Rcpp.h header to file
https://github.com/bnosac/udpipe/blob/master/src/udpipe.cpp, I'm getting
issues similar to this

udpipe.cpp:23406:30: error: macro "Free" passed 2 arguments, but takes just 1
   alloc->Free(alloc, p->probs);


​ Also [[Rcpp::plugins(cpp11)]] should not be needed in a package.
Thank you for the remark. The udpipe package currently uses CXX_STD=CXX11
in Makevars and specifies SystemRequirements: C++11 in DESCRIPTION. Example
was just put there to show a minimal example of the error, coming from when
Rcpp compiles the attributes.

If you could provide a pointer where I should look for a solution, this
would be great otherwise the package which is now on CRAN will be rejected
any time soon I think.

best,
Jan






Jan Wijffels
Statistician
www.bnosac.be  | +32 486 611708

On 6 September 2017 at 18:49, Dirk Eddelbuettel <edd at debian.org> wrote:

>
> Hi Jan,
>
> On 6 September 2017 at 15:03, Jan Wijffels wrote:
> | I'm trying to fix the installation issue I have with the package udpipe:
> | https://github.com/bnosac/udpipe but I'm getting issues on Solaris
> giving
> | messages like this:
>
> Solaris no longer really matters.
>
> | If I do not add ​SystemRequirements: C++11 and remove the Makevars file,
> | this works fine on Solaris.
>
> You could add C++11 conditionally, ie only on Linux/macOS/Windows.  You
> could
> use (even a shell script named) configure for that.
>
> | I need however C++11 as I need it in the udpipe
> | R package for building udpipe.cpp but can't add
> | to that udpipe.cpp file the following types of statements due to
> conflicts
> | on the use of the Free macro.
> | #include <Rcpp.h>
> | using namespace Rcpp;
> | // [[Rcpp::plugins(cpp11)]]
>
> Can you explain a bit more?  What Free macro?  Do you know about forcing R
> to
> add Rf_ to its macros?
>
> Also [[Rcpp::plugins(cpp11)]] should not be needed in a package.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20170910/2f6b0bae/attachment.html>


More information about the Rcpp-devel mailing list