guix-devel
[Top][All Lists]
Advanced

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

Re: gold linker and collect2: fatal error: cannot find 'ld'


From: Ludovic Courtès
Subject: Re: gold linker and collect2: fatal error: cannot find 'ld'
Date: Wed, 27 Mar 2019 18:15:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Pjotr,

Pjotr Prins <address@hidden> skribis:

> On Sun, Mar 17, 2019 at 05:06:16PM +0100, Pjotr Prins wrote:
>> Unfortunately the runtime of compiled software fails because the rpath is
>> not updated either. So that requires adding in the RPATH explicitly on
>> the ldc command line. When I set the RPATH the runtime is fine. 
>
> Reading up on the ld-wrapper code - that is exactly what happens. A
> gold-wrapper can do same.
>
> I think, like with rustc, I need to wrap the ldc compiler build with
> ld-wrapper and the ldc tests with gold-wrapper (yet to be written).

Indeed.  We’d just need to add a parameter to ‘make-ld-wrapper’ so we
can specify the executable name, which would be “gold” instead of “ld”
in this case.

Would you like to give it a try?

> gold does not honour LIBRARY_PATH so that means we'll have to use
> LD_LIBRARY_PATH or pass the lib path(s) on the command line. 

LIBRARY_PATH is honored by gcc, which “converts” it into a list of -L
flags for the linker, so no worries here.

HTH, and sorry for the delay!

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]