2017-04-27 12 views
0

當我的ubuntu更新了一些r-cran軟件包時,出現「HAVE_UINTPTR_T重新定義」的警告。這個警告是否重要?有人可以解釋這個宏嗎?我也在一些python頭文件中找到它。HAVE_UINTPTR_T在RInside.h和R.h中都定義了

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 
+0

因爲它的立場,這是不可重現或交代。 _你在編譯什麼?也許改變頭文件的順序包括幫助? –

+0

我只在幾個impl cpp源文件中包含頭文件「RInside.h」。所以沒有R.h頭被重新排序。我懷疑軟件包r-base-dev中的rcpp和新更新的標題版本不兼容。到目前爲止,可執行文件和以前一樣正常工作 – ZFY

+1

哦,我明白了。但這只是一個警告。我構建(或測試)了很多CRAN軟件包 - 其中一個警告非常平靜。但我會考慮抑制這一點。下次請在GitHub上報告。 –

回答

1

這確實是一個新的警告有R 3.4.0,但現在抑制以下this commit to the master branch

[email protected]:~/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) 
[email protected]:~/git/rinside(master)$ git pu 
Fetching origin 
Already up-to-date. 
[email protected]:~/git/rinside(master)$ 
+0

這個提交幫助,謝謝。 – ZFY

+0

是的:)我實際測試過它,不管你信不信,甚至在這裏顯示輸出。感謝您的提醒。我可能會得到一個新的發佈... –

相關問題