From 235ea64d880ba27fd940d66ef6c7ef6641a35bd7 Mon Sep 17 00:00:00 2001 From: Luna Nova Date: Mon, 9 Mar 2026 17:13:35 -0700 Subject: [PATCH] rocmPackages.clr: apply own rpath workaround to all libs Same issue applies to libhiprtc.so, seems safer to apply to all since it's a recurring pattern in clr. --- pkgs/development/rocm-modules/clr/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/rocm-modules/clr/default.nix b/pkgs/development/rocm-modules/clr/default.nix index 71451c81e443..9e5b7abbf099 100644 --- a/pkgs/development/rocm-modules/clr/default.nix +++ b/pkgs/development/rocm-modules/clr/default.nix @@ -207,12 +207,13 @@ stdenv.mkDerivation (finalAttrs: { ln -s ${hipClang} $out/llvm ''; - # libamdhip64.so dlopens its own bare name for hipGetProcAddress symbol resolution. - # Add its own directory to its RPATH so it can find itself + # libamdhip64.so dlopens its own bare name for hipGetProcAddress symbol resolution, + # same pattern with libhiprtc.so, so add own lib directory to all .so's + # RPATHs so they can find themselves and neighbouring libs # Must be in postFixup so it runs after patchelf --shrink-rpath which removes # the apparently useless rpath postFixup = '' - patchelf --add-rpath "$out/lib" "$out/lib/libamdhip64.so" + patchelf --add-rpath "$out/lib" "$out"/lib/*.so ''; disallowedRequisites = [