Cmdstan build issues

@rok_cesnovar Sorry to add to your pile of cmdstanr issues, but I’m seeing some inconsistent behaviour when trying to build cmdstan.

If I build using install_cmdstan(), it fails with the error:

        1 file(s) copied.

    type "C:\Users\263389i\AppData\Local\Temp\jam2af8111.000" > "bin.v2\libs\program_options\build\gcc-8.3.0\release\cxxstd-11-iso\link-static\threading-multi\visibility-hidden\libboost_program_options-variant-mgw83-mt-x64-1_72-static.cmake"

...failed text-action bin.v2\libs\program_options\build\gcc-8.3.0\release\cxxstd-11-iso\link-static\threading-multi\visibility-hidden\libboost_program_options-variant-mgw83-mt-x64-1_72-static.cmake...
...skipped <pC:\Users\263389i\Documents\.cmdstanr\cmdstan-2.24.1\stan\lib\stan_math\lib\boost_1.72.0\stage\lib\cmake\boost_program_options-1.72.0>libboost_program_options-variant-mgw83-mt-x64-1_72-static.cmake for lack of <pbin.v2\libs\program_options\build\gcc-8.3.0\release\cxxstd-11-iso\link-static\threading-multi\visibility-hidden>libboost_program_options-variant-mgw83-mt-x64-1_72-static.cmake...
...failed updating 1 target...
...skipped 1 target...
...updated 46 targets...
mingw32-make.exe: *** [make/command:36: stan/lib/stan_math/lib/boost_1.72.0/stage/lib/libboost_program_options*.a] Error 1
mingw32-make.exe: *** Waiting for unfinished jobs....

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

If I use the ‘Rtools bash’ shell it also fails:

cd Documents/.cmdstanr/cmdstan-2.24.1/

mingw32-make -j8 build
-bash: mingw32-make: command not found

But if I instead use the ‘Rtools MinGW 64-bit’ shell, it builds without issue.

So I’m not sure where the issue is in there, but hopefully some of that information is helpful!

Hm, if anything this looks like a cmdstan issue or a toolchain one.

This boost non-header-only libs are the problem. You could actually just ignore this and start using cmdstanr. The first compile will take awhile but then it works fine.

Can I ask you to install a branch?

remotes::install_github(“stan-dev/cmdstanr@ windows_fixes“)

And run check_cmdstan_toolchain(fix = FALSE)


That returned good news for me:

> check_cmdstan_toolchain(fix = FALSE)
The CmdStan toolchain is setup properly!

But I did already get cmdstan/r set up and running using the instructions I posted over in this thread: Error caused by missing stan header, so that might affect things

So a model compiles for you then?

Yep, compiled & ran the bernoulli example with no issues