From ec84470623b4251a7ceb503171a7a11eb4620aed Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Mon, 19 Jan 2026 20:51:20 +0100 Subject: [PATCH 1/2] itk: fix build with gcc 15 --- pkgs/development/libraries/itk/generic.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/libraries/itk/generic.nix b/pkgs/development/libraries/itk/generic.nix index c55c362c6d4f..44b971d50ad6 100644 --- a/pkgs/development/libraries/itk/generic.nix +++ b/pkgs/development/libraries/itk/generic.nix @@ -94,6 +94,18 @@ stdenv.mkDerivation { ln -sr ${itkAdaptiveDenoisingSrc} Modules/External/ITKAdaptiveDenoising ln -sr ${itkSimpleITKFiltersSrc} Modules/External/ITKSimpleITKFilters ln -sr ${rtkSrc} Modules/Remote/RTK + + # fix build with GCC 15 + substituteInPlace Modules/ThirdParty/GoogleTest/src/itkgoogletest/googletest/src/gtest-death-test.cc \ + --replace-fail \ + '#include ' \ + '#include + #include ' + substituteInPlace Modules/Core/Common/include/itkFloatingPointExceptions.h \ + --replace-fail \ + '#include "itkSingletonMacro.h"' \ + '#include "itkSingletonMacro.h" + #include ' ''; cmakeFlags = [ From 7c069b42e13e9ad018a1ed18ad04069f5fb9a0d1 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Mon, 19 Jan 2026 21:17:41 +0100 Subject: [PATCH 2/2] otb: fix itk build with GCC 15 --- pkgs/by-name/ot/otb/package.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/by-name/ot/otb/package.nix b/pkgs/by-name/ot/otb/package.nix index f1b433ee31b0..18daaa405904 100644 --- a/pkgs/by-name/ot/otb/package.nix +++ b/pkgs/by-name/ot/otb/package.nix @@ -98,6 +98,17 @@ let postPatch = '' substituteInPlace Modules/ThirdParty/KWSys/src/KWSys/CMakeLists.txt \ --replace-fail 'cmake_minimum_required(VERSION 3.1 FATAL_ERROR)' 'cmake_minimum_required(VERSION 3.10)' + # fix build with GCC 15 + substituteInPlace Modules/ThirdParty/GoogleTest/src/itkgoogletest/googletest/src/gtest-death-test.cc \ + --replace-fail \ + '#include ' \ + '#include + #include ' + substituteInPlace Modules/Core/Common/include/itkFloatingPointExceptions.h \ + --replace-fail \ + '#include "itkSingletonMacro.h"' \ + '#include "itkSingletonMacro.h" + #include ' ''; # fix the CMake config files for ITK which contains double slashes