Unverified Commit fa094c6d authored by Lily Foster's avatar Lily Foster Committed by GitHub
Browse files

chromium: add rpath to libGLESv2.so from libANGLE (#269345)

Chromium libANGLE-based GL loading was working by accident before, because the cairo lib pulled in libEGL previously (so dlopen didn't need to search rpath when called in libGLESv2) but no longer does and the rpath needs to be added on both the chromium binary and the libGLESv2.so (and yes both even expect to have pciutils available it seems)

Fixes #268490 #269104
parent 87f2a03d
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -489,11 +489,11 @@ let
    '';

    postFixup = ''
      # Make sure that libGLESv2 and libvulkan are found by dlopen.
      # Make sure that libGLESv2 and libvulkan are found by dlopen in both chromium binary and ANGLE libGLESv2.so.
      # libpci (from pciutils) is needed by dlopen in angle/src/gpu_info_util/SystemInfo_libpci.cpp
      chromiumBinary="$libExecPath/$packageName"
      origRpath="$(patchelf --print-rpath "$chromiumBinary")"
      patchelf --set-rpath "${lib.makeLibraryPath [ libGL vulkan-loader pciutils ]}:$origRpath" "$chromiumBinary"
      for chromiumBinary in "$libExecPath/$packageName" "$libExecPath/libGLESv2.so"; do
        patchelf --set-rpath "${lib.makeLibraryPath [ libGL vulkan-loader pciutils ]}:$(patchelf --print-rpath "$chromiumBinary")" "$chromiumBinary"
      done
    '';

    passthru = {