Bug#889829: ghc: error while loading shared libraries: libHShaskeline-0.7.3.0-ghc8.0.2.so

James Clarke jrtc27 at debian.org
Mon Feb 12 17:52:54 UTC 2018


On 12 Feb 2018, at 15:18, John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de> wrote:
> On 02/12/2018 04:16 PM, Holger Levsen wrote:
>> Downgrading the bug to normal, though I guess you can also close it. The
>> openjdk packages have the same issue. (But maybe you want to keep it
>> open to implement a message to the user saying "arg, /proc not mounted,
>> but we need it, aborting" or some such.)
> The Rust compiler has the same issue. Without /proc, it won't be able
> to find it's shared libraries. I'm not 100% sure, but I guess it's
> an issue when using dlopen() to load the libraries afterwards, but I never
> bothered to look into the details.

Ok, found it: _dl_get_origin tries to readlink /proc/self/exe to find the value
of $ORIGIN, falling back on the (empty) LD_ORIGIN_PATH environment variable
when that fails; I assume it does this instead of using readlink on the value of
AT_EXECFN in auxv due to the possible race condition.

This isn't really a bug in ghc, as it's a system limitation, though I guess for
Debian we could avoid the use of $ORIGIN as we know where ghc will be
installed, though given ghc-stageX are executed during the build that might be
awkward without either re-linking or setting LD_LIBRARY_PATH (or equivalent).

James



More information about the Pkg-haskell-maintainers mailing list