Problem with cmdstan unpacking

Hello, im having some trouble with my cmdstan installation. When it is supposed to unpack the tar file when using cmdstanr::install_cmdstan(overwrite=TRUE) i get the error: /usr/bin/tar: Cannot connect to C: resolve failed. According to my googeling this seems to be because tar thinks : in my filepath means that it is on a different machine this can be fixed with the flag --force-local but i do not know how to implement that when the tar is unpacked in the middle of the cmdstanr::install_cmdstan(overwrite=TRUE) call.

Have unpacked manually but then i get a different error when running ulam()
C:/rtools42/ucrt64/include/c++/12.2.0/stdlib.h:46:14: error: ‘quick_exit’ has not been declared in ‘std’
46 | using std::quick_exit;

Im not sure if this is related to the first one but i would need some help to get cmdstan to work properly.

Im using windows 8.1
cmdstan version 2.30.1
rtools42

@andrjohns might perhaps help you out.

If the automatic unpacking is failing, the next option would be to:

  • Unpack manually
  • Use set_cmdstan_path() in cmdstanr to point to the unpacked folder
  • Run check_cmdstan_toolchain(fix = TRUE) to make sure that your system is configured correctly
  • Run rebuild_cmdstan() to build cmdstan

Can you give those steps a try?

1 Like

i am getting the same error i got from ulam() when running rebuild_cmdstan()

here is the whole error message (there is more but this is the error part):
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/include/mm_malloc.h:27,
from C:/rtools42/ucrt64/lib/gcc/x86_64-w64-mingw32/12.2.0/include/xmmintrin.h:34,
from C:/rtools42/ucrt64/lib/gcc/x86_64-w64-mingw32/12.2.0/include/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/large_objects.cpp:17:
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 not 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 not been declared in ‘std’
46 | using std::quick_exit;
| ^~~~~~~~~~
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/include/mm_malloc.h:27,
from C:/rtools42/ucrt64/lib/gcc/x86_64-w64-mingw32/12.2.0/include/xmmintrin.h:34,
from C:/rtools42/ucrt64/lib/gcc/x86_64-w64-mingw32/12.2.0/include/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 not 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 not been declared in ‘std’
46 | using std::quick_exit;

I believe this might be due to some makeflags missing when working with RTools42, can you try running this:

cpp_options <- list(
  "CXXFLAGS += -Wno-nonnull",
  "TBB_CXXFLAGS= -U__MSVCRT_VERSION__ -D__MSVCRT_VERSION__=0x0E00"
)

cmdstanr::cmdstan_make_local(cpp_options = cpp_options)
cmdstanr::rebuild_cmdstan()

Thank you that did it!

1 Like