Compiler error on rstan
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
Summary:
Compiling errors. I followed the instructions and checked the similar issues, but could not solve the issue. This is on Mac OS.
Description:
fit <- stan(file = 'stan/8schools.stan', data = schools_dat)
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' [-Wmissing-sysroot]
In file included from file165bc30a4c1fb.cpp:8:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core/autodiffstackstorage.hpp:4:
In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/
In addition: Warning message:
In system(cmd, intern = !verbose) :
running command '/Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB file165bc30a4c1fb.cpp 2> file165bc30a4c1fb.cpp.err.txt' had status 1
Error in sink(type = "output") : invalid connection
Reproducible Steps:
I was using an older version of rstan on an older version of R. However, after updating both, I can compile any files. If I switch back to the older version, I got an error saying headers are not matched.
Current Output:
Expected Output:
If applicable, the output you expected from RStan.
RStan Version:
The version of RStan you are running (e.g., from packageVersion("rstan"))
R Version:
The version of R you are running (e.g., from R.version.string)
Operating System:
Your operating system (e.g., OS X 10.11.3)
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 fit call with stan/8schools.stan and schools_dat, then inspect the reported R CMD SHLIB command and missing MacOSX SDK warning. The issue does not provide RStan, R, or operating-system versions, so collect those details before determining whether the failure is in RStan or the local compiler setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100