Problem with installing CmdStan with CmdStanR, Directory Issue

I’ve been trying to install Stan in my new pc, but unfortunately, because I wasn’t the one setting up my pc, the User file name for my session is Andrés, with the accent, and I think that might be messing up the installation process.

The error message I get in R studio when running the install_cmdstan function is

— Compiling pre-compiled header. This might take a few seconds. —
g++ -std=c++1y -m64 -D_REENTRANT -Wall -Wno-unused-function -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-variable -Wno-sign-compare -Wno-unused-local-typedefs -Wno-int-in-bool-context -Wno-attributes -Wno-ignored-attributes -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_5.7.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c stan/src/stan/model/model_header.hpp -o stan/src/stan/model/model_header.hpp.gch
g++ -std=c++1y -m64 -D_REENTRANT -Wall -Wno-unused-function -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-variable -Wno-sign-compare -Wno-unused-local-typedefs -Wno-int-in-bool-context -Wno-attributes -Wno-ignored-attributes -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_5.7.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -Wl,-L,“C:/Users/Andrés/Documents/.cmdstanr/cmdstan-2.27.0/stan/lib/stan_math/lib/tbb” -Wl,-rpath,“C:/Users/Andrés/Documents/.cmdstanr/cmdstan-2.27.0/stan/lib/stan_math/lib/tbb” bin/cmdstan/stansummary.o -static-libgcc -static-libstdc++ -Wl,-L,“C:/Users/Andrés/Documents/.cmdstanr/cmdstan-2.27.0/stan/lib/stan_math/lib/tbb” -Wl,-rpath,“C:/Users/Andrés/Documents/.cmdstanr/cmdstan-2.27.0/stan/lib/stan_math/lib/tbb” -o bin/stansummary.exe
/usr/bin/sh: line 1: g++ -std=c++1y -m64 -D_REENTRANT -Wall -Wno-unused-function -Wno-uninitialized -Wno-unused-but-set-variable -Wno-unused-variable -Wno-sign-compare -Wno-unused-local-typedefs -Wno-int-in-bool-context -Wno-attributes -Wno-ignored-attributes -I stan/lib/stan_math/lib/tbb_2020.3/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.9 -I stan/lib/stan_math/lib/boost_1.75.0 -I stan/lib/stan_math/lib/sundials_5.7.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -Wl,-L,“C:/Users/Andrés/Documents/.cmdstanr/cmdstan-2.27.0/stan/lib/stan_math/lib/tbb” -Wl,-rpath,“C:/Users/Andrés/Documents/.cmdstanr/cmdstan-2.27.0/stan/lib/stan_math/lib/tbb” bin/cmdstan/stansummary.o -static-libgcc -static-libstdc++ -Wl,-L,“C:/Users/Andrés/Documents/.cmdstanr/cmdstan-2.27.0/stan/lib/stan_math/lib/tbb” -Wl,-rpath,“C:/Users/Andrés/Documents/.cmdstanr/cmdstan-2.27.0/stan/lib/stan_math/lib/tbb” -o bin/stansummary.exe: No such file or directory
mingw32-make.exe: *** [make/command:13: bin/stansummary.exe] Error 127
mingw32-make.exe: *** Waiting for unfinished jobs…

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

I’ve checked that mingw32 and g++ are working correctly, I’ve run the check_cmdstan_toolchain and it says it’s ready to go, and as I see the error message, it parses the accent in a weird way, which makes me feel like thats the issue.

Any help would be appreciated.

Operating System: Windows 10
Interface Version:
Compiler/Toolkit: R 4.1, Rstudio 1.4.1717, rtools 4.0, cmdstan4 2.27

Hi,

in that case you will probably have to install CmdStan in a non-default location that does not include the special character.

install_cmdstan(dir = "your_path", cores = 2)

Is there any way I can move it after installation??

Do you mean you want to move the one you already installed? Or install in a non-default location and then move it.

Whichever… just so I can have the cmdstanr file with the versions inside the folder with the special character

I attempted it and it works !! Thanks for all the help

1 Like