Unverified Commit 046c6942 authored by Michael Daniels's avatar Michael Daniels Committed by GitHub
Browse files

dcgm: fix build with gcc15 (#484663)

parents 1fe432be 76ccfa0a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -24476,6 +24476,12 @@
    github = "Sinjin2300";
    githubId = 35543336;
  };
  sinrohit-desco = {
    email = "rohit1.singh@deshaw.com";
    github = "sinrohit-desco";
    githubId = 207977821;
    name = "Rohit Singh";
  };
  sioodmy = {
    name = "Antoni Sokołowski";
    github = "sioodmy";
+49 −0
Original line number Diff line number Diff line
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 <algorithm>
 
 #include <fmt/format.h>
 #include <stdexcept>
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 <algorithm>
 
 #include <cstring>
 #include <set>
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 <typename Y>
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 <optional>
 
 #include <exception>
 #include <map>
+5 −0
Original line number Diff line number Diff line
@@ -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.
@@ -173,6 +177,7 @@ stdenv.mkDerivation {
    maintainers = with lib.maintainers; [
      de11n
      despsyched
      sinrohit-desco
    ];
    mainProgram = "dcgmi";
    platforms = lib.platforms.linux;