My computer crashed in the middle of stan running using multiple cores in bash.
I installed the macos toolchain and followed the instructions here:
I also upgraded to R version 4.0.0 and reinstalled everything, following:
Although, still I can’t get rstan to be installed? When I run:
install.packages("rstan", type = "source")
I get
clang-7: error: no such file or directory: '/Library/Frameworks/R.framework/Resources/lib/libc++abi.1.dylib'
make: *** [rstan.so] Error 1
ERROR: compilation failed for package ‘rstan’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rstan’
Warning in install.packages :
installation of package ‘rstan’ had non-zero exit status
so it seems like the file is missing at the path. This is indeed the case:
It may be worth stating that Makevars can contain things, just not compiler paths. I have indeed repeatedly said ‘you can just remove Makevars and .Renviron’ (on osx), because you don’t strictly need them anymore on R 4.0. But — That will also remove any optimization flags, like -O3 -mtune=native -march=native and the like. So your model will run slower.
I should probably make a thread outlining exactly what needs and does not need to be present for systems on R 4.0.
In sum: Makevars does not need compiler definitions (e.g., where to find includes, where to find the compiler); it can contain compiler configuration options (like mtune, march, O[ptimization level]). It’s just that previous versions of R and rstan relied on Makevars and Renviron defining some paths, which conflict with the latest R. So deleting them is the easiest approach; but the next step would be to add back in some optimization options.