0

当我的 ubuntu 更新了一些 r-cran 软件包时,出现了“HAVE_UINTPTR_T redefined”的警告。这个警告重要吗?有人可以解释这个宏吗?我还在一些 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
4

1 回答 1

1

这确实是 R 3.4.0 的一个新警告,但现在在提交到 master 分支后它被抑制了:

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)$ 
于 2017-04-28T01:32:16.457 回答