pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rpath error in cython libraries



On 7/28/23 12:44, tlaronde%polynum.com@localhost wrote:
On Fri, Jul 28, 2023 at 12:46:39PM -0400, Greg Troxel wrote:
Jason Bacon <jtocino%gmx.com@localhost> writes:

I'm not sure what "$ORIGIN" is here, but output from the FreeBSD port

ORIGIN is a scheme to do something complicated, which I think is to make
rpath relative to the directory from which the executable was loaded.
pkgsrc tends to avoid this, at least.

It is mentionned in ld.elf_so(1). The "$ORIGIN" is added as is, in its
place (relative on the other rpath directives in the linking command)
and at loading/execution time, dependencies not already loaded are
searched according to the directory where the executable is.

It is a can of worms since one can copy an executable in whatever
directory; and put in this directory some special libraries that will be
loaded instead of the system ones. Or simply it can happen that in this
dir are other versions of libraries matching the dependencies but not
expected to be used with.

You can prevent nasty things to be put in a specified tree (for pkgsrc
or the system). You can not prevent an executable from been copied
elsewhere.

And for debugging purposes, it would be a nightmare: what library had
been linked with, exactly, at runtime?

Reminiscent of perl FindBin which has caused me many a headache...



Home | Main Index | Thread Index | Old Index