[Rcpp-devel] Rcpp11 testing

Dominick Samperi djsamperi at gmail.com
Sun Oct 13 20:47:10 CEST 2013


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.

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.

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.

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

Cheers,
Dominick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20131013/95d646b3/attachment.html>


More information about the Rcpp-devel mailing list