guix-devel
[Top][All Lists]
Advanced

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

Re: 02/03: tests: gremlin: Skip file-needed/recursive if DT_NEEDED is em


From: Chris Marusich
Subject: Re: 02/03: tests: gremlin: Skip file-needed/recursive if DT_NEEDED is empty.
Date: Wed, 24 Feb 2021 09:34:25 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi Ludo,

Ludovic Courtès <ludo@gnu.org> writes:

> guix-commits@gnu.org skribis:
>
>> +++ b/tests/gremlin.scm
>> @@ -61,7 +61,12 @@
>>                       (elf-dynamic-info-needed dyninfo))))))
>>  
>>  (unless (and %guile-executable (not (getenv "LD_LIBRARY_PATH"))
>> -             (file-needed %guile-executable))     ;statically linked?
>> +             (file-needed %guile-executable) ;statically linked?
>> +             ;; When Guix has been built on a foreign distro, using a
>> +             ;; toolchain and libraries from that foreign distro, it is not
>> +             ;; unusual for the runpath to be empty.
>> +             (and=> (file-runpath %guile-executable)
>> +                    (compose not null-list?)))
>
> Nitpick: you can write ‘pair?’ instead of ‘(compose …)’.

Thank you for the suggestion!  I've done this in commit
b22dcb24207022d9a716893836578e96f4b580a1.

> I guess the problem is that ‘file-needed/recursive’ only looks at
> RUNPATH, ignoring the notion of “standard directories” like /usr/lib.

Yes, that's exactly my thought as well.  Is it intended that
"gremlin.scm" should be able to search those places?

My understanding is that the answer is no, we don't expect it to be able
to search those places, since in theory (despite the Filesystem
Hierarchy Standard) the directories to search could be anywhere,
depending on how libraries are managed by the foreign distro, and this
code is intended primarily to be used on the build side, where we
wouldn't encounter such cases anyway.

My understanding is that skipping this test is the right solution,
rather than attempting to teach gremlin to always be able to find
libraries when the runpath is empty.  What do you think?

-- 
Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

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