diff --git a/tools/linux_packaging/build b/tools/linux_packaging/build index 564dd6a8f0..b7a1f6c6a6 100755 --- a/tools/linux_packaging/build +++ b/tools/linux_packaging/build @@ -445,6 +445,11 @@ while [ true ] ; do echo "Copying dependant lib $dep (required by ${parent})" cp $dep $Libraries fi + # + # reset RPATH so that the runtime linker never looks + # in places we don't want it to + # + patchelf --set-rpath $Libraries $Libraries/`basename $dep` if echo $dep | grep -sq '^/' ; then # absolute path, candidate for stripping deplibs="$deplibs $base"