stan-dev / rstan

RStan, the R interface to Stan
https://mc-stan.org
1.04k stars 265 forks source link

Cannot install rstan on R.4.5.0 with Rtools44 #1129

Open haighr opened 3 months ago

haighr commented 3 months ago

Summary:

I cannot install rstan using any of the recommended methods on GitHub or via 'install.packages' from CRAN.

Description:

Installing from source yields: ** testing if installed package can be loaded from temporary location ERROR: loading failed

Installing from binary: library(rstan) crashes R.

OS = Windows 10 R version : R.4.5.0 pre-release RTools version : 4.4

Reproducible Steps:

It's an installation issue, possibly related to RTools44 I can install rstan on R-devel by hijacking R's environmental variable 'R_RTOOLS44_PATH' to use an earlier toolchain: tmp = Sys.getenv()["R_RTOOLS44_PATH"] Sys.setenv(R_RTOOLS44_PATH=gsub("44","42",tmp)) ## because I still have Rtools42 but rstan still crashes when I run the package's basic example.

Current Output:

N/A (because I cannot install rstan)

Expected Output:

N/A

RStan Version:

rstan_2.32.6.tar.gz

R Version:

"R Under development (unstable) (2024-05-27 r86634 ucrt)"

Operating System:

Windows 10 Enterprise, build 19045.4412