0

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
ZFY
  • 135
  • 12
  • As it stands, this is not reproducible or answerable. _What_ were you compiling? Maybe changing the order of header file includes helps? – Dirk Eddelbuettel Apr 27 '17 at 14:22
  • I only include the header "RInside.h" in several impl cpp source files. so there isn't R.h header to be reordered with. I doubt the version of rcpp and newly updated headers within package r-base-dev are not compatible. Till now the executable works fine as before. – ZFY Apr 28 '17 at 01:21
  • 1
    Oh, I see now. It is merely a warning though. And I build (or test) lots of CRAN packages -- one warning is pretty calm. But I will look into suppressing this. Next time please report at GitHub though. – Dirk Eddelbuettel Apr 28 '17 at 01:27

1 Answers1

1

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)$ 
Dirk Eddelbuettel
  • 360,940
  • 56
  • 644
  • 725
  • Yes :) I actually tested it, believe it or not, and even showed the output here. Thanks for the heads-up. And I should probably get a new release out ... – Dirk Eddelbuettel Apr 28 '17 at 02:39