From 05d78e5d2f691136d1553a32b488bb2e973d0290 Mon Sep 17 00:00:00 2001 From: Petr Hodina Date: Thu, 27 Mar 2025 08:23:39 +0100 Subject: [PATCH] xtensor: Fix darwin build with clang --- ...001-Fix-clang-build-errors-on-darwin.patch | 66 +++++++++++++++++++ pkgs/by-name/xt/xtensor/package.nix | 3 + 2 files changed, 69 insertions(+) create mode 100644 pkgs/by-name/xt/xtensor/0001-Fix-clang-build-errors-on-darwin.patch diff --git a/pkgs/by-name/xt/xtensor/0001-Fix-clang-build-errors-on-darwin.patch b/pkgs/by-name/xt/xtensor/0001-Fix-clang-build-errors-on-darwin.patch new file mode 100644 index 000000000000..3636d2bd1431 --- /dev/null +++ b/pkgs/by-name/xt/xtensor/0001-Fix-clang-build-errors-on-darwin.patch @@ -0,0 +1,66 @@ +From 475bedb15252a3732683f3a62c45cc3f1abbab5c Mon Sep 17 00:00:00 2001 +From: Mykola Vankovych +Date: Tue, 14 Jan 2025 16:48:47 +0100 +Subject: [PATCH] Added fixes for building with clang 19 (more strict template + matching rules) + +--- + include/xtensor/xexpression_traits.hpp | 7 +++---- + include/xtensor/xstorage.hpp | 4 ++-- + include/xtensor/xutils.hpp | 3 ++- + 3 files changed, 7 insertions(+), 7 deletions(-) + +diff --git a/include/xtensor/xexpression_traits.hpp b/include/xtensor/xexpression_traits.hpp +index 205de67a5..2f84ae234 100644 +--- a/include/xtensor/xexpression_traits.hpp ++++ b/include/xtensor/xexpression_traits.hpp +@@ -103,16 +103,15 @@ namespace xt + using type = xarray; + }; + +-#if defined(__GNUC__) && (__GNUC__ > 6) +-#if __cplusplus == 201703L ++// Workaround for rebind_container problems when C++17 feature is enabled ++#ifdef __cpp_template_template_args + template