Skip to content

Installation error for cmdstanr in Windows 11 #1093

@AndreaElx

Description

@AndreaElx

Error installation

cmd //C cscript //nologo //E:jscript ../tbb_2020.3/build/version_info_windows.js gcc CScript Error: Execution of the Windows Script Host failed. (This program is blocked by group policy. For more information, contact your system administrator. ) "g++ -O2 -DUSE_WINTHREAD -D_WIN32_WINNT=0x0502 -DMINGW_HAS_SECURE_API=1 -D__MSVCRT_VERSION__=0x0700 -msse -mthreads -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-uninitialized -Wno-non-virtual-dtor -D_UCRT -D_UCRT -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -std=c++17 -I../tbb_2020.3/src -I../tbb_2020.3/src/rml/include -I../tbb_2020.3/include -I." > version_string.ver
/bin/sh: -c: line 1: syntax error near unexpected token (' /bin/sh: -c: line 1: cmd //C cscript //nologo //E:jscript ../tbb_2020.3/build/version_info_windows.js gcc CScript Error: Execution of the Windows Script Host failed. (This program is blocked by group policy. For more information, contact your system administrator. ) "g++ -O2 -DUSE_WINTHREAD -D_WIN32_WINNT=0x0502 -DMINGW_HAS_SECURE_API=1 -D__MSVCRT_VERSION__=0x0700 -msse -mthreads -D__TBB_BUILD=1 -Wall -Wno-parentheses -Wno-uninitialized -Wno-non-virtual-dtor -D_UCRT -D_UCRT -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -std=c++17 -I../tbb_2020.3/src -I../tbb_2020.3/src/rml/include -I../tbb_2020.3/include -I." > version_string.ver'
make[1]: *** [../tbb_2020.3/build/common_rules.inc:160: version_string.ver] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/c/Users/xxxxx/.cmdstan/cmdstan-2.36.0/stan/lib/stan_math/lib/tbb'
make: *** [stan/lib/stan_math/make/libraries:179: stan/lib/stan_math/lib/tbb/tbb.def] Error 2

To Reproduce
I have installed R 4.5.0.
I run these commands in RStudio in a fresh session:

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

check_cmdstan_toolchain()
The C++ toolchain required for CmdStan is setup properly!

I have installed Rtools45 previously, and saved in C:/

Then run in RStudio this command:

install_cmdstan(cores = 2, overwrite = TRUE)

After all process of installation is done, I get the warning:

"Warning message:
There was a problem during installation. See the error message(s) above."

With a part of the message appearing by the end written above, at the first part of this issue.

Expected behavior
A successful installation...

Operating system
OS: Windows 11 10.0.26100
CPU: AMD64 Intel64 Family 6 Model 140 Stepping 1, GenuineIntel

CmdStanR version number

packageVersion("cmdstanr")
[1] ‘0.9.0’

Additional context
install_cmdstan(cores = 2)
The C++ toolchain required for CmdStan is setup properly!
trying URL 'https://api.github.com/repos/stan-dev/cmdstan/releases/latest'
downloaded 14 KB

  • Latest CmdStan release is v2.36.0
  • Installing CmdStan v2.36.0 in C:\Users\xxxx/.cmdstan/cmdstan-2.36.0
  • Downloading cmdstan-2.36.0.tar.gz from GitHub...
    Warning message:
    An installation already exists at C:\Users\xxxx/.cmdstan/cmdstan-2.36.0. Please remove or rename the installation folder or set overwrite=TRUE.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions