tech-pkg archive

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

Re: $ORIGIN in RPATH suppression



>>  Jonathan Perkin <jperkin%pkgsrc.org@localhost> writes:
>>
>>  > I'd recommend just building bootstraps outside of a pkgsrc environment
>>  > if it's a problem for you that you can't resolve, or patch your
>>  > cwrappers locally to not remove them.
>>
>>  That's not really a solution, as anyone should be able to, using code in
>>  pkgsrc, build bootstraps.
>
> I don't think this was ever true for Rust, as it all starts
> with an amd64 compiler provided by upstream Rust from which all
> others are produced or, am I wrong?

You are right: we start the build using binaries provided by the
Rust project, who builds for NetBSD/amd64.  In principle we could
have built our own bootstrap for NetBSD/amd64, but at the moment
we don't.

>>  Overall though, it may be that fixing rust is the only path that works,
>>  and unfortunately that keeps getting harder.
>
> Although, I understand the problem, I don't think trying to
> "bend upstream" will work. If it was a tier one target, sure
> but, it's not. So, the original question remains.
>
> On the other hand, Rust is already versioned, so supported
> archs could in theory keep moving forward and older compiler
> versions kept for those platforms that cannot build a more
> recent compiler.
>
> I'm aware dropping support for troubled platforms is hardly a
> solution but, holding back supported ones is by no means any
> better.

There's been a suggestion for where in the code a modification
could be made, ref.

https://github.com/rust-lang/rust/issues/133629

specifically

https://github.com/rust-lang/rust/blob/13738b0abeeb6b7b8b52cc16aa8ece267b58f017/src/bootstrap/src/core/build_steps/compile.rs#L1990-L1994

Someone (me?) needs to come up with the rust code to do

  patchelf --rpath '$ORIGIN/../lib' <rustc-binary-file>

for the "stage1" rust compiler, and couching that with an
appropriate conditional.  I'll have to admit that I don't know
rust well enough to do that entirely on my own, so I have to go
rummaging in other parts of the code to look for something to
base this on.

Regards,

- Håvard


Home | Main Index | Thread Index | Old Index