Issue Description: I encountered installation and compilation issues while trying to use rstan, particularly with the RcppEigen package, which fails to install. The error message indicates “no DLL was created,” and the compilation process ends with a non-zero exit status. Additionally, when running rstan, I receive the error “Eigen.hpp: No such file or directory,” suggesting that rstan is unable to locate the relevant files from the Eigen library.
Methods I Have Tried:
- Checked RTools installation: I used
pkgbuild::has_build_tools(debug = TRUE)to check whether RTools is correctly installed, and the status is confirmed. - Reinstalled RcppEigen: I tried multiple times to remove and reinstall
RcppEigen, including using the GitHub development version, but the issue persists. - Installed binary versions: I attempted to install the binary versions of
RcppEigen,StanHeaders, andrstan, but still encountered compilation issues. - Checked Eigen path: I confirmed that
Eigen.hppwas missing in the installed path ofRcppEigen, and I manually downloaded the Eigen library, attempting to set the path, but the issue remained. - Enabled C++14 support: I set
Sys.setenv(USE_CXX14 = 1)to enable C++14 support and recompiled the relevant packages, but the problem is still unresolved.
System Environment:
- Operating System: Windows 10
- R Version: 4.0.2
- RTools is installed and compatible with my R version.
Code to List Installed Packages Related torstan:
model_pre_new = stan(model_code = bayestan,data=bayestan_data,warmup=10000,iter=30000,
chains=1,cores=24,
refresh=300
)
Error Message:
Error in compilecode(f, code, language = language, verbose = verbose)I#include <stan/math/prim/mat/fun/eigen.hpp>akeconf:229:fi7ea81470f73db.ol Error iError in sink(type -"output"):挺结不对
In file included from c:/users/lenovo/Documents/R/win-library/4.0/rstan/include/rstan_next/stan_fit.hpp:5
from fi1ea81470f73db.cpp:1280:c:/Users/lenovo/pocuments/k/win-library/4.0/rstaninclude/rstan next/stan fit base.hp:s:10: fatal eror: stan/math/prim/mat/fun/eigen.hp: No such file or directory
compilation terminated,make: *** [C:/PROGRA-1/R/R-40-1.2/etc/x64/M