[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52940: [PATCH] gremlin: Mimic ld.so NEEDED deduplication behavior.
From: |
Chris Marusich |
Subject: |
bug#52940: [PATCH] gremlin: Mimic ld.so NEEDED deduplication behavior. |
Date: |
Sat, 08 Jan 2022 18:04:11 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Hi Ludo,
Ludovic Courtès <ludo@gnu.org> writes:
> Good catch! We could go fancy and have ‘loop’ in
> ‘file-needed/recursive’ thread a map of device/inode number pairs to
> file names; when calling ‘search-path’, we’d check whether the file we
> found already is in the set, possibly under a different name, and we’d
> use that name instead of introducing a new one. That’d be more
> efficient that calling ‘canonicalize-path’, especially O(n³) times
> roughly.
>
> But… given that this is a corner case, that modifying (guix build
> gremlin) entails a full rebuild, and that there just should be that
> “/lib/../lib” entry in the first place, I’d lean towards leaving
> gremlin.scm unchanged.
>
> WDYT?
>
> However…
>
>> diff --git a/tests/gremlin.scm b/tests/gremlin.scm
>> index 9af899c89a..86757e62b4 100644
>> --- a/tests/gremlin.scm
>> +++ b/tests/gremlin.scm
>> @@ -1,5 +1,6 @@
>> ;;; GNU Guix --- Functional package management for GNU
>> ;;; Copyright © 2015, 2018, 2020 Ludovic Courtès <ludo@gnu.org>
>> +;;; Copyright © 2022 Chris Marusich <cmmarusich@gmail.com>
>> ;;;
>> ;;; This file is part of GNU Guix.
>> ;;;
>> @@ -92,7 +93,9 @@
>> (loop result))))))
>>
>> (define ground-truth
>> - (remove (cut string-prefix? "linux-vdso.so" <>)
>> + (remove (lambda (entry)
>> + (or (string-prefix? "linux-vdso.so" entry)
>> + (string-prefix? "linux-vdso64.so" entry)))
>> (read-ldd-output pipe)))
>>
>> (and (zero? (close-pipe pipe))
>
> … I think this part should definitely be committed (‘master’ is fine).
I agree that the existing behavior is probably fine. It makes me feel
better to know that you also think so.
With that in mind, I've committed a simpler fix in 6a2050b on master
that just changes the test. I've also updated the guix package two
times. Now, after running "guix pull", I can once again successfully
build the guix package on powerpc64le-linux. Hooray!
Thank you for the review! I'll now close this bug.
--
Chris
PGP: https://savannah.gnu.org/people/viewgpg.php?user_id=106836
signature.asc
Description: PGP signature