GNU bug report logs - #43081
diffutils always referrers to the native coreutils

Previous Next

Package: guix;

Reported by: Mathieu Othacehe <othacehe <at> gnu.org>

Date: Fri, 28 Aug 2020 07:37:02 UTC

Severity: normal

To reply to this bug, email your comments to 43081 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#43081; Package guix. (Fri, 28 Aug 2020 07:37:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mathieu Othacehe <othacehe <at> gnu.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Fri, 28 Aug 2020 07:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: bug-guix <at> gnu.org
Subject: diffutils always referrers to the native coreutils
Date: Fri, 28 Aug 2020 09:36:16 +0200
[Message part 1 (text/plain, inline)]
Hello,

The "diff" executable from diffutils stores a reference to the native,
canonical "pr" from coreutils. This is bad for two reasons:

* It makes the Guix System closure bigger by dragging the canonical
  coreutils.

* The cross-compiled diffutils drags the native coreutils to its
  closure, see:

--8<---------------cut here---------------start------------->8---
mathieu <at> cervin:~$ guix size /gnu/store/5bj91pfnm3z6qbpbl0hp07w12arzk93k-diffutils-3.7
store item                                                       total    self
/gnu/store/j48jp74s1j2mrh7nckg9asdyjv1hvi21-glibc-cross-aarch64-linux-gnu-2.31   158.9    71.4  34.8%
/gnu/store/fa6wj5bxkj5ll1d7292a70knmyl7a0cr-glibc-2.31              38.4 36.7  17.9%
/gnu/store/01b4w3m6mp55y531kyi1g8shh722kwqm-gcc-7.5.0-lib           71.0    32.6  15.9%
/gnu/store/xw23yv6fv0cb6n0sbc552l1mkc15yq3n-gcc-cross-aarch64-linux-gnu-7.5.0-lib   186.8    27.9  13.6%
/gnu/store/57xj5gcy1jbl9ai2lnrqnpr0dald9i65-coreutils-8.32          88.0    17.0   8.3%
/gnu/store/sl883skd8gbzcj4fl44w7dv1a5yaa3k4-gcc-cross-sans-libc-aarch64-linux-gnu-7.5.0-lib    80.8     9.8   4.8%
/gnu/store/66m8j38495zdcy2iv55m5d1hj3pxayff-linux-libre-headers-cross-aarch64-linux-gnu-5.4.20     5.1     5.1   2.5%
/gnu/store/bcjcd97xvh0qkvq1maqj6qab88xb30dv-bash-static-5.0.16       1.6     1.6   0.8%
/gnu/store/mmhimfwmmidf09jw1plw3aw1g1zn2nkh-bash-static-5.0.16       1.6     1.6   0.8%
--8<---------------cut here---------------end--------------->8---

The native version of glibc, gcc-lib, coreutils and bash-static are part
of the closure of the cross-compiled coreutils.

I hoped to fix it with the naive patch attached, but it fails for
obscure reasons while building acl:

--8<---------------cut here---------------start------------->8---
FAIL: test/malformed-restore
============================

[4] $ cp "/tmp/guix-build-acl-2.2.53.drv-0/acl-2.2.53/test/malformed-restore-double-owner.acl" tmp.acl -- ok
[5] $ sed -i "s/USER/30001/g" tmp.acl -- failed
ERROR: ld.so: object '/tmp/guix-build-acl-2.2.53.drv-0/acl-2.2.53/.libs/libtestlookup.so' from LD_PRELOAD cannot be preloaded: ignored. != ~
[6] $ sed -i "s/GROUP/30000/g" tmp.acl -- failed
ERROR: ld.so: object '/tmp/guix-build-acl-2.2.53.drv-0/acl-2.2.53/.libs/libtestlookup.so' from LD_PRELOAD cannot be preloaded: ignored. != ~
--8<---------------cut here---------------end--------------->8---

Any idea, what's going on?

Thanks,

Mathieu
[0001-gnu-diffutils-Do-not-refer-to-canonical-coreutils.patch (text/x-diff, inline)]
From 59ff84c360e25ac754cc17f285d9bbf077a5e6c3 Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <othacehe <at> gnu.org>
Date: Fri, 28 Aug 2020 09:32:17 +0200
Subject: [PATCH] gnu: diffutils: Do not refer to canonical coreutils.

* gnu/packages/base.scm (diffutils)[inputs]: Add "coreutils",
[arguments]: and use it by passing PR_PROGRAM.
---
 gnu/packages/base.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index f22e4ab9cc..99f8aefb67 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -269,7 +269,13 @@ differences.")
              (base32
               "09isrg0isjinv8c535nxsi1s86wfdfzml80dbw41dj9x3hiad9xk"))))
    (build-system gnu-build-system)
