Rstan does not work after each restart of R for R4.4.0

After updating to R4.4.0 (or R4.4.1), installing rtools44, uninstalling rstan and re-installing it (from source or not), rstan works, but when I close RStudio and re-open it, rstan does not work any more: I get the error “make not found”. I can then remove.packages(“rstan”) and install it again, then it works - but only until I re-start RStudio.

The problem persisted after removing rtools43 (also deleting Environment variables RTOOLS43_HOME), and also when working in R and not RStudio.

Test used:
example(stan_model, package = “rstan”, run.dontrun = TRUE)
Error thrown (only after closing and re-opening R/RStudio):
Compilation ERROR, function(s)/method(s) not created!
Fehler in compileCode(f, code, language = language, verbose = verbose) :
Fehler in system(paste(MAKE, p1(paste(“-f”, shQuote(makefiles))), “compilers”), : ‘make’ not found
Ruft auf: → .shlib_internal → systemAusführung angehalten

For now, I went back to R4.3.1 (and also re-installing rtools43), there, all works fine.

Many thanks for your help!

  • Operating System: Windows 10 Pro, version 22H2
  • RStan Version: 2.32.6
  • Output of writeLines(readLines(file.path(Sys.getenv("HOME"), ".R/Makevars"))): nothing
  • Output of devtools::session_info("rstan"):
  • ─ Session info ──────────────────────────────────────────────────────────────────────────────────
    setting value
    version R version 4.4.0 (2024-04-24 ucrt)
    os Windows 10 x64 (build 19045)
    system x86_64, mingw32
    ui RStudio
    language (EN)
    collate German_Switzerland.utf8
    ctype German_Switzerland.utf8
    tz Europe/Zurich
    date 2024-08-02
    rstudio 2024.04.2+764 Chocolate Cosmos (desktop)
    pandoc 3.1.11 @ C:/Program Files/RStudio/resources/app/bin/quarto/bin/tools/ (via rmarkdown)

─ Packages ──────────────────────────────────────────────────────────────────────────────────────
! package * version date (UTC) lib source
abind 1.4-5 2016-07-21 [1] CRAN (R 4.4.0)
backports 1.5.0 2024-05-23 [1] CRAN (R 4.4.0)
BH 1.84.0-0 2024-01-10 [1] CRAN (R 4.4.0)
callr 3.7.6 2024-03-25 [1] CRAN (R 4.4.0)
checkmate 2.3.1 2023-12-04 [1] CRAN (R 4.4.0)
cli 3.6.2 2023-12-11 [1] CRAN (R 4.4.0)
colorspace 2.1-0 2023-01-23 [1] CRAN (R 4.4.0)
desc 1.4.3 2023-12-10 [1] CRAN (R 4.4.0)
distributional 0.4.0 2024-02-07 [1] CRAN (R 4.4.0)
fansi 1.0.6 2023-12-08 [1] CRAN (R 4.4.0)
farver 2.1.2 2024-05-13 [1] CRAN (R 4.4.0)
generics 0.1.3 2022-07-05 [1] CRAN (R 4.4.0)
ggplot2 3.5.1 2024-04-23 [1] CRAN (R 4.4.0)
glue 1.7.0 2024-01-09 [1] CRAN (R 4.4.0)
gridExtra 2.3 2017-09-09 [1] CRAN (R 4.4.0)
gtable 0.3.5 2024-04-22 [1] CRAN (R 4.4.0)
inline 0.3.19 2021-05-31 [1] CRAN (R 4.4.0)
isoband 0.2.7 2022-12-20 [1] CRAN (R 4.4.0)
jsonlite 1.8.8 2023-12-04 [1] CRAN (R 4.4.0)
labeling 0.4.3 2023-08-29 [1] CRAN (R 4.4.0)
lattice 0.22-6 2024-03-20 [2] CRAN (R 4.4.0)
lifecycle 1.0.4 2023-11-07 [1] CRAN (R 4.4.0)
loo 2.7.0 2024-02-24 [1] CRAN (R 4.4.0)
magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.4.0)
MASS 7.3-60.2 2024-04-24 [2] local
Matrix 1.7-0 2024-03-22 [2] CRAN (R 4.4.0)
matrixStats 1.3.0 2024-04-11 [1] CRAN (R 4.4.0)
mgcv 1.9-1 2023-12-21 [2] CRAN (R 4.4.0)
munsell 0.5.1 2024-04-01 [1] CRAN (R 4.4.0)
nlme 3.1-164 2023-11-27 [2] CRAN (R 4.4.0)
numDeriv 2016.8-1.1 2019-06-06 [1] CRAN (R 4.4.0)
pillar 1.9.0 2023-03-22 [1] CRAN (R 4.4.0)
pkgbuild 1.4.4 2024-03-17 [1] CRAN (R 4.4.0)
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.4.0)
posterior 1.5.0 2023-10-31 [1] CRAN (R 4.4.0)
processx 3.8.4 2024-03-16 [1] CRAN (R 4.4.0)
ps 1.7.6 2024-01-18 [1] CRAN (R 4.4.0)
QuickJSR 1.1.3 2024-01-31 [1] CRAN (R 4.4.0)
R6 2.5.1 2021-08-19 [1] CRAN (R 4.4.0)
RColorBrewer 1.1-3 2022-04-03 [1] CRAN (R 4.4.0)
Rcpp 1.0.12 2024-01-09 [1] CRAN (R 4.4.0)
RcppEigen 0.3.4.0.0 2024-02-28 [1] CRAN (R 4.4.0)
D RcppParallel 5.1.7 2023-02-27 [1] CRAN (R 4.4.0)
rlang 1.1.3 2024-01-10 [1] CRAN (R 4.4.0)
rstan 2.32.6 2024-03-05 [1] CRAN (R 4.4.0)
scales 1.3.0 2023-11-28 [1] CRAN (R 4.4.0)
StanHeaders 2.32.10 2024-07-15 [1] CRAN (R 4.4.1)
tensorA 0.36.2.1 2023-12-13 [1] CRAN (R 4.4.0)
tibble 3.2.1 2023-03-20 [1] CRAN (R 4.4.0)
utf8 1.2.4 2023-10-22 [1] CRAN (R 4.4.0)
vctrs 0.6.5 2023-12-01 [1] CRAN (R 4.4.0)
viridisLite 0.4.2 2023-05-02 [1] CRAN (R 4.4.0)
withr 3.0.0 2024-01-16 [1] CRAN (R 4.4.0)

[1] C:/Users/pko/AppData/Local/R/win-library/4.4
[2] C:/Program Files/R/R-4.4.0/library

D ── DLL MD5 mismatch, broken installation.

1 Like