On 6/13/22 09:13, David Haller wrote:
There's various ways, but 'patchelf --print-rpath' seems logical.
Can't believe I skipped over that and went to looking in readelf.... Checked -- there is no darktable rpath set
And I doubt very much that darktable has any rpath set, so you can just go ahead and use --set-rpath which does replace the rpath as you suspect.
In the general case, you could use:
OLD_RPATH=$(patchelf --print-rpath foo) patchelf --set-rpath "/opt/foo/lib${OLD_RPATH:+:${OLD_RPATH}}"
The weird ':+' only adds a : and the contents of OLD_RPATH if that is set and nothing if it's not set or empty.
Alternatively, you could contstruct the new rpath thus:
OLD_RPATH=$(patchelf --print-rpath foo) RPATH="/opt/foo/lib" [[ -n $OLD_RPATH ]] && RPATH+=":${RPATH}" patchelf --set-rpath "$RPATH"
So, there's ways around the "missing" --add-rpath;)
Went with # patchelf --add-rpath '$ORIGIN/../lib64/darktable' /usr/bin/darktable and removed the temporary symlink: /usr/lib64/libdarktable.so -> darktable/libdarktable.so darktable works like a charm (and I don't have to remember to unlink the temporary symlink when the updated version arrives :) Thanks dnh -- David C. Rankin, J.D.,P.E.