triton icon indicating copy to clipboard operation
triton copied to clipboard

triton should be compatible with cmake 4

Open LunNova opened this issue 2 months ago • 2 comments

triton's pyproject.toml currently pins cmake to <4

https://github.com/triton-lang/triton/blob/73afd00150de3f2f9408f333c3e500e0f6746026/pyproject.toml#L2

It would be nice if this pin could be relaxed. In nixpkgs triton builds fine with CMake 4, so we're likely to carry a patch to relax this in the short term as we're bumping CMake ahead of NixOS 25.11 Xantusia's release.

I'm not immediately opening a PR to relax the pin as it looks like this was added recently in #6330 to fix breakage on macOS, and I'm not sure what the appropriate change to make would be nor do I have any macOS box available to try out that build.

LunNova avatar Sep 19 '25 23:09 LunNova

Tried it out in #8324 and CMake 4 still seems to be broken.

peterbell10 avatar Sep 30 '25 18:09 peterbell10

Log as a gist so it's visible after that github action run disappears.

Key issue seems to be a broken include search path on the macOS actions run on CMake 4.1:

   /opt/homebrew/Cellar/llvm@19/19.1.7/bin/../include/c++/v1/cmath:331:5: error: <cmath> tried including <math.h> but didn't find libc++'s <math.h> header.           This usually means that your header search paths are not configured properly.           The header search paths should contain the C++ Standard Library headers before           any C Standard Library, and you are probably using compiler flags that make that           not be the case.
    331 | #   error <cmath> tried including <math.h> but didn't find libc++'s <math.h> header. \
        |     ^
  /opt/homebrew/Cellar/llvm@19/19.1.7/bin/../include/c++/v1/cmath:568:15: error: expected unqualified-id
    568 |   return std::isnan(__lcpp_x);

The CMake 4 change to how CMAKE_OSX_SYSROOT's default is picked might be related.

LunNova avatar Oct 02 '25 16:10 LunNova