Cannot compile anything with cmdstan MacOS Tahoa

Short summary of the problem

Compiling cmdstan form Github or compiling any Stan program after installing cmdstan with miniconda results in a lot of error messages. Starting with

In file included from ../tbb_2020.3/src/tbbmalloc/backend.cpp:19:
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:
In file included from ../tbb_2020.3/include/tbb/tbb_config.h:36:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/cstddef:56:
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__cstddef/byte.h:14:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/enable_if.h:34:1: error: cannot template a using declaration
using __enable_if_t _LIBCPP_NODEBUG = typename enable_if<_Bp, _Tp>::type;
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1/__type_traits/enable_if.h:34:21: error: expected expression
using __enable_if_t _LIBCPP_NODEBUG = typename enable_if<_Bp, _Tp>::type;

MacOS Tahoe 26.1, cmdstanr 0.9.0, RStudio 2025.09.2, cmdstan 2.37.0. Rebuild.cmdstan() doesn’t help.

clang version 19.1.7
Target: arm64-apple-darwin25.1.0
Thread model: posix
InstalledDir: /opt/miniconda3/envs/stan/bin

GNU Make 4.4.1
Built for aarch64-apple-darwin20.0.0

If you’re installing from conda-forge, can you share your complete conda environment versions?

Hi!

Many thanks for your reply!

My Miniconda version is 25.9.1. It should be current because my older installation of Anaconda could not connect to conda-forge (HTTP 404 NOT FOUND for channel…) so I removed Anaconda and installed a new copy of Miniconda.

It seems that something is wrong with my C++ compiler even when

check_cmdstan_toolchain(fix = TRUE)
The C++ toolchain required for CmdStan is setup properly!

Best regards,

Hello again!

I reinstalled Xcode and now Stan seems to work. At least I can compile and run some simple models!

Sorry to bother the forum without checking everything by myself!

Best regards,