pkgsrc-Users archive

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

Re: lang/rust still looks in /usr/pkg/

> On Sat, Dec 12, 2020 at 02:56:27PM +0100, Havard Eidnes wrote:
>> > What's the proper fix for this?
>> Frankly, I don't quite know.
>> I do know that patchelf from pkgsrc can be used to change the
>> rpath in an elf executable, a'la
>> patchelf --force-rpath --set-rpath $RPATH $executable
>> However, that can at best be characterized as a workaround and
>> not a "proper fix".  I welcome suggestions for how this should be
>> done properly.
> What's wrong with using patchelf? The SmartOS bootstrap seems to do a
> similar thing with elfedit.

The normal pkgsrc build of the rust bootstrap kit embeds
/usr/pkg/lib as part of the runpath, so that the curl library is

The problem is that as a package builder, I can't know what other
people set their PREFIX to, and the package depends on a binary
bootstrap (the previous-version rust bootstrap kit).  So I can't
know a priori what to put in the runpath in the binary bootstrap.

One option is of course to tell people who set PREFIX to
something else than /usr/pkg that they need to patch the binary
bootstrap kit's executable with patchelf as per the above.  Not
the best solution, but a workaround.


- Håvard

Home | Main Index | Thread Index | Old Index