Skip to content

Problem installing StanHeaders and rstan in Github actions #1180

Description

@venpopov

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions