Fail to run rstan with inker command failed with exit code 1 (use -v to see invocation)make: ***
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
Hello,
I am new to stan and encountered several errors when running the code.
Error in compileCode(f, code, language = language, verbose = verbose) :
using local_scalar_t__ = double; ^46 warnings generated.ld: framework not found CoreFoundationclang-4.0: error: linker command failed with exit code 1 (use -v to see invocation)make: *** [/Library/Frameworks/R.framework/Resources/share/make/shlib.mk:10: filea6212d2a9090.so] Error 1
Error in sink(type = "output") : invalid connection
I installed rstan from the following advice from other posts,
remove.packages(c("StanHeaders", "rstan"))
install.packages("StanHeaders", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
My R version is "R version 4.2.2 (2022-10-31)" on MacOS 13.2.1. The Configuring C Toolchain for Mac is Xcode 14.2 with XCode CLI, and gfortran8.2, without ~/.R/Makevars.
I also tried installing rstan by source but it gave me clang-4.0: error: no such file or directory: '/Library/Frameworks/R.framework/Versions/4.2/Resources/library/rstan/lib//libStanServices.a'
make: *** [/Library/Frameworks/R.framework/Resources/share/make/shlib.mk:10: rstan.so] Error 1
Thank you so much!
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 reported rstan installation and compilation failure on R 4.2.2 with macOS 13.2.1 and Xcode 14.2. Inspect the compiler and linker invocation around the missing CoreFoundation framework and libStanServices.a errors. Done means identifying a reproducible project-side fix or documenting that the failure is an environment or toolchain issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, 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