Hello Everyone. I have upgraded R version to R.0.3 and rstan compilation keeps giving me the error. Note, that I have tried all the steps given in: R 4.0, rstan, and you , I have updated all the supporting packages. Deleted older versions of rtools and installed Rtools40. I get two error messages when trying to compile stan file:
1) Error in open.connection(con, open = mode) :
Could not resolve host: github.com
In addition: Warning messages:
1: In readLines(file, warn = TRUE) :
incomplete final line found on 'F:\1191\eterin\OrderingIV\mtsmtrmiv.stan'
2: In system(paste(CXX, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
'C:/rtools40/usr/mingw_/bin/g++' not found
2) Error in compileCode(f, code, language = language, verbose = verbose) :
cc1plus.exe: fatal error: \Balder/users/eterin/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp: No such file or directorycompilation terminated.make: *** [C:/PROGRA~1/R/R-40~1.3/etc/x64/Makeconf:229: fileb14475603c26.o] Error 1
Error in sink(type = "output") : invalid connection
Is there anything else I can do except deleting old makevar.win files or renaming and updating stan and stanheaders? I would greatly appreciate your help.
1) Error in open.connection(con, open = mode) :
Could not resolve host: github.com
Is caused by rstan trying to connect to github to check your model against the new version of the compiler. The easiest fix here is to install the preview of the next rstan version which doesn’t make this check:
2) Error in compileCode(f, code, language = language, verbose = verbose) :
cc1plus.exe: fatal error: \Balder/users/eterin/R/win-library/4.0/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp: No such file or directorycompilation terminated.make: *** [C:/PROGRA~1/R/R-40~1.3/etc/x64/Makeconf:229: fileb14475603c26.o] Error 1
This happens when your R packages are installed to a directory on a networked drive, rather than locally installed to your computer. R can have difficulties in finding the necessary files during model compilation when this is the case.