Have you tried sudo?
Instead of $ ORIGIN, use fixed paths during development, because they will work in setuid programs. Do not change your main build process, just use patchelf to set rpath to what you need. You can make a shell script that does something like:
ln=`readelf -d |grep RPATH` IFS=: set -- $ln newrpath=`echo $2 |sed 's/\$ORIGIN/\/devel\/myprog\/lib/'` patchelf --set-rpath newrpath myprogram
Then your binary will no longer search for $ ORIGIN /../ lib, but / devel / myprog / lib /../ lib
Michael dillon
source share