"failed text-action" when installing CmdStan via CmdStanR

When installing CmdStan 2.24.0 via CmdStanR on Windows 10 I got an error message message similar to:

type "C:\Users\modrak_m\AppData\Local\Temp\jam6818c95b4.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 C:\build-sdk-Desktop_Qt_5_11_3_MSVC2017_64bit-Debug\external\boost\boost\bin.v2\libs\program_options\build\msvc-14.1\debug\address-model-64\link-static\runtime-link-static\threading-multi\libboost_program_options-variant-vc141-mt-sgd-x64-1_73-static.cmake...
...skipped <pC:\proj\sdk\external\boost-program-options\stage\lib\cmake\boost_program_options-1.73.0>libboost_program_options-variant-vc141-mt-sgd-x64-1_73-static.cmake for lack of <pC:\build-sdk-Desktop_Qt_5_11_3_MSVC2017_64bit-Debug\external\boost\boost\bin.v2\libs\program_options\build\msvc-14.1\debug\address-model-64\link-static\runtime-link-static\threading-multi>libboost_program_options-variant-vc141-mt-sgd-x64-1_73-static.cmake...
compile-c-c++ C:\build-sdk-Desktop_Qt_5_11_3_MSVC2017_64bit-Debug\external\boost\boost\bin.v2\libs\regex\build\msvc-14.1\debug\address-model-64\link-static\runtime-link-static\threading-multi\regex.obj

This turns out to be a problem with boost installs in general and the source is that cmd.exe doesn’t like paths longer than 256 chars. (see https://stackoverflow.com/questions/60335004/boost-bjam-fails-as-a-cmake-external-project)

The solution for me was to allow cmd.exe to work with longer paths as described at https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation#enable-long-paths-in-windows-10-version-1607-and-later - but changing the cmdstan install path to somewhere closer to the root of the operating system should also work.

2 Likes

implementing https://github.com/stan-dev/cmdstan/issues/929. by the next release will solve this particular problem which is due to the use of a boost non-header only library

2 Likes