# Problem installing cmdstan 2.30.1 on Windows 7 (signature is unknown trust, file is corrupt)

**URL:** <https://discourse.mc-stan.org/t/problem-installing-cmdstan-2-30-1-on-windows-7-signature-is-unknown-trust-file-is-corrupt/28698>\
**Category:** CmdStan\
**Created:** [August 31, 2022, 2:59pm UTC](https://discourse.mc-stan.org/t/problem-installing-cmdstan-2-30-1-on-windows-7-signature-is-unknown-trust-file-is-corrupt/28698 "2022-08-31T14:59:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![blokeman](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/blokeman/32/16236_2.png) [@blokeman](https://discourse.mc-stan.org/u/blokeman)\
**Post date:** [August 31, 2022, 2:59pm UTC](https://discourse.mc-stan.org/t/problem-installing-cmdstan-2-30-1-on-windows-7-signature-is-unknown-trust-file-is-corrupt/28698/1 "2022-08-31T14:59:24Z")

</div>

I tried to upgrade cmdstan from 2.30.0 to 2.30.1 by unpacking [this zip file](https://github.com/stan-dev/cmdstan/archive/refs/tags/v2.30.1.zip) zipfile to C:\cmdstan-2.30.1 and then following the instructions [here](https://mc-stan.org/docs/2_30/cmdstan-guide-2_30.pdf).

The first problem is that Command Prompt doesn’t recognize `mingw32-make` as a runnable command. The troubleshooting says to address this by calling:

`pacman -Sy mingw-w64-x86_64-make`

But this command runs into the following errors:

```nohighlight
:: Synchronizing package databases...
 mingw32
 mingw64
 ucrt64
 clang32
 clang64
 mingw32 is up to date mingw64 is up to date clang64 is up to date clang32 is up
 to date ucrt64 is up to date msys
 msys is up to dateresolving dependencies...
looking for conflicting packages...

Packages (9) mingw-w64-x86_64-expat-2.4.8-1 mingw-w64-x86_64-gcc-libs-12.2.0-1
             mingw-w64-x86_64-gettext-0.21-3 mingw-w64-x86_64-gmp-6.2.1-3
             mingw-w64-x86_64-libiconv-1.17-1
             mingw-w64-x86_64-libwinpthread-git-10.0.0.r72.g1dd2a4993-1
             mingw-w64-x86_64-mpc-1.2.1-1 mingw-w64-x86_64-mpfr-4.1.0.p13-1
             mingw-w64-x86_64-make-4.3-1

Total Download Size: 0.07 MiB
Total Installed Size: 27.90 MiB

:: Proceed with installation? [Y/n] y
:: Retrieving packages...
 mingw-w64-x86_64-mpc-1.2.1-1-any
(9/9) checking keys in keyring [#####################] 100%
(9/9) checking package integrity [#####################] 100%
error: mingw-w64-x86_64-mpc: signature from "David Macek <david.macek.0@gmail.co
m>" is unknown trust
:: File /var/cache/pacman/pkg/mingw-w64-x86_64-mpc-1.2.1-1-any.pkg.tar.zst is co
rrupted (invalid or corrupted package (PGP signature)).
Do you want to delete it? [Y/n] n
error: failed to commit transaction (invalid or corrupted package)
Errors occurred, no packages were upgraded.

```

Is there a path forward from this?

---

<div class="post-metadata">

**Author:** ![torkar](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/torkar/32/1355_2.png) [@torkar](https://discourse.mc-stan.org/u/torkar)\
**Post date:** [August 31, 2022, 3:15pm UTC](https://discourse.mc-stan.org/t/problem-installing-cmdstan-2-30-1-on-windows-7-signature-is-unknown-trust-file-is-corrupt/28698/2 "2022-08-31T15:15:14Z")

</div>

No idea, but perhaps try: `gpg --refresh-keys`

---

<div class="post-metadata">

**Author:** ![blokeman](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/blokeman/32/16236_2.png) [@blokeman](https://discourse.mc-stan.org/u/blokeman)\
**Post date:** [August 31, 2022, 3:29pm UTC](https://discourse.mc-stan.org/t/problem-installing-cmdstan-2-30-1-on-windows-7-signature-is-unknown-trust-file-is-corrupt/28698/3 "2022-08-31T15:29:01Z")

</div>

> [@torkar](#):
>
> gpg --refresh-keys

Tried that, same thing happens though.

---

<div class="post-metadata">

**Author:** ![torkar](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/torkar/32/1355_2.png) [@torkar](https://discourse.mc-stan.org/u/torkar)\
**Post date:** [August 31, 2022, 3:33pm UTC](https://discourse.mc-stan.org/t/problem-installing-cmdstan-2-30-1-on-windows-7-signature-is-unknown-trust-file-is-corrupt/28698/4 "2022-08-31T15:33:11Z")

</div>

Strange… This seems to be the problem:

> [@blokeman](#):
>
> ```no-highlight
> signature from "David Macek <david.macek.0@gmail.com>" is unknown trust
> 
> ```

---

<div class="post-metadata">

**Author:** ![blokeman](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/blokeman/32/16236_2.png) [@blokeman](https://discourse.mc-stan.org/u/blokeman)\
**Post date:** [August 31, 2022, 7:30pm UTC](https://discourse.mc-stan.org/t/problem-installing-cmdstan-2-30-1-on-windows-7-signature-is-unknown-trust-file-is-corrupt/28698/5 "2022-08-31T19:30:39Z")

</div>

Yes sir, that’s a very mystifying message. Bad grammar and all.

---

<div class="post-metadata">

**Author:** ![blokeman](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/blokeman/32/16236_2.png) [@blokeman](https://discourse.mc-stan.org/u/blokeman)\
**Post date:** [September 1, 2022, 8:41am UTC](https://discourse.mc-stan.org/t/problem-installing-cmdstan-2-30-1-on-windows-7-signature-is-unknown-trust-file-is-corrupt/28698/6 "2022-09-01T08:41:59Z")

</div>

Well, I seem now to have graduated to the next problem. Since the first problem was just the failure of the system to recognize mingw32-make as a command, what seems to have worked is that I simply went to my RTools42 directory, located mingw32-make.exe, and added its location to the PATH environment variable from Control Panel → System → Advanced System Settings → Environment variables.

After doing this, I am able to run mingw32-make. So, the next step is to use mingw32-make to build cmdstan. This I try to do by opening Command Prompt, going to the C:\cmdstan-2.30.1 directory, and calling `mingw32-make build`. The resulting output is so voluminous that the scrollback fails to capture all, but the end of it looks like this:

```nohighlight
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/sundials/sundials_nvector_senswrapper.c -o stan/lib/stan_math/lib/sundials_
6.1.1/src/sundials/sundials_nvector_senswrapper.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/sundials/sundials_version.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/su
ndials/sundials_version.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/sunmatrix/band/sunmatrix_band.c -o stan/lib/stan_math/lib/sundials_6.1.1/sr
c/sunmatrix/band/sunmatrix_band.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/sunmatrix/dense/sunmatrix_dense.c -o stan/lib/stan_math/lib/sundials_6.1.1/
src/sunmatrix/dense/sunmatrix_dense.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/sunlinsol/band/sunlinsol_band.c -o stan/lib/stan_math/lib/sundials_6.1.1/sr
c/sunlinsol/band/sunlinsol_band.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/sunlinsol/dense/sunlinsol_dense.c -o stan/lib/stan_math/lib/sundials_6.1.1/
src/sunlinsol/dense/sunlinsol_dense.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/sunnonlinsol/newton/sunnonlinsol_newton.c -o stan/lib/stan_math/lib/sundial
s_6.1.1/src/sunnonlinsol/newton/sunnonlinsol_newton.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.c -o stan/lib/stan_math/lib
/sundials_6.1.1/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.o
ar -rs stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_cvodes.a stan/lib/s
tan_math/lib/sundials_6.1.1/src/cvodes/cvodea.o stan/lib/stan_math/lib/sundials_
6.1.1/src/cvodes/cvodea_io.o stan/lib/stan_math/lib/sundials_6.1.1/src/cvodes/cv
odes.o stan/lib/stan_math/lib/sundials_6.1.1/src/cvodes/cvodes_bandpre.o stan/li
b/stan_math/lib/sundials_6.1.1/src/cvodes/cvodes_bbdpre.o stan/lib/stan_math/lib
/sundials_6.1.1/src/cvodes/cvodes_diag.o stan/lib/stan_math/lib/sundials_6.1.1/s
rc/cvodes/cvodes_direct.o stan/lib/stan_math/lib/sundials_6.1.1/src/cvodes/cvode
s_io.o stan/lib/stan_math/lib/sundials_6.1.1/src/cvodes/cvodes_ls.o stan/lib/sta
n_math/lib/sundials_6.1.1/src/cvodes/cvodes_nls.o stan/lib/stan_math/lib/sundial
s_6.1.1/src/cvodes/cvodes_nls_sim.o stan/lib/stan_math/lib/sundials_6.1.1/src/cv
odes/cvodes_nls_stg.o stan/lib/stan_math/lib/sundials_6.1.1/src/cvodes/cvodes_nl
s_stg1.o stan/lib/stan_math/lib/sundials_6.1.1/src/cvodes/cvodes_spils.o stan/li
b/stan_math/lib/sundials_6.1.1/src/sundials/sundials_band.o stan/lib/stan_math/l
ib/sundials_6.1.1/src/sundials/sundials_context.o stan/lib/stan_math/lib/sundial
s_6.1.1/src/sundials/sundials_dense.o stan/lib/stan_math/lib/sundials_6.1.1/src/
sundials/sundials_direct.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/su
ndials_futils.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_iter
ative.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_linearsolver
.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_math.o stan/lib/s
tan_math/lib/sundials_6.1.1/src/sundials/sundials_matrix.o stan/lib/stan_math/li
b/sundials_6.1.1/src/sundials/sundials_memory.o stan/lib/stan_math/lib/sundials_
6.1.1/src/sundials/sundials_nonlinearsolver.o stan/lib/stan_math/lib/sundials_6.
1.1/src/sundials/sundials_nvector.o stan/lib/stan_math/lib/sundials_6.1.1/src/su
ndials/sundials_nvector_senswrapper.o stan/lib/stan_math/lib/sundials_6.1.1/src/
sundials/sundials_version.o stan/lib/stan_math/lib/sundials_6.1.1/src/sunmatrix/
band/sunmatrix_band.o stan/lib/stan_math/lib/sundials_6.1.1/src/sunmatrix/dense/
sunmatrix_dense.o stan/lib/stan_math/lib/sundials_6.1.1/src/sunlinsol/band/sunli
nsol_band.o stan/lib/stan_math/lib/sundials_6.1.1/src/sunlinsol/dense/sunlinsol_
dense.o stan/lib/stan_math/lib/sundials_6.1.1/src/sunnonlinsol/newton/sunnonlins
ol_newton.o stan/lib/stan_math/lib/sundials_6.1.1/src/sunnonlinsol/fixedpoint/su
nnonlinsol_fixedpoint.o
ar: creating stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_cvodes.a
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/idas/idaa.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idaa.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/idas/idaa_io.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idaa_io.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/idas/idas.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/idas/idas_bbdpre.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas_b
bdpre.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/idas/idas_direct.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas_d
irect.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/idas/idas_ic.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas_ic.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/idas/idas_io.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas_io.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/idas/idas_ls.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas_ls.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/idas/idas_nls.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas_nls.
o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/idas/idas_nls_sim.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas_
nls_sim.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/idas/idas_nls_stg.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas_
nls_stg.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/idas/idas_spils.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas_sp
ils.o
ar -rs stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_idas.a stan/lib/sta
n_math/lib/sundials_6.1.1/src/idas/idaa.o stan/lib/stan_math/lib/sundials_6.1.1/
src/idas/idaa_io.o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas.o stan/li
b/stan_math/lib/sundials_6.1.1/src/idas/idas_bbdpre.o stan/lib/stan_math/lib/sun
dials_6.1.1/src/idas/idas_direct.o stan/lib/stan_math/lib/sundials_6.1.1/src/ida
s/idas_ic.o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas_io.o stan/lib/st
an_math/lib/sundials_6.1.1/src/idas/idas_ls.o stan/lib/stan_math/lib/sundials_6.
1.1/src/idas/idas_nls.o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas_nls_
sim.o stan/lib/stan_math/lib/sundials_6.1.1/src/idas/idas_nls_stg.o stan/lib/sta
n_math/lib/sundials_6.1.1/src/idas/idas_spils.o stan/lib/stan_math/lib/sundials_
6.1.1/src/sundials/sundials_band.o stan/lib/stan_math/lib/sundials_6.1.1/src/sun
dials/sundials_context.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sund
ials_dense.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_direct.
o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_futils.o stan/lib/
stan_math/lib/sundials_6.1.1/src/sundials/sundials_iterative.o stan/lib/stan_mat
h/lib/sundials_6.1.1/src/sundials/sundials_linearsolver.o stan/lib/stan_math/lib
/sundials_6.1.1/src/sundials/sundials_math.o stan/lib/stan_math/lib/sundials_6.1
.1/src/sundials/sundials_matrix.o stan/lib/stan_math/lib/sundials_6.1.1/src/sund
ials/sundials_memory.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundia
ls_nonlinearsolver.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials
_nvector.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_nvector_s
enswrapper.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_version
.o stan/lib/stan_math/lib/sundials_6.1.1/src/sunmatrix/band/sunmatrix_band.o sta
n/lib/stan_math/lib/sundials_6.1.1/src/sunmatrix/dense/sunmatrix_dense.o stan/li
b/stan_math/lib/sundials_6.1.1/src/sunlinsol/band/sunlinsol_band.o stan/lib/stan
_math/lib/sundials_6.1.1/src/sunlinsol/dense/sunlinsol_dense.o stan/lib/stan_mat
h/lib/sundials_6.1.1/src/sunnonlinsol/newton/sunnonlinsol_newton.o stan/lib/stan
_math/lib/sundials_6.1.1/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.o
ar: creating stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_idas.a
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/kinsol/kinsol.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/kinsol/kinsol.
o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/kinsol/kinsol_bbdpre.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/kinsol/
kinsol_bbdpre.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/kinsol/kinsol_direct.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/kinsol/
kinsol_direct.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/kinsol/kinsol_io.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/kinsol/kins
ol_io.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/kinsol/kinsol_ls.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/kinsol/kins
ol_ls.o
g++ -pipe -m64 -D_REENTRANT -O3 -I stan/lib/stan_math/lib/sundials_6.1.1/incl
ude -I stan/lib/stan_math/lib/sundials_6.1.1/src/sundials -DNO_FPRINTF_OUTPUT
-D_USE_MATH_DEFINES -O3 -c -x c -include stan/lib/stan_math/lib/sundials_6.1.1
/include/stan_sundials_printf_override.hpp stan/lib/stan_math/lib/sundials_6.1.1
/src/kinsol/kinsol_spils.c -o stan/lib/stan_math/lib/sundials_6.1.1/src/kinsol/k
insol_spils.o
ar -rs stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_kinsol.a stan/lib/s
tan_math/lib/sundials_6.1.1/src/kinsol/kinsol.o stan/lib/stan_math/lib/sundials_
6.1.1/src/kinsol/kinsol_bbdpre.o stan/lib/stan_math/lib/sundials_6.1.1/src/kinso
l/kinsol_direct.o stan/lib/stan_math/lib/sundials_6.1.1/src/kinsol/kinsol_io.o s
tan/lib/stan_math/lib/sundials_6.1.1/src/kinsol/kinsol_ls.o stan/lib/stan_math/l
ib/sundials_6.1.1/src/kinsol/kinsol_spils.o stan/lib/stan_math/lib/sundials_6.1.
1/src/sundials/sundials_band.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundial
s/sundials_context.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials
_dense.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_direct.o st
an/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_futils.o stan/lib/stan
_math/lib/sundials_6.1.1/src/sundials/sundials_iterative.o stan/lib/stan_math/li
b/sundials_6.1.1/src/sundials/sundials_linearsolver.o stan/lib/stan_math/lib/sun
dials_6.1.1/src/sundials/sundials_math.o stan/lib/stan_math/lib/sundials_6.1.1/s
rc/sundials/sundials_matrix.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials
/sundials_memory.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_n
onlinearsolver.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_nve
ctor.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_nvector_sensw
rapper.o stan/lib/stan_math/lib/sundials_6.1.1/src/sundials/sundials_version.o s
tan/lib/stan_math/lib/sundials_6.1.1/src/sunmatrix/band/sunmatrix_band.o stan/li
b/stan_math/lib/sundials_6.1.1/src/sunmatrix/dense/sunmatrix_dense.o stan/lib/st
an_math/lib/sundials_6.1.1/src/sunlinsol/band/sunlinsol_band.o stan/lib/stan_mat
h/lib/sundials_6.1.1/src/sunlinsol/dense/sunlinsol_dense.o stan/lib/stan_math/li
b/sundials_6.1.1/src/sunnonlinsol/newton/sunnonlinsol_newton.o stan/lib/stan_mat
h/lib/sundials_6.1.1/src/sunnonlinsol/fixedpoint/sunnonlinsol_fixedpoint.o
ar: creating stan/lib/stan_math/lib/sundials_6.1.1/lib/libsundials_kinsol.a
if ! [[mingw32-make =~ mingw32]]; then \
        echo "ERROR: Please use mingw32-make on Windows to build the Intel TBB l
ibrary."; \
        echo "This is packaged with RTools, for example."; \
        exit 1; \
fi
touch stan/lib/stan_math/lib/tbb/tbb-make-check
tbb_root="../tbb_2020.3" CXX="g++" CC="gcc" LDFLAGS='-Wl,-L,"C:/cmdstan-2.30.1/s
tan/lib/stan_math/lib/tbb" -Wl,-rpath,"C:/cmdstan-2.30.1/stan/lib/stan_math/lib/
tbb" ' 'mingw32-make' -C "stan/lib/stan_math/lib/tbb" -r -f "C:/cmdstan-2.30.1/
stan/lib/stan_math/lib/tbb_2020.3/build/Makefile.tbbmalloc" compiler=gcc cfg=rel
ease stdver=c++1y malloc CXXFLAGS="-Wno-unknown-warning-option -Wno-deprecated-c
opy -Wno-missing-attributes -Wno-class-memaccess -Wno-sized-deallocation "
mingw32-make[1]: Entering directory 'C:/cmdstan-2.30.1/stan/lib/stan_math/lib/tb
b'
g++ -c -MMD -O2 -DUSE_WINTHREAD -D_WIN32_WINNT=0x0502 -DMINGW_HAS_SECURE_API=1 -
D __MSVCRT_VERSION__ =0x0700 -msse -mthreads -m64 -mrtm -Wno-unknown-warning-opt
ion -Wno-deprecated-copy -Wno-missing-attributes -Wno-class-memaccess -Wno-sized
-deallocation -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -fno-rtti -fno-exceptions -
D__TBBMALLOC_BUILD=1 -Wno-parentheses -Wno-uninitialized -Wno-non-virtual-dtor
-flifetime-dse=1 -I../tbb_2020.3/src -I../tbb_2020.3/src/rml/include -I../tbb_20
20.3/include -I../tbb_2020.3/src/tbbmalloc -I../tbb_2020.3/src/tbbmalloc ../tbb_
2020.3/src/tbbmalloc/backend.cpp
In file included from C:/Rtools42/ucrt64/include/c++/12.2.0/stdlib.h:36,
                 from C:/Rtools42/ucrt64/lib/gcc/x86_64-w64-mingw32/12.2.0/inclu
de/mm_malloc.h:27,
                 from C:/Rtools42/ucrt64/lib/gcc/x86_64-w64-mingw32/12.2.0/inclu
de/xmmintrin.h:34,
                 from C:/Rtools42/ucrt64/lib/gcc/x86_64-w64-mingw32/12.2.0/inclu
de/immintrin.h:31,
                 from ../tbb_2020.3/include/tbb/machine/gcc_itsx.h:57,
                 from ../tbb_2020.3/include/tbb/machine/gcc_ia32_common.h:107,
                 from ../tbb_2020.3/include/tbb/machine/gcc_generic.h:232,
                 from ../tbb_2020.3/include/tbb/tbb_machine.h:197,
                 from ../tbb_2020.3/src/tbbmalloc/Synchronize.h:20,
                 from ../tbb_2020.3/src/tbbmalloc/Customize.h:29,
                 from ../tbb_2020.3/src/tbbmalloc/TypeDefinitions.h:54,
                 from ../tbb_2020.3/src/tbbmalloc/tbbmalloc_internal.h:21,
                 from ../tbb_2020.3/src/tbbmalloc/backend.cpp:19:
C:/Rtools42/ucrt64/include/c++/12.2.0/cstdlib:137:11: error: 'at_quick_exit' has
 not been declared in '::'
  137 | using ::at_quick_exit;
      | ^ ~~~~~~~~~~~~
C:/Rtools42/ucrt64/include/c++/12.2.0/cstdlib:160:11: error: 'quick_exit' has no
t been declared in '::'
  160 | using ::quick_exit;
      | ^ ~~~~~~~~~
C:/Rtools42/ucrt64/include/c++/12.2.0/stdlib.h:43:14: error: 'at_quick_exit' has
 not been declared in 'std'
   43 | using std::at_quick_exit;
      | ^ ~~~~~~~~~~~~
C:/Rtools42/ucrt64/include/c++/12.2.0/stdlib.h:46:14: error: 'quick_exit' has no
t been declared in 'std'
   46 | using std::quick_exit;
      | ^ ~~~~~~~~~
cc1plus.exe: note: unrecognized command-line option '-Wno-unknown-warning-option
' may have been intended to silence earlier diagnostics
mingw32-make[1]: *** [C:/cmdstan-2.30.1/stan/lib/stan_math/lib/tbb_2020.3/build/
Makefile.tbbmalloc:65: backend.o] Error 1
mingw32-make[1]: Leaving directory 'C:/cmdstan-2.30.1/stan/lib/stan_math/lib/tbb
'
mingw32-make: *** [stan/lib/stan_math/make/libraries:173: stan/lib/stan_math/lib
/tbb/tbbmalloc.def] Error 2

```

Any idea what the problem is?

Three follow-up questions as well:

1. Does it matter whether the file I’ve downloaded and unpacked is [cmdstan-2.30.1.tar.gz](https://github.com/stan-dev/cmdstan/releases/download/v2.30.1/cmdstan-2.30.1.tar.gz) or [Source code (zip)](https://github.com/stan-dev/cmdstan/archive/refs/tags/v2.30.1.zip)?
2. Does it matter whether I have unpacked one of the two aforementioned files manually or “automatically”, i.e. by opening a Git Shell and calling `git clone https://github.com/stan-dev/cmdstan.git --recursive`?
3. When I tried the Git Shell approach, the automatic installation directory was simply `C:\cmdstan`. This I renamed manually to `C:\cmdstan-2.30.1`. Could this have been a problem?

I would really really like to get this working.

---

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [September 1, 2022, 8:53am UTC](https://discourse.mc-stan.org/t/problem-installing-cmdstan-2-30-1-on-windows-7-signature-is-unknown-trust-file-is-corrupt/28698/7 "2022-09-01T08:53:02Z")

</div>

To fix that issue, make a `make/local` file and add the following two lines:

```nohighlight
CXXFLAGS += -Wno-nonnull
TBB_CXXFLAGS= -U __MSVCRT_VERSION__ -D __MSVCRT_VERSION__ =0x0E00

```

---

<div class="post-metadata">

**Author:** ![blokeman](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/blokeman/32/16236_2.png) [@blokeman](https://discourse.mc-stan.org/u/blokeman)\
**Post date:** [September 1, 2022, 9:19am UTC](https://discourse.mc-stan.org/t/problem-installing-cmdstan-2-30-1-on-windows-7-signature-is-unknown-trust-file-is-corrupt/28698/8 "2022-09-01T09:19:03Z")

</div>

Holy shit, that worked.

Rok, you rock!
