tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Wrappers don't transform @file syntax
On 2020-01-15 23:42, Joerg Sonnenberger wrote:
>> As a side note, I already tried patching GHC not to use it but it didn't
>> work because GHC itself needed to have several rpaths relative to
>> $ORIGIN. Those rpaths are removed during the "cleanup" phase of
>> cwrappers, regardless of whether R:$ORIGIN:$ORIGIN exists, so I decided
>> to just let it use @file :D
>>
>> Thanks for your input anyway.
>
> Please do not use $ORIGIN. It's a constant source of issues.
I know, but it's really hard to patch GHC to stop using it for several
reasons:
1. The build system of GHC links objects in a relocatable way so that
they can distribute binaries without any specific prefixes being
embedded. There is no easy way to convince it not to do that.
2. GHC does multi-stage bootstrapping, i.e. it first compiles itself
with an externally supplied GHC, then uses it to compile the final stage
of GHC. This means we can't just substitute $ORIGIN with the final
prefix relative to ${LOCALBASE}.
3. It's also impractical to modify DT_RPATH on the post-build stage like
what lang/rust does, because shared libraries that GHC depends on are
not installed in a single directory. Each of Haskell packages have its
own directory under /usr/pkg/lib/ghc-${PKGVERSION}, and every executable
and shared library have rpaths pointing at each of them. We just can't
recover those dependencies after rpaths being removed by cwrappers.
Home |
Main Index |
Thread Index |
Old Index