Stan isn't working any more in R on Mac (High Sierra)
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
LIke many other folks, my stan environment in R is broken. I am on a Mac running High Sierra (Version 10.13.6), R version 4.0.2, latest version of Rstudio, and I rstan version 2.21.1. I have removed and reinstalled rstan several times, and also udpated stanHeaders.
The problem start when I try translate my model spec to C++ using rstan::stanc:
rt <- stanc("Programs/lm.stan")
This is the message I get:
clang-10: error: no such file or directory: 'NYU'
clang-10: error: no such file or directory: 'Langone'
clang-10: error: no such file or directory: 'Health/R'
clang-10: error: no such file or directory: 'Projects/Covid-19'
clang-10: error: no such file or directory: 'plasma'
clang-10: error: cannot specify -o when generating multiple output files
The NEXT version of Stan will not be able to pre-process your Stan program.
Please open an issue at
https://github.com/stan-dev/stanc3/issues
if you can share or at least describe your Stan program. This will help ensure that Stan
continues to work on your Stan programs in the future. Thank you!
This message can be avoided by wrapping your function call inside suppressMessages().
Warning message:
In file.remove(c(unprocessed, processed)) :
cannot remove file '/var/folders/wt/rrrkt68n08b0jrstl_87kpkc0000gn/T//Rtmp1Q9MuJ/filed22d10d067dc.stan', reason 'No such file or directory'
Any suggestions?
I don't think it has anything to do with my specific stan code, since I get this with every stan file I attempt to translate. In this case, it is a super simple regression model:
data {
int<lower=0> N;
vector[N] x;
vector[N] y;
}
parameters {
real b0;
real b1;
real<lower=0> sigma;
}
model {
y ~ normal(b0 + b1*x, sigma);
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the rstan::stanc("Programs/lm.stan") call with the reported R, rstan, macOS, and RStudio versions. Inspect the reported clang errors involving the path components and the temporary .stan file; done means a simple Stan model translates without the multiple-output or missing-file errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100