0

I'd like to download an archived version of the grf package on CRAN, grf version 0.10.2, however I encounter the non zero exit status when R 4.3.0 tries to install it. Here is the URL for this version of grf: https://cran.r-project.org/src/contrib/Archive/grf/grf_0.10.2.tar.gz I used two methods on how to load CRAN archived package versions:

install.packages("https://cran.r-project.org/src/contrib/Archive/grf/grf_0.10.2.tar.gz", repos = NULL, type = "source")

and

library(devtools)
install_version("grf", "0.10.2") 
# Run empty line to ignore package updates.

Both methods result in non zero exit status. Below a part of the installation process (which in total is longer than the possible output my R console can handle) and the error message. Is it reasonable to assume that there is some problem with Rtools43 as "make" yields an error?

src/forest/ForestOptions.cpp: In static member function 'static uint ForestOptions::validate_num_threads(uint)': src/forest/ForestOptions.cpp:93:16: error: 'runtime_error' is not a member of 'std' 93 | throw std::runtime_error("A negative number of threads was provided."); | ^~~~~~~~~~~~~ src/forest/ForestOptions.cpp:95:1: warning: control reaches end of non-void function [-Wreturn-type] 95 | } | ^ make: *** [C:/PROGRA~1/R/R-43~1.0/etc/x64/Makeconf:272: src/forest/ForestOptions.o] Error 1

ERROR: compilation failed for package 'grf'
* removing 'C:/Users/Expert/AppData/Local/R/win-library/4.3/grf'
* restoring previous 'C:/Users/Expert/AppData/Local/R/win-library/4.3/grf'
Warning in install.packages :
  Installation of package ‘C:/Users/Expert/AppData/Local/Temp/RtmpSAih92/downloaded_packages/grf_0.10.2.tar.gz’ had non zero exit status

I tried this procedure before with the package ggplot2 which I successfully downgraded to the version 0.8, so there shouldn't be a problem with the code per se.

I downloaded Rtools43 as I read that after installation it might fix the issue. But after restarting R with installed Rtools43 the error message still comes up. Any help appreciated, thank you very much.

  • 1
    FYI, you should almost always use `library`, not `require`. The latter never stops following code when the package is not available, which is almost never what is intended. Refs: https://stackoverflow.com/a/51263513. (It is not causing you any problems here, but it's a bad habit to get into.) – r2evans May 03 '23 at 12:23
  • In package installation in R, before that `ERROR: compilation failed` message is almost always more explanatory output. Sometimes it says things like `'make' not found` (indicating Rtools is not installed or installed properly) or `could not find 'quux.h'` (or some header, indicating the underlying libraries/headers are not available). That this is on windows suggests to me more the former. Please [edit] your question and add all code between `install_version(.)` and the error itself, as there is likely something indicative in those lines. Thanks! – r2evans May 03 '23 at 12:25

0 Answers0