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

Jan Wijffels jwijffels at bnosac.be
Sat Sep 16 11:10:59 CEST 2017


Thank you for the feedback. It helped, although not in the direction I had
in mind originally but the proposed directions are equally fine.

many thanks,
Jan


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

On 11 September 2017 at 13:28, Dirk Eddelbuettel <edd at debian.org> wrote:

>
> Jan: This is hard/impossible for me to read. I do not use a html email
> client, so if you used colour here, I don't see.  Please use indentation if
> you can.
>
> On 10 September 2017 at 22:35, Jan Wijffels wrote:
> |  Solaris no longer really matters.
> | Does that mean that CRAN will accept a package which gives errors on
> | Solaris?
>
> I don't know. Only CRAN can speak to that. But Solaris no exists (as an
> Oracle product) and is no longer maintained at U Oxford meaning CRAN may
> noe
> have test machines any more.
>
> |
> | 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
>
> Fine, then use it. I use CXX_STD=CXX11 in many of my packages too.
>
> | 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);
>
> Quite possibly not a Solaris issue but a simply _ordering issue_: place
> Rcpp.h last, not first, and/or tell R not to define macros. An `#undef`
> may help too.
>
> | ​ 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
>
> You need one of these two, not both.
>
> | 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.
>
> Try reordering.
>
> Hth,  Dirk
>
> |
> | 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
> | >
>
> --
> 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/20170916/4b9dcef0/attachment.html>


More information about the Rcpp-devel mailing list