<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/111502>111502</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Complex number support issue with Clang 19.1.0 on Windows ARM64 (MSVC target)
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          Molier
      </td>
    </tr>
</table>

<pre>
    ## Environment:
- Windows on ARM64 surface pro 11
- Clang 19.1.0 from llvm https://discourse.llvm.org/t/llvm-19-x-release-third-party-binaries/80374/10
- Target: aarch64-pc-windows-msvc
- Building NumPy 2.1.2 with Meson 1.4.99

## Issue:
When compiling NumPy, the build fails due to complex number type incompatibility. The error suggests that the `complex.h` header does not include the expected complex float type.

## Error message:
```
Has header "complex.h" : YES
Checking for type "complex float" : NO
..\numpy_core\meson.build:175:4: ERROR: Problem encountered: "complex.h" header does not include complex type complex float

```
This occurs despite `complex.h` being present. It appears that Clang with MSVC target on Windows ARM64 may not be correctly supporting C99 complex types or may be using incompatible complex type definitions.

Steps to reproduce:
1. Install llvm 19.1.0 for Windows ARM64
2. Attempt to build NumPy 2.1.2 from source using pip or Meson

Expected behavior:
Clang should properly support C99 complex types when targeting MSVC on Windows ARM64.

Additional context:
This issue specifically affects building scientific Python libraries like NumPy on Windows ARM64 platforms using Clang with MSVC target.
longer error:
```
+ C:\Users\oscar\scoop\apps\python\current\python.exe C:\Users\oscar\AppData\Local\Temp\pip-install-g2pcs6fw\numpy_341358244e4e427e914ba32e33ee6f09\vendored-meson\meson\meson.py setup C:\Users\oscar\AppData\Local\Temp\pip-install-g2pcs6fw\numpy_341358244e4e427e914ba32e33ee6f09 C:\Users\oscar\AppData\Local\Temp\pip-install-g2pcs6fw\numpy_341358244e4e427e914ba32e33ee6f09\.mesonpy-foabpgfu -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\oscar\AppData\Local\Temp\pip-install-g2pcs6fw\numpy_341358244e4e427e914ba32e33ee6f09\.mesonpy-foabpgfu\meson-python-native-file.ini
  The Meson build system
  Version: 1.4.99
  Source dir: C:\Users\oscar\AppData\Local\Temp\pip-install-g2pcs6fw\numpy_341358244e4e427e914ba32e33ee6f09
  Build dir: C:\Users\oscar\AppData\Local\Temp\pip-install-g2pcs6fw\numpy_341358244e4e427e914ba32e33ee6f09\.mesonpy-foabpgfu
  Build type: native build
  Project name: NumPy
  Project version: 2.1.2
  C compiler for the host machine: clang (clang 19.1.0 "clang version 19.1.0")
  C linker for the host machine: clang lld-link 19.1.0
  C++ compiler for the host machine: clang++ (clang 19.1.0 "clang version 19.1.0")
  C++ linker for the host machine: clang++ lld-link 19.1.0
  Cython compiler for the host machine: cython (cython 3.0.11)
  Host machine cpu family: aarch64
  Host machine cpu: aarch64
  Program python found: YES (C:\Users\oscar\scoop\apps\python\current\python.exe)
  Run-time dependency python found: YES 3.12
  Has header "Python.h" with dependency python: YES
  Compiler for C supports arguments -fno-strict-aliasing: YES
  Compiler for C supports arguments -ftrapping-math: YES
  Message: During parsing cpu-dispatch: The following CPU features were ignored due to platform incompatibility or lack of support:
  "XOP FMA4"
  Test features "NEON NEON_FP16 NEON_VFPV4 ASIMD" : Supported
  Test features "ASIMDHP" : Supported
  Test features "ASIMDFHM" : Supported
  Test features "SVE" : Unsupported due to Compiler fails against the test code of "SVE"
  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 -xop -fma4
      Enabled   : ASIMDHP ASIMDFHM

  Library m found: NO
  Fetching value of define "__MINGW32__" : (undefined)
  Found pkg-config: YES (C:\Users\oscar\scoop\shims\pkg-config.EXE) 0.26
  Run-time dependency scipy-openblas found: NO (tried pkgconfig)
  Found CMake: C:\Program Files\CMake\bin\cmake.EXE (3.30.4)
  WARNING: CMake Toolchain: Failed to determine CMake compilers state
  WARNING: CMake Toolchain: Failed to determine CMake compilers state
  Run-time dependency openblas found: NO (tried pkgconfig, pkgconfig, pkgconfig and system)
  Run-time dependency flexiblas found: NO (tried pkgconfig and cmake)
  Run-time dependency blis found: NO (tried pkgconfig and cmake)
  Run-time dependency blas found: NO (tried pkgconfig and system)
  WARNING: CMake Toolchain: Failed to determine CMake compilers state
  Run-time dependency openblas found: NO (tried pkgconfig, pkgconfig, pkgconfig and system)
  Run-time dependency flexiblas found: NO (tried pkgconfig and cmake)
  Run-time dependency lapack found: NO (tried pkgconfig and system)
  Checking if "Check atomic builtins without -latomic" : links: NO
  Library atomic found: NO
  Program _build_utils/process_src_template.py found: YES (C:\Users\oscar\scoop\apps\python\current\python.exe C:\Users\oscar\AppData\Local\Temp\pip-install-g2pcs6fw\numpy_341358244e4e427e914ba32e33ee6f09\numpy\_build_utils/process_src_template.py)
  Program _build_utils/tempita.py found: YES (C:\Users\oscar\scoop\apps\python\current\python.exe C:\Users\oscar\AppData\Local\Temp\pip-install-g2pcs6fw\numpy_341358244e4e427e914ba32e33ee6f09\numpy\_build_utils/tempita.py)
  Configuring __config__.py using configuration
  ..\numpy\meson.build:440: WARNING: The variable(s) 'BLAS_INCLUDEDIR', 'BLAS_LIBDIR', 'BLAS_OPENBLAS_CONFIG', 'BLAS_PCFILEDIR', 'BLAS_TYPE_NAME', 'BLAS_VERSION', 'LAPACK_INCLUDEDIR', 'LAPACK_LIBDIR', 'LAPACK_OPENBLAS_CONFIG', 'LAPACK_PCFILEDIR', 'LAPACK_TYPE_NAME', 'LAPACK_VERSION' in the input file 'numpy\__config__.py.in' are not present in the given configuration data.
  Checking for size of "short" : 2
  Checking for size of "int" : 4
  Checking for size of "long" : 4
  Checking for size of "long long" : 8
  Checking for size of "float" : 4
  Checking for size of "double" : 8
  Checking for size of "long double" : 8
  Checking for size of "size_t" : 8
  Checking for size of "size_t" : 8 (cached)
  Checking for size of "wchar_t" : 2
  Checking for size of "off_t" : 4
  Checking for size of "Py_intptr_t" with dependency python: 8
  Checking for size of "PY_LONG_LONG" with dependency python: 8
  Has header "complex.h" : YES
  Checking for type "complex float" : NO

  ..\numpy\_core\meson.build:175:4: ERROR: Problem encountered: "complex.h" header does not include complex type complex float

  A full log can be found at C:\Users\oscar\AppData\Local\Temp\pip-install-g2pcs6fw\numpy_341358244e4e427e914ba32e33ee6f09\.mesonpy-foabpgfu\meson-logs\meson-log.txt
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWdlu4zizfhrmpiDBluTtIhduxe4OThYj6WXmyqClksXTFMlDUkk8T39ASrLlLB1PY6Zn8OMHgsAii8WPtZNFjWFbgXhORh_I6OKM1raU-vxacob6bCPz3TmJYhLFsBAPTEtRobAknpPBBRnMA_jGRC4fDUgB87vrcQKm1gXNEJSWMBx2ZCmnYgvDWTgMB1BoWQHnDxWU1irjuEVLEi1zZjJZa4Ohmwyl3pJoaUm0dJ_BcBY8BRo5UoOBLZnOA0W13QUbJqhmaEi0nA7iSUKi5XDQbfyZ6i06wECpzspxEqgseGxAB5V5yDrCDzXjORNbuKmr1Q6icBhG8MhsCddopIBhmISzWUPd_m_kcmlMjXuJfCtRQCYrxfieGYlSsCXCxm0BBWXcQF4jWOkpOT6BqKsNarA7hcCEG6WWbRhndhfC5xIBtZYaTL3dorEGbEmt50nGg5ZHWJLxAEqkOWrIJRoQ0jpmvM7R0-KTwsxivt-14NKx2SkMXznYwm9ZoTF0ezggGQ_aP__5iZpuTxJFByhRBE7ovy_uG7q0xOy7k0gh22MeyBsc3ZKb22ZFGJJRKupK7daZ1EhGaeUUEXopkng-nIxIPE_cksXd3e2d-7HScsOxAhSZrIVFjY7yBbK3hNTh8fiOwfXFcyyBzyUzILOs1gZyNIrZl1rZoDu60mhQ2BAuLVClkOpWkY13NMZ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