diff --git a/pkgs/build-support/setup-hooks/auto-patchelf.sh b/pkgs/build-support/setup-hooks/auto-patchelf.sh index 3c0997a0dcd..511371931de 100644 --- a/pkgs/build-support/setup-hooks/auto-patchelf.sh +++ b/pkgs/build-support/setup-hooks/auto-patchelf.sh @@ -135,6 +135,8 @@ autoPatchelfFile() { # clear the RPATH first. runPatchelf --remove-rpath "$toPatch" + # If the file is not a dynamic executable, ldd/sed will fail, + # in which case we return, since there is nothing left to do. local missing missing="$( ldd "$toPatch" 2> /dev/null | \