I’m trying to install cmdstan on windows 11 but after executing “mingw32-make build”, I get the following output:
expr: syntax error: unexpected argument ‘8’
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 stan/lib/rapidjson_1.1.0/ -I lib/CLI11-1.9.1/ -I stan/lib/stan_math/ -I stan/lib/stan_math/lib/eigen_3.4.0 -I stan/lib/stan_math/lib/boost_1.81.0 -I stan/lib/stan_math/lib/sundials_6.1.1/include -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -D_USE_MATH_DEFINES -DBOOST_DISABLE_ASSERTS -Wl,-L,“C:/Users/ruben/cmdstan/stan/lib/stan_math/lib/tbb” -Wl,-rpath,“C:/Users/ruben/cmdstan/stan/lib/stan_math/lib/tbb” bin/cmdstan/stansummary.o stan/lib/stan_math/lib/tbb/tbb.dll -static-libgcc -static-libstdc++ -ltbb -o bin/stansummary.exe
C:/rtools40/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.3.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: stan/lib/stan_math/lib/tbb/tbb.dll:cygming-crtbegin.c:(.idata+0x400): multiple definition of __imp___ZTVSt9bad_alloc'; stan/lib/stan_math/lib/tbb/tbb.dll:cygming-crtbegin.c:(.idata+0x400): first defined here C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: stan/lib/stan_math/lib/tbb/tbb.dll:cygming-crtbegin.c:(.idata+0x3fc): multiple definition of
__imp___ZTVN10__cxxabiv121__vmi_class_type_infoE’; stan/lib/stan_math/lib/tbb/tbb.dll:cygming-crtbegin.c:(.idata+0x3fc): first defined here
C:/rtools40/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.3.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: stan/lib/stan_math/lib/tbb/tbb.dll:cygming-crtbegin.c:(.idata+0x3f4): multiple definition of __imp___ZTVN10__cxxabiv117__class_type_infoE'; stan/lib/stan_math/lib/tbb/tbb.dll:cygming-crtbegin.c:(.idata+0x3f4): first defined here C:/rtools40/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/8.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: stan/lib/stan_math/lib/tbb/tbb.dll:cygming-crtbegin.c:(.idata+0x3f8): multiple definition of
__imp___ZTVN10__cxxabiv120__si_class_type_infoE’; stan/lib/stan_math/lib/tbb/tbb.dll:cygming-crtbegin.c:(.idata+0x3f8): first defined here
C:/rtools40/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.3.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Users/ruben/cmdstan/stan/lib/stan_math/lib/tbb/tbb.dll when searching for -ltbb
C:/rtools40/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.3.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/Users/ruben/cmdstan/stan/lib/stan_math/lib/tbb/tbb.dll when searching for -ltbb
C:/rtools40/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.3.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe: cannot find -ltbb
collect2.exe: error: ld returned 1 exit status
mingw32-make: *** [make/command:13: bin/stansummary.exe] Error 1
Here is the screenshot of the system path variables:
Any suggestions about how to troubleshoot this problem would be greatly appreciated.