I am trying to install CmdStan on Mac OS. I have been using it without a problem for over a year and it has worked very nicely. But now I get the following problem (see printout below) when trying to rebuild it or when trying a fresh install.
I’ve seen a bunch of links online with similar issues and I’ve tried all sorts to try to solve it, but nothing has been able to fix my problem.
I love stan and I tend to use brms with cmdstan on the backend. But, as I understand things, the problem I’m facing now is just that I cannot get CmdStan to install properly, as it is missing locations for many files. So, I’ve messed something up somehow. Unhelpfully, I cannot pinpoint what has changed in recent days on my system. But clearly somehting has changed, as it was working fine just recently.
Any help would be very much appreciated.
Rich
install_cmdstan(cores = 8, overwrite = TRUE)
The C++ toolchain required for CmdStan is setup properly!
trying URL ‘https://api.github.com/repos/stan-dev/cmdstan/releases/latest’
Content type ‘application/json; charset=utf-8’ length 15934 bytes (15 KB)
==================================================
downloaded 15 KB
- Latest CmdStan release is v2.35.0
- Installing CmdStan v2.35.0 in /Users/rramsey/.cmdstan/cmdstan-2.35.0
- Downloading cmdstan-2.35.0.tar.gz from GitHub…
- Removing the existing installation of CmdStan…
trying URL ‘https://github.com/stan-dev/cmdstan/releases/download/v2.35.0/cmdstan-2.35.0.tar.gz’
Content type ‘application/octet-stream’ length 51682840 bytes (49.3 MB)
==================================================
and below is just a short version of the error messages, as there were other files not found also.
In file included from …/tbb_2020.3/src/tbbmalloc/backref.cpp:17:
In file included from …/tbb_2020.3/src/tbbmalloc/tbbmalloc_internal.h:21:
In file included from …/tbb_2020.3/src/tbbmalloc/TypeDefinitions.h:54:
In file included from …/tbb_2020.3/src/tbbmalloc/Customize.h:21:
In file included from …/tbb_2020.3/include/tbb/tbb_stddef.h:91:
…/tbb_2020.3/include/tbb/tbb_config.h:36:14: fatal error: ‘cstddef’ file not found
36 | #include
| ^~~~~~~~~
1 error generated.
make[1]: *** [backend.o] Error 1
make[1]: *** Waiting for unfinished jobs…
1 error generated.
make[1]: *** [large_objects.o] Error 1
1 error generated.
make[1]: *** [backref.o] Error 1
make: *** [stan/lib/stan_math/lib/tbb/tbbmalloc.def] Error 2
1 error generated.
make: *** [stan/src/stan/model/model_header.hpp.gch/model_header_16_0.hpp.gch] Error 1
1 error generated.
1 error generated.
make: *** [bin/cmdstan/diagnose.o] Error 1
make: *** [bin/cmdstan/print.o] Error 1
1 error generated.
make: *** [bin/cmdstan/stansummary.o] Error 1
1 error generated.
make: *** [src/cmdstan/main.o] Error 1
Warning message:
There was a problem during installation. See the error message(s) above.
And my session info.
sessionInfo()
R version 4.4.1 (2024-06-14)
Platform: x86_64-apple-darwin20
Running under: macOS Sonoma 14.7