unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Chris Marusich <cmmarusich@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: 02/03: tests: gremlin: Skip file-needed/recursive if DT_NEEDED is empty.
Date: Wed, 24 Feb 2021 09:34:25 -0800	[thread overview]
Message-ID: <87r1l55pzy.fsf@gmail.com> (raw)
In-Reply-To: <87y2fd3gy5.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Wed, 24 Feb 2021 11:20:34 +0100")

[-- 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 --]

      reply	other threads:[~2021-02-24 17:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r1l55pzy.fsf@gmail.com \
    --to=cmmarusich@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).