rinside

HAVE_UINTPTR_T defined both in RInside.h and R.h


A warning of "HAVE_UINTPTR_T redefined" occured when my ubuntu updated some r-cran packages. Does this warning matters? Could somebody explain this macro? I also found it in some python header.

In file included from /usr/local/include/RInside/RInside.h:26:0,
/usr/local/include/RInside/RInsideCommon.h:50:0: warning: "HAVE_UINTPTR_T" redefined [enabled by default]
   #define HAVE_UINTPTR_T
 ^

In file included from /usr/share/R/include/R.h:81:0,
             from /usr/local/lib/R/site-library/Rcpp/include/Rcpp/r/headers.h:52,
             from /usr/local/lib/R/site-library/Rcpp/include/RcppCommon.h:29,
             from /usr/local/lib/R/site-library/Rcpp/include/Rcpp.h:27,
             from /usr/local/include/RInside/RInsideCommon.h:38,
             from /usr/local/include/RInside/RInside.h:26,

/usr/share/R/include/Rconfig.h:23:0: note: this is the location of the previous definition
 #define HAVE_UINTPTR_T 1

Solution

  • That was indeed a new warning with R 3.4.0, but it is now suppressed following this commit to the master branch:

    edd@max:~/git/rinside(master)$ R CMD INSTALL .
    * installing to library ‘/usr/local/lib/R/site-library’
    * installing *source* package ‘RInside’ ...
    ** libs
    ccache g++ -I/usr/share/R/include -DNDEBUG -I. -I../inst/include/ 
        -I"/usr/local/lib/R/site-library/Rcpp/include"    
        -fpic  -g -O2 -fstack-protector-strong 
        -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  
        -O3 -Wall -pipe -Wno-unused -pedantic -Wextra -Wno-deprecated-declarations 
        -c MemBuf.cpp -o MemBuf.o
    ccache g++ -I/usr/share/R/include -DNDEBUG -I. -I../inst/include/ 
        -I"/usr/local/lib/R/site-library/Rcpp/include"    
        -fpic  -g -O2 -fstack-protector-strong 
        -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g
        -O3 -Wall -pipe -Wno-unused -pedantic -Wextra -Wno-deprecated-declarations 
         -c RInside.cpp -o RInside.o
    g++ -Wl,-S -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro 
         -o RInside.so MemBuf.o RInside.o -L/usr/lib/R/lib -lR
    g++ -o libRInside.so MemBuf.o RInside.o -Wl,-S -shared -Wl,-Bsymbolic-functions 
         -Wl,-z,relro -L/usr/lib/R/lib -lR
    ar qc libRInside.a MemBuf.o RInside.o
    cp libRInside.so ../inst/lib
    cp libRInside.a ../inst/lib
    rm libRInside.so libRInside.a
    installing to /usr/local/lib/R/site-library/RInside/libs
    ** R
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    * DONE (RInside)
    edd@max:~/git/rinside(master)$ git pu
    Fetching origin
    Already up-to-date.
    edd@max:~/git/rinside(master)$