Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CmdStanR Installation Issue #1002

Closed
joshliddy opened this issue Jun 26, 2024 · 5 comments
Closed

CmdStanR Installation Issue #1002

joshliddy opened this issue Jun 26, 2024 · 5 comments

Comments

@joshliddy
Copy link

I've been trying to install CmdStanR (0.8.1), but can't seem to find a workable solution.

I installed the package in R, ensured that RTools is installed and discoverable, checked to ensure the tool chain was installed, and also attempted to build directly in R. Recently, I shifted to directly cloning the GitHub project (cmdstan 2.34.0), initializing the submodules, and then setting the cmdstan path to this location before building. See below for example.

Install cmdstanr

install.packages("cmdstanr", repos = c("https://stan-dev.r-universe.dev", getOption("repos")))
library(cmdstanr)

Check for RTools

library(devtools)
devtools::find_rtools()
Sys.getenv("PATH")
system("gcc --version")
system("make --version")

Make sure the toolchain was installed and if not run the second line.

cmdstanr::check_cmdstan_toolchain()
#cmdstanr::check_cmdstan_toolchain(fix = TRUE)

Cloned the git repository (this was done in cmd window to the desired directory)

git clone --branch v2.34.0 https://github.com/stan-dev/cmdstan.git

cd cmdstan

git submodule update --init --recursive

cmdstanr::set_cmdstan_path("C:/Users/jliddy/.cmdstan/cmdstan")
cmdstanr::rebuild_cmdstan(cores = 4)

It appears that the issue is due to the tbb library being incompatible with C++20 in its current form. The warnings indicate that template-id is not allowed for constructors in C++20. I've tried downgrading the C++ standard in the make/local file, but this doesn't help. Any suggestions?

@andrjohns
Copy link
Collaborator

Just to clarify, you've successfully installed cmdstanr (the R package), but there's a failure when building CmdStan?

Can you post the compilation output with the error, as well as your system details?

@joshliddy
Copy link
Author

joshliddy commented Jun 26, 2024 via email

@andrjohns
Copy link
Collaborator

Thanks, but I need to actually see the part of the compilation output with the error

@joshliddy
Copy link
Author

joshliddy commented Jun 26, 2024 via email

@andrjohns
Copy link
Collaborator

Looks like all built and working, so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants