I’m running Windows 10, R version 3.6.3, brms version 2.12.0 and rstan version 2.19.3.
Running a simple brms model such as
fit <- brm(count ~ zAge + zBase * Trt + (1|patient),
data = epilepsy, family = poisson())
shortly after starting compilation, I get the error message:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! g++.exe: error: Oberauer/Documents/R/win-library/3.6/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp: No such file or directory
g++.exe: error: Oberauer/Documents/R/win-library/3.6/StanHeaders/include: No such file or directory
g++.exe: error: Oberauer/Documents/R/win-library/3.6/RcppEigen/include: No such file or directory
make: *** [C:/PROGRA~1/R/R-36~1.3/etc/x64/Makeconf:215: file632c4d56612d.o] Error 1
Unfortunately I have a similar problem, but these solutions do not work for me. My error also specifies that Eigen.hpp file is not present in StanHeaders 2.21.0. Does anybody know about any fixes?
Sorry for the late reply. Strangely, I can run rstanarm, but not brms. I see something strange happening with the MD5 statement at the bottom and I’ve tried reinstalling RcppParallel which was suggested in another thread, but that did not resolve it. Here is the output:
Session info --------------------------------------------------------------------
setting value
version R version 4.0.5 (2021-03-31)
os Windows 10 x64
system x86_64, mingw32
ui RStudio
language (EN)
collate English_Australia.1252
ctype English_Australia.1252
tz Australia/Sydney
date 2021-08-18
Yep, R can have trouble finding dependencies during compilation when the libraries are installed on a network drive. This doesn’t affect rstanarm because the models are all pre-compiled.
There are two options here, the first thing to try would be to use brms with the cmdstanr backend:
Install cmdstanr and cmdstan using the instructions here and call brms with backend="cmdstanr"
cmdstanr uses a different approach for including the dependencies so may avoid the issue.
If that doesn’t work, then you’ll need to move your R package library to somewhere on your local drive
Thank you for your help. It didn’t work, and unfortunately my library keeps switching back to the network drive, but I’ll try some more different ways to change it.