stan-dev / stan-dev/rstan

Cannot install rstan on R.4.5.0 with Rtools44

Open
#1,129 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
1.1k
Forks
266
Avg merge
2h 56m
Merged PRs (30d)
1

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported installation and runtime failures on Windows 10 with R 4.5.0, Rtools44, and rstan 2.32.6, using both the source and CRAN binary methods described. Compare behavior with the Rtools42 workaround and run the package's basic example. Done means rstan installs and the basic example runs without a load failure or crash.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.