+   (arguments
+    '(#:configure-flags
+      (list (string-append "PR_PROGRAM="
+                           (assoc-ref %build-inputs "coreutils*")
+                           "/bin/pr"))))
    (native-inputs `(("perl" ,perl)))
+   (inputs `(("coreutils*" ,coreutils)))
    (synopsis "Comparing and merging files")
    (description
     "GNU Diffutils is a package containing tools for finding the
-- 
2.24.0


Information forwarded to bug-guix <at> gnu.org:
bug#43081; Package guix. (Fri, 28 Aug 2020 14:28:02 GMT) Full text and rfc822 format available.

Message #8 received at 43081 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 43081 <at> debbugs.gnu.org
Subject: Re: bug#43081: diffutils always referrers to the native coreutils
Date: Fri, 28 Aug 2020 16:27:11 +0200
Hi!

Mathieu Othacehe <othacehe <at> gnu.org> skribis:

> The "diff" executable from diffutils stores a reference to the native,
> canonical "pr" from coreutils. This is bad for two reasons:
>
> * It makes the Guix System closure bigger by dragging the canonical
>   coreutils.
>
> * The cross-compiled diffutils drags the native coreutils to its
>   closure, see:

[...]

> I hoped to fix it with the naive patch attached, but it fails for
> obscure reasons while building acl:
>
> FAIL: test/malformed-restore
> ============================
>
> [4] $ cp "/tmp/guix-build-acl-2.2.53.drv-0/acl-2.2.53/test/malformed-restore-double-owner.acl" tmp.acl -- ok
> [5] $ sed -i "s/USER/30001/g" tmp.acl -- failed
> ERROR: ld.so: object '/tmp/guix-build-acl-2.2.53.drv-0/acl-2.2.53/.libs/libtestlookup.so' from LD_PRELOAD cannot be preloaded: ignored. != ~
> [6] $ sed -i "s/GROUP/30000/g" tmp.acl -- failed
> ERROR: ld.so: object '/tmp/guix-build-acl-2.2.53.drv-0/acl-2.2.53/.libs/libtestlookup.so' from LD_PRELOAD cannot be preloaded: ignored. != ~

Could it be that there are two different libcs involved?

Do you know which acl is fixing (commencement.scm vs. acl.scm)?

Thanks,
Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#43081; Package guix. (Fri, 28 Aug 2020 14:52:02 GMT) Full text and rfc822 format available.

Message #11 received at 43081 <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 43081 <at> debbugs.gnu.org, janneke <at> gnu.org
Subject: Re: bug#43081: diffutils always referrers to the native coreutils
Date: Fri, 28 Aug 2020 16:51:50 +0200
[Message part 1 (text/plain, inline)]
Hey Ludo!

> Could it be that there are two different libcs involved?

I can only spot one in environment-variables file.

> Do you know which acl is fixing (commencement.scm vs. acl.scm)?

Yes it's the acl that is rooted in the bootstrap toolchain. Here's the
full build log attached. I'm also cc-ing janneke which has some
experience in that matter :).

Thanks for having a look,

Mathieu
[log (application/octet-stream, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#43081; Package guix. (Mon, 31 Aug 2020 12:02:01 GMT) Full text and rfc822 format available.

Message #14 received at 43081 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: 43081 <at> debbugs.gnu.org, janneke <at> gnu.org
Subject: Re: bug#43081: diffutils always referrers to the native coreutils
Date: Mon, 31 Aug 2020 14:00:43 +0200
Hi,

Mathieu Othacehe <othacehe <at> gnu.org> skribis:

>> Do you know which acl is fixing (commencement.scm vs. acl.scm)?
>
> Yes it's the acl that is rooted in the bootstrap toolchain. Here's the
> full build log attached. I'm also cc-ing janneke which has some
> experience in that matter :).

Yes, now that you mention it, I remember janneke and I looking at a
similar LD_PRELOAD issue in Marrakesh last December.  :-)

> [24] $ setfacl -m u:bin:rx /test -- failed
> ERROR: ld.so: object '/tmp/guix-build-acl-2.2.53.drv-0/acl-2.2.53/.libs/libtestlookup.so' from LD_PRELOAD cannot be preloaded: ignored. != ~

Does that ring a bell, janneke?

Ludo’.




Information forwarded to bug-guix <at> gnu.org:
bug#43081; Package guix. (Mon, 31 Aug 2020 12:39:01 GMT) Full text and rfc822 format available.

Message #17 received at 43081 <at> debbugs.gnu.org (full text, mbox):

From: Jan Nieuwenhuizen <janneke <at> gnu.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Mathieu Othacehe <othacehe <at> gnu.org>, 43081 <at> debbugs.gnu.org
Subject: Re: bug#43081: diffutils always referrers to the native coreutils
Date: Mon, 31 Aug 2020 14:38:09 +0200
Ludovic Courtès writes:

> Hi,
>
> Mathieu Othacehe <othacehe <at> gnu.org> skribis:
>
>>> Do you know which acl is fixing (commencement.scm vs. acl.scm)?
>>
>> Yes it's the acl that is rooted in the bootstrap toolchain. Here's the
>> full build log attached. I'm also cc-ing janneke which has some
>> experience in that matter :).
>
> Yes, now that you mention it, I remember janneke and I looking at a
> similar LD_PRELOAD issue in Marrakesh last December.  :-)
>
>> [24] $ setfacl -m u:bin:rx /test -- failed
>> ERROR: ld.so: object '/tmp/guix-build-acl-2.2.53.drv-0/acl-2.2.53/.libs/libtestlookup.so' from LD_PRELOAD cannot be preloaded: ignored. != ~
>
> Does that ring a bell, janneke?

Oh my...I do remember we looked into this or something very similar.

Is it doable to run the test suite using the canonical PR again( maybe
setenv "PR_PROGRAM" just before the test phase or some substituting)?

Janneke

-- 
Jan Nieuwenhuizen <janneke <at> gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com




This bug report was last modified 4 years and 88 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.