[Rcpp-devel] Rcpp11 testing

Romain Francois romain at r-enthusiasts.com
Mon Oct 14 00:44:16 CEST 2013


Le 13/10/13 20:47, Dominick Samperi a écrit :
> Hello Romain,
>
> I tested Rcpp11 under Mac OS (10.8.5) using Apple's
> clang-500.2.75 (Xcode 5), and also under Linux. Here are
> some results:
>
> 1. The recommended install method
>      devtools::install_github("romainfrancois/Rcpp11")
>      did not work. The problem seems to be that it looks at
>      hadley's github repo instead of yours? The work-around is
>      simply to download the zip file.

This should work with the devel version of devtools. This is a recent 
addition to devtools. 
https://twitter.com/hadleywickham/status/387303629952401409

> 2. Under Mac OS inclusion of internal.h causes compilation to fail
>      because CALLFUN_1 defines a function with no 'extern "C"'
>      linkage specification, while RCPP_FUN_1 defines the same
>      function with this linkage specification.
>
>      The error results from
>      improved compliance with the standards: C++98 and C++11
>      standards (Section 7.5.1) state that two function types with
>      with different linkage are different types, yet one cannot
>      overload the other because you cannot overload on the
>      "return type" (which arguably includes the linkage).
>
>     The work-around is to insert extern "C" in the CALLFUN_xx
>     macros in internal.h. This is also needed in the declaration of
>     init_Rcpp11_routines() in internal.h.

I'll go the opposite way actually, and not use c linkage at all, and 
perhaps have them in Rcpp's namespace.
Since these are registered, we don't need C linkage.

> 3. The default file system type under Mac OS uses case-insensitive
>      file names (like Windows), whereas Linux file systems use
>      case-sensitive file names. This can cause builds that work
>      under Mac OS to fail under Linux, and this happens with
>      Rcpp11: for example, Rcpp/Vector.h includes Rcpp/Na_Proxy.h,
>      yet the file that exists on disk is Rcpp/NA_Proxy.h.

Thanks. I'll fix that.

>      Thus periodic testing on systems with file name case-sensitivity
>      can prevent big porting and refactoring headaches.
>
> Cheers,
> Dominick

Comments: Rcpp11 is in heavy development, so I'm not too concerned about 
these too much yet.

In any case, for things like that, please use the issue tracker:
https://github.com/romainfrancois/Rcpp11/issues?state=open

-- 
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30



More information about the Rcpp-devel mailing list