unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: 02/03: tests: gremlin: Skip file-needed/recursive if DT_NEEDED is empty.
       [not found] ` <20210224094221.846A320536@vcs0.savannah.gnu.org>
@ 2021-02-24 10:20   ` Ludovic Courtès
  2021-02-24 17:34     ` Chris Marusich
  0 siblings, 1 reply; 2+ messages in thread
From: Ludovic Courtès @ 2021-02-24 10:20 UTC (permalink / raw)
  To: guix-devel, Chris Marusich

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 …)’.

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

Ludo’.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 02/03: tests: gremlin: Skip file-needed/recursive if DT_NEEDED is empty.
  2021-02-24 10:20   ` 02/03: tests: gremlin: Skip file-needed/recursive if DT_NEEDED is empty Ludovic Courtès
@ 2021-02-24 17:34     ` Chris Marusich
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Marusich @ 2021-02-24 17:34 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1790 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-02-24 17:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210224094215.22478.70281@vcs0.savannah.gnu.org>
     [not found] ` <20210224094221.846A320536@vcs0.savannah.gnu.org>
2021-02-24 10:20   ` 02/03: tests: gremlin: Skip file-needed/recursive if DT_NEEDED is empty Ludovic Courtès
2021-02-24 17:34     ` Chris Marusich

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).