macOS local build requirements

Using macOS 26.3(25D125) on Apple Silicon (M2), with updated XCode.

Are there build requirements I could be missing or how to inspect the particular clang dependencies, header files, etc.?

Pip tarball install and spin build both fail with various header include errors, on versions 2.2.3 and 2.4.2 (building against python 3.14 as these are particular project requirements).

All builds succeed on linux 6.17.8-arch1-1, python 3.14, etc.

$ mkvirtualenv numpy -p 3.14
$ pip install numpy==2.2.3 --no-binary numpy
...
$ git clone git@github.com:numpy/numpy.git
$ cd numpy
$ git checkout v2.2.3
$ git submodule update –init
$ mkvirtualenv numpybuild -p 3.14
$ pip install .
...
$ git checkout v2.4.2
$ git submodule update
$ pip install .
...
$ pip install -r requirements/build_requirements.txt
$ spin build
...

Getting errors like:

../numpy/_core/src/common/utils.hpp:10:10: fatal error: 'type_traits' file not found
         10 | #include <type_traits>
            |          ^~~~~~~~~~~~~
../numpy/_core/src/highway/hwy/abort.cc:12:10: fatal error: 'atomic' file not found
   12 | #include <atomic>
      |          ^~~~~~~~
../numpy/_core/src/common/npstd.hpp:6:10: fatal error: 'cstddef' file not found
    6 | #include <cstddef>
      |          ^~~~~~~~~

Here’s the full build environment:

The Meson build system
Version: 1.9.2
Source dir: /Users/aren/git/numpy
Build dir: /Users/aren/git/numpy/build
Build type: native build
Project name: NumPy
Project version: 2.4.2
C compiler for the host machine: cc (clang 17.0.0 "Apple clang version 17.0.0 (clang-1700.6.3.2)")
C linker for the host machine: cc ld64 1230.1
C++ compiler for the host machine: c++ (clang 17.0.0 "Apple clang version 17.0.0 (clang-1700.6.3.2)")
C++ linker for the host machine: c++ ld64 1230.1
Cython compiler for the host machine: cython (cython 3.2.4)
Host machine cpu family: aarch64
Host machine cpu: aarch64
Program python3 found: YES (/Users/aren/git/venvs/numpybuild/bin/python)
Found pkg-config: YES (/opt/homebrew/bin/pkg-config) 2.5.1
Run-time dependency python found: YES 3.14
Has header "Python.h" with dependency python-3.14: YES 
Compiler for C supports arguments -fno-strict-aliasing: YES 
Compiler for C supports arguments -ftrapping-math: YES 
Test features "NEON NEON_FP16 NEON_VFPV4 ASIMD" : Supported 
Test features "ASIMDHP" : Supported 
Test features "ASIMDDP" : Supported 
Test features "ASIMDFHM" : Supported 
Test features "SVE" : Supported 
Configuring npy_cpu_dispatch_config.h using configuration
Message: 
CPU Optimization Options
  baseline:
    Requested : min
    Enabled   : NEON NEON_FP16 NEON_VFPV4 ASIMD
  dispatch:
    Requested : max
    Enabled   : ASIMDHP ASIMDDP ASIMDFHM SVE

Library m found: YES
Run-time dependency scipy-openblas found: NO (tried pkgconfig)
Run-time dependency accelerate found: YES
Message: BLAS symbol suffix: $NEWLAPACK
Checking if "Check atomic builtins without -latomic" links: YES 
Program _build_utils/process_src_template.py found: YES (/Users/aren/git/venvs/numpybuild/bin/python /Users/aren/git/numpy/numpy/_build_utils/process_src_template.py)
Program _build_utils/tempita.py found: YES (/Users/aren/git/venvs/numpybuild/bin/python /Users/aren/git/numpy/numpy/_build_utils/tempita.py)

I can install the prebuilt wheels from PyPI just fine, but these are not always available for particular versions/platforms, and I’m beginning to think my MacOS build environment has not worked for some time, but not sure how to investigate..

Same results with latest update to XCode, clang-1700.6.4.2