Trying to get the renv
package to work, and I'm just testing it by installing randomly selected package from CRAN.
So far, two packages, acro
and jskm
(selected randomly, both uploaded since the start of the year) cause failure on the renv::install() stage when it gets to Rccp:
Error: Error installing package 'Rcpp':
================================
* installing *source* package 'Rcpp' ...
** using staged installation
rm -f Rcpp.o RcppExample.o Rcpp.dll
Building MyLib in inst/lib...
g++ -std=gnu++17 -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c -o Adder.o Adder.cpp
g++ -std=gnu++17 -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c -o Multiplier.o Multiplier.cpp
ar r libMyLib.a Adder.o Multiplier.o
C:\rtools44\x86_64-w64-mingw32.static.posix\bin\ar.exe: creating libMyLib.a
ranlib libMyLib.a
ERROR: a 'NAMESPACE' file is required
* removing '%devpath%/renv_testing/renv/staging/1/Rcpp'
install of package 'Rcpp' failed [error code 1]
Renv installs packages here: "%devpath%/renv_testing/renv/library/windows/R-4.4/x86_64-w64-mingw32". From my understanding, renv is pretty smart and should recognise the NAMESPACE file w/in %install_path%/renv? I have no issues when I install to my global R library folder with the traditional packages.install method.
I do have C++ installed and a compiler and have used C++ (C++98) on this machine so I know it works, just for some reason not working with renv.
Edit: Tidyverse installed just fine, just tried it as a sanity check.
Edit2: Did some more digging around, and came across this issues thread from the renv
gh repo, https://github.com/rstudio/renv/issues/2118 not sure at all if its related to my issue, but if it is I guess I just have to wait or hope for someone else to figure out a workaround.
Sorry for the trouble. renv 1.1.4
has just been released to CRAN, and the issue should be resolved in this version.