"No thread API"

Hi, I just downloaded 0.11.2 on an Intel Mac, MacOS Ventura 13.1

In both trying to compile examples as with my own older apps I run into the following error: “No thread API”, triggered by a __config, which claims to be a ‘part of the LLVM Project’.

The segment that triggered the error looks like this:

// Thread API
#if !defined(_LIBCPP_HAS_NO_THREADS) && \
    !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && \
    !defined(_LIBCPP_HAS_THREAD_API_WIN32) && \
    !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
#  if defined(__FreeBSD__) || \
      defined(__wasi__) || \
      defined(__NetBSD__) || \
      defined(__OpenBSD__) || \
      defined(__NuttX__) || \
      defined(__linux__) || \
      defined(__GNU__) || \
      (defined(__APPLE__) && !defined(_LIBCPP_ON_RTKIT)) || \
      defined(__sun__) || \
      defined(__MVS__) || \
      defined(_AIX)
#    define _LIBCPP_HAS_THREAD_API_PTHREAD
#  elif defined(_LIBCPP_ON_RTKIT)
#    define _LIBCPP_HAS_THREAD_API_C11
#  elif defined(__Fuchsia__)
     // TODO(44575): Switch to C11 thread API when possible.
#    define _LIBCPP_HAS_THREAD_API_PTHREAD
#  elif defined(_LIBCPP_WIN32API)
#    define _LIBCPP_HAS_THREAD_API_WIN32
#  else
#    error "No thread API"
#  endif // _LIBCPP_HAS_THREAD_API
#endif // _LIBCPP_HAS_NO_THREADS

So it seems some flags are missing maybe?

Seeing how I could hardly find anything online at all regarding this specific error, I figured I should try a reinstall of XCode. That fixed the problem.

Hey @eelke glad you got it working and thanks for posting about the fix. Also the nightly build should substantially reduce the number of compiler warnings, and has some other nice changes. You can find a link to it at the toward the bottom of the Download page if you want to give it a try.