Hello, Dirk. Now that you mention it, ny R is a bit old. I'm running (r-devel of course) 2024-05-12 r86534 ucrt.
Let me rebuild R from scratch and I'll try again. I'll report back (in a day or so) if that helped. Thank you! Avi On Wed, Jul 24, 2024 at 7:57 PM Dirk Eddelbuettel <e...@debian.org> wrote: > > > On 24 July 2024 at 19:21, Avraham Adler wrote: > | I get the following error when trying to install. > | > | Thanks, > | > | Avi > | > | * installing *source* package 'Rcpp' ... > | ** package 'Rcpp' successfully unpacked and MD5 sums checked > | ** using staged installation > | ** libs > | using C++ compiler: 'G__~1.EXE (GCC) 13.2.0' > | g++ -std=gnu++17 -I"C:/R/RCurrent/R-devel/include" -DNDEBUG > | -I../inst/include/ > | -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O3 > | -march=native -pipe -mno-rtm -Wa,-muse-unaligned-vector-move -c > | api.cpp -o api.o > | g++ -std=gnu++17 -I"C:/R/RCurrent/R-devel/include" -DNDEBUG > | -I../inst/include/ > | -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O3 > | -march=native -pipe -mno-rtm -Wa,-muse-unaligned-vector-move -c > | attributes.cpp -o attributes.o > | g++ -std=gnu++17 -I"C:/R/RCurrent/R-devel/include" -DNDEBUG > | -I../inst/include/ > | -I"C:/rtools44/x86_64-w64-mingw32.static.posix/include" -O3 > | -march=native -pipe -mno-rtm -Wa,-muse-unaligned-vector-move -c > | barrier.cpp -o barrier.o > | In file included from barrier.cpp:31: > | barrier.cpp: In function 'SEXPREC** get_vector_ptr(SEXP)': > | ../inst/include/Rcpp/r/compat.h:34:26: error: 'VECTOR_PTR_RO' was not > | declared in this scope; did you mean 'VECTOR_PTR'? > | 34 | # define RCPP_VECTOR_PTR VECTOR_PTR_RO > | | ^~~~~~~~~~~~~ > | barrier.cpp:74:30: note: in expansion of macro 'RCPP_VECTOR_PTR' > | 74 | return const_cast<SEXP*>(RCPP_VECTOR_PTR(x)); > | // #nocov end > | | ^~~~~~~~~~~~~~~ > | make: *** [C:/R/RCurrent/R-devel/etc/x64/Makeconf:296: barrier.o] Error 1 > | ERROR: compilation failed for package 'Rcpp' > > That's not a good outcome and a little odd. > > We can see that CRAN has Windows binaries, and, upon upload, of course also > first checked with default Windows and Linux build servers by Uwe and Kurt. > > As for the error, the file compat.h is pretty trivial and just contains a > version comparison to then define the replacement wrapper. Line 34 _defines_ > a string rather than using. So I am puzzled. Maybe something > is off with your R version? You often run r-devel, don't you? > > In any event, if your R is newer than 4.4.2 maybe (for now) replace the > conditional logic in compat.h with just the defines ie > > # define RCPP_STRING_PTR STRING_PTR_RO > > # define RCPP_VECTOR_PTR VECTOR_PTR_RO > > and use that? > > Dirk > > -- > dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org _______________________________________________ Rcpp-devel mailing list Rcpp-devel@lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel