Hi,
I repeated the same procedure but it seems that the error is still there (sorry to copy and paste the long output again):
library(cmdstanr)
This is cmdstanr version 0.0.0.9000
- Online documentation and vignettes at R Interface to CmdStan • cmdstanr
- CmdStan path set to: C:/Users/Siquan Wang/Documents/.cmdstanr/cmdstan
- Use set_cmdstan_path() to change the path
install_cmdstan(overwrite=TRUE)
- Removing the existing installation of CmdStan…
- Latest CmdStan release is v2.23.0
- Installing CmdStan v2.23.0 in C:/Users/Siquan Wang/Documents/.cmdstanr
- Downloading cmdstan-2.23.0.tar.gz from GitHub…
- Download complete
- Unpacking archive…
- Building CmdStan binaries…
INFO: Could not find files for the given pattern(s).
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT src/cmdstan/stanc.o -M -E -MG -MP -MF src/cmdstan/stanc.d src/cmdstan/stanc.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/ast_def.o -MT stan/src/stan/lang/ast_def.d -M -E -MG -MP -MF stan/src/stan/lang/ast_def.d stan/src/stan/lang/ast_def.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/semantic_actions_def.o -MT stan/src/stan/lang/grammars/semantic_actions_def.d -M -E -MG -MP -MF stan/src/stan/lang/grammars/semantic_actions_def.d stan/src/stan/lang/grammars/semantic_actions_def.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/program_grammar_inst.o -MT stan/src/stan/lang/grammars/program_grammar_inst.d -M -E -MG -MP -MF stan/src/stan/lang/grammars/program_grammar_inst.d stan/src/stan/lang/grammars/program_grammar_inst.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/expression_grammar_inst.o -MT stan/src/stan/lang/grammars/expression_grammar_inst.d -M -E -MG -MP -MF stan/src/stan/lang/grammars/expression_grammar_inst.d stan/src/stan/lang/grammars/expression_grammar_inst.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/statement_grammar_inst.o -MT stan/src/stan/lang/grammars/statement_grammar_inst.d -M -E -MG -MP -MF stan/src/stan/lang/grammars/statement_grammar_inst.d stan/src/stan/lang/grammars/statement_grammar_inst.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/expression07_grammar_inst.o -MT stan/src/stan/lang/grammars/expression07_grammar_inst.d -M -E -MG -MP -MF stan/src/stan/lang/grammars/expression07_grammar_inst.d stan/src/stan/lang/grammars/expression07_grammar_inst.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/statement_2_grammar_inst.o -MT stan/src/stan/lang/grammars/statement_2_grammar_inst.d -M -E -MG -MP -MF stan/src/stan/lang/grammars/statement_2_grammar_inst.d stan/src/stan/lang/grammars/statement_2_grammar_inst.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/block_var_decls_grammar_inst.o -MT stan/src/stan/lang/grammars/block_var_decls_grammar_inst.d -M -E -MG -MP -MF stan/src/stan/lang/grammars/block_var_decls_grammar_inst.d stan/src/stan/lang/grammars/block_var_decls_grammar_inst.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/indexes_grammar_inst.o -MT stan/src/stan/lang/grammars/indexes_grammar_inst.d -M -E -MG -MP -MF stan/src/stan/lang/grammars/indexes_grammar_inst.d stan/src/stan/lang/grammars/indexes_grammar_inst.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/local_var_decls_grammar_inst.o -MT stan/src/stan/lang/grammars/local_var_decls_grammar_inst.d -M -E -MG -MP -MF stan/src/stan/lang/grammars/local_var_decls_grammar_inst.d stan/src/stan/lang/grammars/local_var_decls_grammar_inst.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/whitespace_grammar_inst.o -MT stan/src/stan/lang/grammars/whitespace_grammar_inst.d -M -E -MG -MP -MF stan/src/stan/lang/grammars/whitespace_grammar_inst.d stan/src/stan/lang/grammars/whitespace_grammar_inst.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/bare_type_grammar_inst.o -MT stan/src/stan/lang/grammars/bare_type_grammar_inst.d -M -E -MG -MP -MF stan/src/stan/lang/grammars/bare_type_grammar_inst.d stan/src/stan/lang/grammars/bare_type_grammar_inst.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/term_grammar_inst.o -MT stan/src/stan/lang/grammars/term_grammar_inst.d -M -E -MG -MP -MF stan/src/stan/lang/grammars/term_grammar_inst.d stan/src/stan/lang/grammars/term_grammar_inst.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -MT bin/cmdstan/lang/grammars/functions_grammar_inst.o -MT stan/src/stan/lang/grammars/functions_grammar_inst.d -M -E -MG -MP -MF stan/src/stan/lang/grammars/functions_grammar_inst.d stan/src/stan/lang/grammars/functions_grammar_inst.cpp
INFO: Could not find files for the given pattern(s).
cp bin/windows-stanc bin/stanc.exe
chmod +x bin/stanc.exe
make/stanc:61: recipe for target ‘bin/stanc.exe’ failed
process_begin: CreateProcess(NULL, chmod +x bin/stanc.exe, …) failed.
make (e=2): The system cannot find the file specified.
mingw32-make.exe: *** [bin/stanc.exe] Error 2
mingw32-make.exe: *** Waiting for unfinished jobs…
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -o bin/cmdstan/stansummary.o src/cmdstan/stansummary.cpp
Warning message:
There was a problem during installation. See the error message(s) above.
file.copy(file.path(cmdstanr::cmdstan_default_path(),“bin”,“windows-stanc”), file.path(cmdstanr::cmdstan_default_path(),“bin”,“stanc.exe”))
[1] FALSE
processx::run(“mingw32-make”, c(“build”,“-j4”), wd=cmdstanr::cmdstan_default_path(), echo = TRUE)
INFO: Could not find files for the given pattern(s).
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -Wl,-L,“C:/Users/Siquan Wang/Documents/.cmdstanr/cmdstan/stan/lib/stan_math/lib/tbb” -Wl,-rpath,“C:/Users/Siquan Wang/Documents/.cmdstanr/cmdstan/stan/lib/stan_math/lib/tbb” bin/cmdstan/stansummary.o -static-libgcc -static-libstdc++ -o bin/stansummary.exe
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -o bin/cmdstan/print.o src/cmdstan/print.cpp
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 -I stan/lib/stan_math/lib/tbb_2019_U8/include -O3 -I src -I stan/src -I lib/rapidjson_1.1.0/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.3.3 -I stan/lib/stan_math/lib/boost_1.72.0 -I stan/lib/stan_math/lib/sundials_5.2.0/include -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -c -o bin/cmdstan/diagnose.o src/cmdstan/diagnose.cpp
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_5.2.0/include -DNO_FPRINTF_OUTPUT -D_USE_MATH_DEFINES -c -x c -include stan/lib/stan_math/lib/sundials_5.2.0/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_5.2.0/src/nvector/serial/nvector_serial.c -o stan/lib/stan_math/lib/sundials_5.2.0/src/nvector/serial/nvector_serial.o
C:/Users/Siquan Wang/Anaconda3/Library/mingw-w64/bin/…/lib/gcc/x86_64-w64-mingw32/5.3.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: cannot find C:/Users/Siquan: No such file or directory
C:/Users/Siquan Wang/Anaconda3/Library/mingw-w64/bin/…/lib/gcc/x86_64-w64-mingw32/5.3.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: cannot find Wang/Anaconda3/Library/mingw-w64/bin/…/lib/gcc/x86_64-w64-mingw32/5.3.0/…/…/…/…/x86_64-w64-mingw32/lib/…/lib/default-manifest.o: No such file or directory
collect2.exe: error: ld returned 1 exit status
make/command:11: recipe for target ‘bin/stansummary.exe’ failed
mingw32-make: *** [bin/stansummary.exe] Error 1
mingw32-make: *** Waiting for unfinished jobs…
Error in processx::run(“mingw32-make”, c(“build”, “-j4”), wd = cmdstanr::cmdstan_default_path(), :
System command error
Then I restarted R and ran the sample code it seems still not working properly:
library(cmdstanr)
This is cmdstanr version 0.0.0.9000
- Online documentation and vignettes at R Interface to CmdStan • cmdstanr
- CmdStan path set to: C:/Users/Siquan Wang/Documents/.cmdstanr/cmdstan
- Use set_cmdstan_path() to change the path
file ← file.path(cmdstan_path(), “examples”, “bernoulli”, “bernoulli.stan”)
mod ← cmdstan_model(file)
Compiling Stan program…
C:/Users/Siquan Wang/Anaconda3/Library/mingw-w64/bin/…/lib/gcc/x86_64-w64-mingw32/5.3.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: cannot find C:/Users/Siquan: No such file or directory
C:/Users/Siquan Wang/Anaconda3/Library/mingw-w64/bin/…/lib/gcc/x86_64-w64-mingw32/5.3.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: cannot find Wang/Anaconda3/Library/mingw-w64/bin/…/lib/gcc/x86_64-w64-mingw32/5.3.0/…/…/…/…/x86_64-w64-mingw32/lib/…/lib/default-manifest.o: No such file or directory
collect2.exe: error: ld returned 1 exit status
mingw32-make.exe: *** [C:/Users/SIQUAN~1/AppData/Local/Temp/Rtmp0qJ61a/model-466036a38cc.exe] Error 1
Error in processx::run(command = make_cmd(), args = c(tmp_exe, include_paths, :
System command error
data_list ← list(N = 10, y = c(0,1,0,0,0,0,0,0,0,1))
fit ← mod$sample(
- data = data_list,
- seed = 123,
- num_chains = 2,
- num_cores = 2
- )
Error: object ‘mod’ not found
Thx!