Unverified Commit c51c95fa authored by Luna Nova's avatar Luna Nova
Browse files

rocmPackages.clr: add $out/lib to libamdhip64.so's rpath

Working around clr internally dlopening itself by bare name without a path, which will fail if it's not on the global library search path.

Likely will introduce an upstream PR that avoids this unnecessary look up current so by its bare name dance.
parent e337d4f3
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -207,6 +207,14 @@ 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
  # 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"
  '';

  disallowedRequisites = [
    gcc-unwrapped
  ];