HAVE_UINTPTR_T在RInside.h和R.h中都定义了

时间:2017-04-27 10:22:36

标签: rinside

当我的ubuntu更新了一些r-cran软件包时,出现了“HAVE_UINTPTR_T重新定义”的警告。这个警告对吗?有人可以解释这个宏吗?我也在一些python标题中找到了它。

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

1 个答案:

答案 0 :(得分:1)

这确实是一个带有R 3.4.0的新警告,但它现在在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)$