From c46e5e5e5f4d5ac40c0bc65dab39e1a73cfaf72b Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 21 Jan 2026 14:32:12 +0000 Subject: [PATCH] python3Packages.executorch: fix build with GCC 15 Tracking: https://github.com/NixOS/nixpkgs/issues/475479 --- pkgs/development/python-modules/executorch/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/development/python-modules/executorch/default.nix b/pkgs/development/python-modules/executorch/default.nix index 0ffade9dc6b9..faf18e94ed5d 100644 --- a/pkgs/development/python-modules/executorch/default.nix +++ b/pkgs/development/python-modules/executorch/default.nix @@ -85,6 +85,15 @@ buildPythonPackage (finalAttrs: { --replace-fail \ "CMAKE_MINIMUM_REQUIRED(VERSION 3.5 FATAL_ERROR)" \ "CMAKE_MINIMUM_REQUIRED(VERSION 3.10 FATAL_ERROR)" + '' + # Fix build with GCC>=15 + + '' + substituteInPlace third-party/flatcc/include/flatcc/portable/grisu3_print.h \ + --replace-fail \ + 'static char hexdigits[16] = "0123456789ABCDEF";' \ + 'static char hexdigits[17] = "0123456789ABCDEF";' + + sed -i "1i #include " backends/apple/coreml/runtime/inmemoryfs/memory_buffer.hpp ''; env = {