From 76ccfa0a97060a07210511bf8d386343fd595f66 Mon Sep 17 00:00:00 2001 From: Rohit1 Singh Date: Wed, 28 Jan 2026 03:44:57 -0500 Subject: [PATCH] dcgm: fix build with gcc15 --- pkgs/by-name/dc/dcgm/fix-gcc15.patch | 49 ++++++++++++++++++++++++++++ pkgs/by-name/dc/dcgm/package.nix | 4 +++ 2 files changed, 53 insertions(+) create mode 100644 pkgs/by-name/dc/dcgm/fix-gcc15.patch diff --git a/pkgs/by-name/dc/dcgm/fix-gcc15.patch b/pkgs/by-name/dc/dcgm/fix-gcc15.patch new file mode 100644 index 000000000000..d764ece57c44 --- /dev/null +++ b/pkgs/by-name/dc/dcgm/fix-gcc15.patch @@ -0,0 +1,49 @@ +diff --git a/common/CudaLib/mock/CudaLibMock.cpp b/common/CudaLib/mock/CudaLibMock.cpp +index f79a74b..a3a43e9 100644 +--- a/common/CudaLib/mock/CudaLibMock.cpp ++++ b/common/CudaLib/mock/CudaLibMock.cpp +@@ -15,6 +15,7 @@ + */ + + #include "CudaLibMock.h" ++#include + + #include + #include +diff --git a/common/DcgmStringHelpers.cpp b/common/DcgmStringHelpers.cpp +index 8bf1f05..5f72267 100644 +--- a/common/DcgmStringHelpers.cpp ++++ b/common/DcgmStringHelpers.cpp +@@ -14,6 +14,7 @@ + * limitations under the License. + */ + #include "DcgmStringHelpers.h" ++#include + + #include + #include +diff --git a/common/EntityListHelpers.cpp b/common/EntityListHelpers.cpp +index a10bb1b..6f65efa 100644 +--- a/common/EntityListHelpers.cpp ++++ b/common/EntityListHelpers.cpp +@@ -98,7 +98,7 @@ struct EntityMapTypedIterator + + bool operator==(EntityMapTypedIterator const &other) const + { +- return m_it == other.it; ++ return m_it == other.m_it; + } + + template +diff --git a/nvvs/include/IgnoreErrorCodesHelper.h b/nvvs/include/IgnoreErrorCodesHelper.h +index 4c94581..4e101ea 100644 +--- a/nvvs/include/IgnoreErrorCodesHelper.h ++++ b/nvvs/include/IgnoreErrorCodesHelper.h +@@ -18,6 +18,7 @@ + + #include "DcgmGroupEntityPairHelpers.h" + #include "DcgmStringHelpers.h" ++#include + + #include + #include diff --git a/pkgs/by-name/dc/dcgm/package.nix b/pkgs/by-name/dc/dcgm/package.nix index fd5d36113243..8c823615b1ef 100644 --- a/pkgs/by-name/dc/dcgm/package.nix +++ b/pkgs/by-name/dc/dcgm/package.nix @@ -86,6 +86,7 @@ stdenv.mkDerivation { patches = [ ./remove-cuda-11.patch ./dynamic-libs.patch + ./fix-gcc15.patch (replaceVars ./fix-paths.patch { inherit coreutils; inherit util-linux; @@ -145,6 +146,9 @@ stdenv.mkDerivation { "DcgmModuleSysmon::ReadCoreSpeed" "DcgmModuleSysmon::ReadTemperature" "Sysmon: initialize module" + # Test assumes plugins are installed relative to the binary with a + # populated `cudaless/` directory + "GetPluginCudalessDir returns cudaless directory in plugin directory" ]; # Add our paths to the CMake flags so FindCuda.cmake can find them.