Problem installing StanHeaders and rstan in Github actions
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
I have a standard Github action for publishing a Quarto blog. It automatically installs package dependencies using renv, and all other packages install fine, but for some reason it is failing with StanHeaders (log below). I suspect it is for the same reasons as #964 - the stan_math git submodule doesn't get downloaded.
The only thing I can think of is to specify the last version on CRAN to be installed, rather than using "https://stan-dev.r-universe.dev", but that is quite outdated.
Any alternative ideas about how to solve this?
Error: Error: Error installing package 'StanHeaders':
=======================================
* installing *source* package ‘StanHeaders’ ...
** this is package ‘StanHeaders’ version ‘2.36.0.9000’
** using staged installation
cp: cannot stat 'inst/include/upstream/src': No such file or directory
cp: cannot stat 'inst/include/upstream/lib/stan_math': No such file or directory
cp: cannot stat 'inst/include/upstream/lib/stan_math/stan': No such file or directory
cp: cannot stat 'inst/include/upstream/lib/stan_math/lib/sundials_*': No such file or directory
cp: cannot stat 'inst/include/upstream/lib/stan_math/lib/sundials_*/include/*': No such file or directory
cp: cannot stat 'inst/include/upstream/lib/stan_math/lib/sundials_*/src/*': No such file or directory
** libs
using C compiler: ‘gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’
using C++ compiler: ‘g++ (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0’
using C++17
make: *** No rule to make target 'nvector/serial/nvector_serial.o', needed by 'static'. Stop.
ERROR: compilation failed for package ‘StanHeaders’
* removing ‘/home/runner/work/venpopov.github.io/venpopov.github.io/renv/staging/1/StanHeaders’
install of package 'StanHeaders' failed [error code 1]
- Installing StanHeaders ... FAILED
Traceback (most recent calls last):
13: renv::restore()
12: renv_restore_run_actions(project, diff, current, lockfile, rebuild)
11: renv_install_impl(records)
10: renv_install_staged(records)
9: renv_install_default(records)
8: handler(package, renv_install_package(record))
7: renv_install_package(record)
6: withCallingHandlers(renv_install_package_impl(record), error = function(e) writef("FAILED"))
5: renv_install_package_impl(record)
4: r_cmd_install(package, path)
3: r_exec_error(package, output, "install", status)
2: abort(all)
1: stop(fallback)
Execution halted
Error: Process completed with exit code 1.
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 with .github/workflows/publish.yml and the renv::restore() step that installs StanHeaders. Compare the missing stan_math paths and submodule behavior with issue #964, then reproduce the failure using the provided GitHub Actions setup. Done means StanHeaders and rstan install successfully in the workflow without relying on an outdated package version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, r
- Domain
- build-system, ci-cd
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100