From 083d516ae413527dfe385c0b21d51a52a6ad78f0 Mon Sep 17 00:00:00 2001 From: ghpzin Date: Sat, 25 Oct 2025 20:57:05 +0300 Subject: [PATCH] rocmPackages.rocm-runtime: fix build with gcc15 - add patch from upstream commit: https://github.com/ROCm/ROCR-Runtime/commit/5cc61b714d5b59ed5405639a37a582d839e6ebe9 Fixes build failure with gcc15: ``` In file included from /build/source/runtime/hsa-runtime/libamdhsacode/amd_elf_image.cpp:43: /build/source/runtime/hsa-runtime/core/inc/amd_elf_image.hpp:62:15: error: 'uint64_t' does not name a type 62 | virtual uint64_t type() const = 0; | ^~~~~~~~ /build/source/runtime/hsa-runtime/core/inc/amd_elf_image.hpp:50:1: note: 'uint64_t' is defined in header ''; this is probably fixable by adding '#include 49 | #include +++ |+#include 50 | ``` --- pkgs/development/rocm-modules/6/rocm-runtime/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/rocm-modules/6/rocm-runtime/default.nix b/pkgs/development/rocm-modules/6/rocm-runtime/default.nix index 56d4fb253490..cdd7037c83c3 100644 --- a/pkgs/development/rocm-modules/6/rocm-runtime/default.nix +++ b/pkgs/development/rocm-modules/6/rocm-runtime/default.nix @@ -79,6 +79,12 @@ stdenv.mkDerivation (finalAttrs: { url = "https://github.com/ROCm/ROCR-Runtime/commit/41bfc66aef437a5b349f71105fa4b907cc7e17d5.patch"; hash = "sha256-A7VhPR3eSsmjq2cTBSjBIz9i//WiNjoXm0EsRKtF+ns="; }) + # Fix build with gcc15 + (fetchpatch { + # [PATCH] rocr:Add missing cstdint include + url = "https://github.com/ROCm/ROCR-Runtime/commit/5cc61b714d5b59ed5405639a37a582d839e6ebe9.patch"; + hash = "sha256-IPxDShpoFB0PjCG+zwFbnW9IBTCG3G2o9sfITGs+bN4="; + }) # This causes a circular dependency, aqlprofile relies on hsa-runtime64 # which is part of rocm-runtime # Worked around by having rocprofiler load aqlprofile directly