GNU bug report logs - #75157
Grafting inconsistency with multiple outputs is causing problems

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Severity: important; Reported by: Dariqq <dariqq@HIDDEN>; merged with #48907; dated Sat, 28 Dec 2024 08:54:01 UTC; Maintainer for guix is bug-guix@HIDDEN.
Merged 48907 75157. Request was from "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Severity set to 'important' from 'normal' Request was from "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 75157 <at> debbugs.gnu.org:


Received: (at 75157) by debbugs.gnu.org; 2 Jan 2025 15:20:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jan 02 10:20:22 2025
Received: from localhost ([127.0.0.1]:46117 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tTMzl-0006Xp-Cz
	for submit <at> debbugs.gnu.org; Thu, 02 Jan 2025 10:20:22 -0500
Received: from relay.yourmailgateway.de ([185.244.194.184]:52749)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <pelzflorian@HIDDEN>)
 id 1tTMzh-0006Xa-TA
 for 75157 <at> debbugs.gnu.org; Thu, 02 Jan 2025 10:20:19 -0500
Received: from relay01-mors.netcup.net (localhost [127.0.0.1])
 by relay01-mors.netcup.net (Postfix) with ESMTPS id 4YP9PW5b12z90mg;
 Thu,  2 Jan 2025 16:20:15 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de;
 s=key2; t=1735831215;
 bh=u5b9sPSUZpu8VsFebnxcd5xcTk1kPHntCy+5Vs7yn0Q=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=V4wfedoLaDSP5alwzrZrzx73bnYkm/j9ORaBQbiU6UjkZMJIjaiK5008HWorgv+Fn
 r7typ7LUrm7CDlMMC4NlAoDpBtOeF88Yt0mAi1EkJL6coun3c0gXfwWttDs6Awizwn
 T/6jw6UjR1j73CCAaVmYC7+CMnPuP/8CFwIKDEaBn9UL50aECp4tq35eSnBZ1tAgOG
 vyAApnU49ciKS8H2FhrSuGAbWFbSpBo1Jotw1i256neEv5HR9GiD0yDbMCM/jqTa2M
 SPaLbTkDssBEnoAyEfDO3yhcIMJzXAXZ1OGQ4lgZ2ok7LkaVZqhMqTI27Z7KqpizeS
 oujXkq1mmYg3g==
Received: from policy01-mors.netcup.net (unknown [46.38.225.35])
 by relay01-mors.netcup.net (Postfix) with ESMTPS id 4YP9PW4wDDz7wZR;
 Thu,  2 Jan 2025 16:20:15 +0100 (CET)
X-Virus-Scanned: Debian amavisd-new at policy01-mors.netcup.net
X-Spam-Flag: NO
X-Spam-Score: -2.897
X-Spam-Level: 
X-Spam-Status: No, score=-2.897 required=6.31 tests=[ALL_TRUSTED=-1,
 BAYES_00=-1.9, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001,
 URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Received: from mxe217.netcup.net (unknown [10.243.12.53])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by policy01-mors.netcup.net (Postfix) with ESMTPS id 4YP9PV2Bklz8tXn;
 Thu,  2 Jan 2025 16:20:13 +0100 (CET)
Received: from florianhp (ipb21a5dbf.dynamic.kabel-deutschland.de
 [178.26.93.191])
 by mxe217.netcup.net (Postfix) with ESMTPSA id B64B783F45;
 Thu,  2 Jan 2025 16:20:06 +0100 (CET)
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: Dariqq <dariqq@HIDDEN>
Subject: Re: bug#75157: Grafting inconsistency with multiple outputs is
 causing problems
In-Reply-To: <bf6c3172-132b-4290-b023-38a68652411c@HIDDEN>
 (dariqq@HIDDEN's message of "Sun, 29 Dec 2024 09:30:54 +0000")
References: <fc701a2e-4317-459e-9685-56a14f5d2e21@HIDDEN>
 <87o70vxrna.fsf@HIDDEN>
 <bf6c3172-132b-4290-b023-38a68652411c@HIDDEN>
Date: Thu, 02 Jan 2025 16:20:51 +0100
Message-ID: <87pll58coc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Rspamd-Queue-Id: B64B783F45
X-Rspamd-Server: rspamd-worker-8404
X-NC-CID: dSNTTvyAbpnk0Mk5MKH1s4RlBYK1qg8r5xFQC7QtMYbeoI6Q0TM5spFv
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75157
Cc: 75157 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi Dariqq.  Your glib and json bug is indeed different.

Your initial suggestion for a proper fix to the different but similar
troubles we both have:

> I think it would be good if grafts are only applied per output (which=20
> might also help resolve #69653).

is the same proposal as in bug#48907.

At https://bugs.gnu.org/48907 Richard Sent wrote:
> One idea I had was to somehow graft each output as a unique derivation
> via repeated calls to graft-derivation. From what I've seen so far
> though that looks much easier said than done. It hasn't progressed
> beyond the "huh, I wonder" phase.

Therefore I will merge the two bugs.

Not entirely sure if this proper fix would currently need changes to the
C++ guix-daemon code.  Anyway, I will not implement it.

Currently we both have workarounds, obviously disabling security updates
with --no-grafts is possible, but also you wrote you can set the
pkgconfig path.  For GTK programs, a workaround is instead of putting

(list gdk-pixbuf
      graphene gtk harfbuzz
      pango)

in your Guix shell manifest or a scheme-file, I could instead rebuild
without grafts, like in Guix=E2=80=99 ungraft manifest.

That is, my previous home configuration for commit
08e0144d2338c8fb51e52e74274554583d0faa69 was:


--=-=-=
Content-Type: text/plain
Content-Disposition: inline; filename=old-launcher.scm

(service home-sway-service-type
         (sway-configuration
          (startup-programs
           `(,(with-extensions
               (list
                ((options->transformation
                  '((with-commit . "guile-g-golf=v0.8.0-rc9")))
                 guile-g-golf))
               #~(string-append
                  "guile "
                  #$(scheme-file "launcher.scm"
                     #~(begin
                         (eval-when (expand load eval)
                           (use-modules (oop goops))
                           (default-duplicate-binding-handler
                             '(merge-generics replace
                               warn-override-core warn last))
                           (setenv "GI_TYPELIB_PATH"
                                   #$(file-append
                                      (directory-union
                                       "typelibs"
                                       (list gdk-pixbuf
                                             graphene gtk harfbuzz
                                             pango))
                                      "/lib/girepository-1.0"))
                           (use-modules (g-golf))
                           (g-irepository-require
                            "Gtk" #:version "4.0")
                           (for-each (lambda (name)
                                       (gi-import-by-name "Gtk" name))
                                     '("Application"
                                       "ApplicationWindow"
                                       "Builder")))
                         (use-modules (sxml simple))
                         (define ui
                           '(interface
                             (requires (@ (version 4.0) (lib gtk)))

--=-=-=
Content-Type: text/plain


Since then, I have now had to change it to:


--=-=-=
Content-Type: text/plain
Content-Disposition: inline; filename=workaround.scm

(service home-sway-service-type
         (sway-configuration
          (startup-programs
           `(,(with-extensions
               (list
                ((options->transformation
                  '((with-commit . "guile-g-golf=v0.8.0-rc9")))
                 guile-g-golf))
               #~(string-append
                  "guile "
                  #$(scheme-file "launcher.scm"
                     #~(begin
                         (eval-when (expand load eval)
                           (use-modules (oop goops))
                           (default-duplicate-binding-handler
                             '(merge-generics replace
                               warn-override-core warn last))
                           (setenv "GI_TYPELIB_PATH"
                                   #$(file-append
                                      (directory-union
                                       "typelibs"
                                       (let ((ungraft
                                              (package-mapping
                                               (lambda (p)
                                                 (cond
                                                  ;; Ungrafted fails to validate runpath.
                                                  ((string=? (package-name p)
                                                             "gst-plugins-bad")
                                                   (specification->package
                                                    "gst-plugins-bad-minimal"))
                                                  (else
                                                   (let ((old
                                                          (or (package-replacement p) p)))
                                                     (package
                                                      (inherit old)
                                                      (arguments
                                                       (substitute-keyword-arguments
                                                        (package-arguments old)
                                                        ((#:disallowed-references _)  (list))
                                                        ((#:allowed-references _) #f))))))))
                                               #:deep? #t)))
                                         (map ungraft (list gdk-pixbuf
                                                            graphene gtk harfbuzz
                                                            pango))))
                                      "/lib/girepository-1.0"))
                           (use-modules (g-golf))
                           (g-irepository-require
                            "Gtk" #:version "4.0")
                           (for-each (lambda (name)
                                       (gi-import-by-name "Gtk" name))
                                     '("Application"
                                       "ApplicationWindow"
                                       "Builder")))
                         (use-modules (sxml simple))
                         (define ui

--=-=-=
Content-Type: text/plain


Unlike --no-grafts,
this has security updates appropriate for use in production
environments, but rebuilds part of the world, most importantly Rust.
Building bootstrap rust-1.54 fails on my laptop, unless I specify the
common build option --cores=1 in guix build.

I dedicate the above snippet to the public domain as per CC0.
https://creativecommons.org/publicdomain/zero/1.0/legalcode
If someone wishes to use similar code.

Regards,
Florian

--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#75157; Package guix. Full text available.

Message received at 75157 <at> debbugs.gnu.org:


Received: (at 75157) by debbugs.gnu.org; 29 Dec 2024 09:31:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Dec 29 04:31:16 2024
Received: from localhost ([127.0.0.1]:53756 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tRpdj-0005GM-Iq
	for submit <at> debbugs.gnu.org; Sun, 29 Dec 2024 04:31:16 -0500
Received: from mout01.posteo.de ([185.67.36.65]:51659)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dariqq@HIDDEN>) id 1tRpdh-0005G6-4u
 for 75157 <at> debbugs.gnu.org; Sun, 29 Dec 2024 04:31:15 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id 275BE240027
 for <75157 <at> debbugs.gnu.org>; Sun, 29 Dec 2024 10:31:04 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1735464664; bh=CH2gJ5KuvBzyyXAOAFalM9FEaR82p5rIKosmqT4w/Zw=;
 h=Message-ID:Date:MIME-Version:Subject:To:Cc:From:Content-Type:
 Content-Transfer-Encoding:From;
 b=Q3631Iose4ks+YlfPHh+kyFC4DmgWkYX6puYTN3/XMnc0oANo/vOAGaC5LOkNbbug
 Pw/SfyxghdmfRoqBlk1ilAwPz6CnchgGwGzR+T4hXeGWBv7POpN1/NMObHedjg/Tq3
 jIA5u+rWjqRHJxrjjngT9OYl90C7Ehrfn34mrEVxgl5JxVjQOsXiEp4mNbcuJG1/mB
 b8YYx7dWuLOFf6/7sB4KXYBuJ8HDd3XPJdSrmHZ+R//NbDOBHJpJLPG1kgwDrZWyq0
 RjRO6dGfXixB8I+lOmvWZGv7VQ5YHf5n4ErUCKLH8Xn2DznL/qwiWoU6/0DqAkNQqp
 Njsc7E6I90T0Q==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YLYrP6JKPz9rxG;
 Sun, 29 Dec 2024 10:31:01 +0100 (CET)
Message-ID: <bf6c3172-132b-4290-b023-38a68652411c@HIDDEN>
Date: Sun, 29 Dec 2024 09:30:54 +0000
MIME-Version: 1.0
Subject: Re: bug#75157: Grafting inconsistency with multiple outputs is
 causing problems
To: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
References: <fc701a2e-4317-459e-9685-56a14f5d2e21@HIDDEN>
 <87o70vxrna.fsf@HIDDEN>
Content-Language: en-US
From: Dariqq <dariqq@HIDDEN>
In-Reply-To: <87o70vxrna.fsf@HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 75157
Cc: 75157 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hello FLorian,


I think you are experiencing a different (related) issue because the 
problem I seems to vanish by linking to the glib that is used by g-golf 
instead (the --no-grafts options ensures that only one glib is in my 
guix shell)

On 29.12.24 01:24, pelzflorian (Florian Pelz) wrote:
> 
> 
> Both my GLibs have one output only.  I still believe above guix commit
> is the first bad commit for you, as well, and
> 
> guix time-machine -q --commit=78c4d00ab02ab41a22058cdbec0329752e47580f
> 
> will show the error and parent commit
> 
> guix time-machine -q --commit=08e0144d2338c8fb51e52e74274554583d0faa69
> 
> will be fine.  Is it?
> 



The problem i am seeing is still available in 
08e0144d2338c8fb51e52e74274554583d0faa69.


Here is what I've been playing around with:
a simple c file that just loads a scm file.
a simple scm file that just tries to instantiate a gobject class (in 
this example from json-glib but that is irrelevant, using something 
small and simple)

--8<---------------cut here---------------start------------->8---
main.c:
#include <libguile.h>

int
main (int argc, char **argv)
{
     scm_init_guile();
     scm_c_primitive_load("foo.scm");
}

foo.scm:
(use-modules (g-golf))

(gi-import "Json")

(describe (make <json-parser>
	    #:immutable #t))


Build with
gcc -o main main.c \
     `pkg-config --cflags --libs guile-3.0` \
     `pkg-config --cflags --libs gobject-2.0`

Running this with grafts:
  ./main

(process:3071): GLib-GObject-CRITICAL **: 08:50:36.946: 
g_object_new_is_valid_property: object class 'JsonParser' has no 
property named 'immutable'
#<<json-parser> 7f186b2f56d0> is an instance of class <json-parser>
Slots are:
      g-inst = #<pointer 0x1445e900>

(process:3071): GLib-GObject-CRITICAL **: 08:50:36.947: 
g_object_get_is_valid_property: object class 'JsonParser' has no 
property named 'immutable'

(process:3071): GLib-GObject-CRITICAL **: 08:50:36.947: 
g_object_get_is_valid_property: object class 'JsonParser' has no 
property named 'immutable'
      immutable = #f

When not linking to gobject , using no-grafts or running directly from 
guile repl things work as I would expect:
./main
#<<json-parser> 7ff2471f1d20> is an instance of class <json-parser>
Slots are:
      g-inst = #<pointer 0x2bbbe920>
      immutable = #t
--8<---------------cut here---------------end--------------->8---

On 08e0144d2338c8fb51e52e74274554583d0faa69 a similar problem exists:
g-golf depends on the ungrafted out output of hidden glib
but full glib is getting grafted (because of other other outputs)



If I prepend the glib with the single output graft to pkgconfig path and 
rebuild (s.t. my c prgram is linked to the same glib that is used by 
g-golf) things start magically working again.


> I believe what we describe here is yet another symptom of old bug
> <https://issues.guix.gnu.org/48907>, but if we have a first bad commit,
> and if it is the first bad commit for you, too,
> it might help solve it.  Or perhaps this bug can be solved separately if
> really the loading through typelib vs. not through typelib is the cause.
> 

There might be an even bigger issue here?


However regardless of it causing issues I think having 2 different 
grafted glibs (or rather anything) is not really great.

> Regards,
> Florian

Have nice day,
Dariqq




Information forwarded to bug-guix@HIDDEN:
bug#75157; Package guix. Full text available.

Message received at 75157 <at> debbugs.gnu.org:


Received: (at 75157) by debbugs.gnu.org; 29 Dec 2024 00:24:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 28 19:24:11 2024
Received: from localhost ([127.0.0.1]:53093 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tRh6I-0002rH-O5
	for submit <at> debbugs.gnu.org; Sat, 28 Dec 2024 19:24:11 -0500
Received: from relay.yourmailgateway.de ([188.68.63.166]:55357)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pelzflorian@HIDDEN>) id 1tRh6F-0002r3-Gf
 for 75157 <at> debbugs.gnu.org; Sat, 28 Dec 2024 19:24:09 -0500
Received: from mors-relay-8202.netcup.net (localhost [127.0.0.1])
 by mors-relay-8202.netcup.net (Postfix) with ESMTPS id 4YLK7T0GtFz3tGf;
 Sun, 29 Dec 2024 00:58:13 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de;
 s=key2; t=1735430293;
 bh=3l1SuGBFJyjvzQOAH3oOmcaVUOYnCfDU2RZIHkYD/R8=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=foAVYbl6nZi7G7fmU0hdgud/uWRQws9IsIKKwmDvVUtMuC2rMVGpw6IEn0DFYMKqq
 pzaanH189WPek7Viw/6T5k0+4QOTT8S7B4KsVRNXSAp1vTYDEdVeRGwvOELX6q2mwF
 akIy4vdgIOdBYA3w2nDGSXYQCkEzpVRYXOuv9AjpjVd3uGYyF8O9YxyIBWw1xzaAlB
 wsP2Yslk0yyEzGt3u41VzDqxVkBMduH22+fUlNLySLgUohiu6owUH6lW0dKtV7C4H4
 YWhUTLqDRkFi7e/bfx5wx+u6zZlh5EFq2xn6VSAliq58eWt6i0vFpG9CEZJO+PIWTN
 5wBm/p8pIzciA==
Received: from policy02-mors.netcup.net (unknown [46.38.225.35])
 by mors-relay-8202.netcup.net (Postfix) with ESMTPS id 4YLK7S6gXzz3tGJ;
 Sun, 29 Dec 2024 00:58:12 +0100 (CET)
Received: from mxe217.netcup.net (unknown [10.243.12.53])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by policy02-mors.netcup.net (Postfix) with ESMTPS id 4YLKjJ1bbdz8svJ;
 Sun, 29 Dec 2024 01:24:04 +0100 (CET)
Received: from florianhp (ipb21a5dbf.dynamic.kabel-deutschland.de
 [178.26.93.191])
 by mxe217.netcup.net (Postfix) with ESMTPSA id EA0E084390;
 Sun, 29 Dec 2024 01:23:57 +0100 (CET)
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: Dariqq <dariqq@HIDDEN>
Subject: Re: bug#75157: Grafting inconsistency with multiple outputs is
 causing problems
In-Reply-To: <fc701a2e-4317-459e-9685-56a14f5d2e21@HIDDEN>
 (dariqq@HIDDEN's message of "Sat, 28 Dec 2024 08:52:44 +0000")
References: <fc701a2e-4317-459e-9685-56a14f5d2e21@HIDDEN>
Date: Sun, 29 Dec 2024 01:24:41 +0100
Message-ID: <87o70vxrna.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Rspamd-Queue-Id: EA0E084390
X-Rspamd-Server: rspamd-worker-8404
X-NC-CID: wT7B3uhSvpK5bYtnClcamqqHIY6v0jRbEbOgXJZyzC39+10VNIMMULD2
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 75157
Cc: 75157 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello Dariqq, your debugging is interesting.

My G-Golf GTK program has a critical error at Gdk-Pixbuf, not GLib at
first sight, but see below.

$ guile /gnu/store/hbf4wqssp0aa0m2cxrwaq0mkxfd5y59p-launcher.scm

(guile:1273): Gtk-WARNING **: 01:21:40.538: Unable to acquire session bus: =
Failed to execute child process =E2=80=9Cdbus-launch=E2=80=9D (No such file=
 or directory)

(guile:1273): GLib-GObject-CRITICAL **: 01:21:40.586: cannot register exist=
ing type 'GdkPixbuf'

(guile:1273): GLib-GObject-CRITICAL **: 01:21:40.586: g_type_add_interface_=
static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(guile:1273): GLib-GObject-CRITICAL **: 01:21:40.586: g_type_add_interface_=
static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed

(guile:1273): GLib-CRITICAL **: 01:21:40.586: g_once_init_leave: assertion =
'result !=3D 0' failed

It cannot register existing type 'GdkPixbuf'.
Bisecting reveals the first bad commit is this:

commit 78c4d00ab02ab41a22058cdbec0329752e47580f
gpg: Signature made Mi 18 Dez 2024 08:27:09 CET
gpg:                using RSA key 27D586A4F8900854329FF09F1260E46482E63562
gpg: Can't check signature: No public key
Author: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Date:   Sat Dec 14 22:52:22 2024 +0900

    gnu: glibc: Graft with fix for CVE-2024-2961.
=20=20=20=20
    * gnu/packages/base.scm (%glibc-patches): New variable.
    (glibc) [source]: Use it.
    [properties]: Mark CVE-2024-2961 as hidden (resolved).
    [replacement]: Add field to graft with...
    (glibc/fixed): ... this new package.
=20=20=20=20
    Fixes: <https://issues.guix.gnu.org/70581>
    Change-Id: I6dd70b0e157283925824348f180c466c2f6387c9

I look at `cat /proc/635/maps`

/gnu/store/1av61zsp5sxs0as48nl52fg78b466r8p-gdk-pixbuf-2.42.10/lib/libgdk_p=
ixbuf-2.0.so.0.4200.10
/gnu/store/1av61zsp5sxs0as48nl52fg78b466r8p-gdk-pixbuf-2.42.10/lib/gireposi=
tory-1.0/GdkPixbuf-2.0.typelib

and

/gnu/store/10i71f2m5r6rijl8gvn1mpmvzxaxs76l-gdk-pixbuf-2.42.10/lib/libgdk_p=
ixbuf-2.0.so.0.4200.10

this one without a matching typelib, so only the latter was not loaded
through a typelib.

$ guix gc --references /gnu/store/1av61zsp5sxs0as48nl52fg78b466r8p-gdk-pixb=
uf-2.42.10
/gnu/store/0466q5rlccclzg70f3yprpf9kdvlyfzf-glib-2.78.0
...
$ guix gc --derivers /gnu/store/0466q5rlccclzg70f3yprpf9kdvlyfzf-glib-2.78.0
/gnu/store/ikv0s6dr3yzs398i67vh3p0w8jglxm4w-glib-2.78.0.drv
$ guix build /gnu/store/ikv0s6dr3yzs398i67vh3p0w8jglxm4w-glib-2.78.0.drv
/gnu/store/0466q5rlccclzg70f3yprpf9kdvlyfzf-glib-2.78.0
$ guix gc --references /gnu/store/10i71f2m5r6rijl8gvn1mpmvzxaxs76l-gdk-pixb=
uf-2.42.10
/gnu/store/0466q5rlccclzg70f3yprpf9kdvlyfzf-glib-2.78.0
$ guix gc --derivers /gnu/store/0466q5rlccclzg70f3yprpf9kdvlyfzf-glib-2.78.0
/gnu/store/ikv0s6dr3yzs398i67vh3p0w8jglxm4w-glib-2.78.0.drv
$ guix build /gnu/store/ikv0s6dr3yzs398i67vh3p0w8jglxm4w-glib-2.78.0.drv
/gnu/store/0466q5rlccclzg70f3yprpf9kdvlyfzf-glib-2.78.0


Both my GLibs have one output only.  I still believe above guix commit
is the first bad commit for you, as well, and

guix time-machine -q --commit=3D78c4d00ab02ab41a22058cdbec0329752e47580f

will show the error and parent commit

guix time-machine -q --commit=3D08e0144d2338c8fb51e52e74274554583d0faa69

will be fine.  Is it?

I believe what we describe here is yet another symptom of old bug
<https://issues.guix.gnu.org/48907>, but if we have a first bad commit,
and if it is the first bad commit for you, too,
it might help solve it.  Or perhaps this bug can be solved separately if
really the loading through typelib vs. not through typelib is the cause.

Regards,
Florian




Information forwarded to bug-guix@HIDDEN:
bug#75157; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 28 Dec 2024 08:53:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 28 03:53:05 2024
Received: from localhost ([127.0.0.1]:48713 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tRSZE-0000Ap-Hy
	for submit <at> debbugs.gnu.org; Sat, 28 Dec 2024 03:53:05 -0500
Received: from lists.gnu.org ([209.51.188.17]:46990)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dariqq@HIDDEN>) id 1tRSZC-0000AO-2B
 for submit <at> debbugs.gnu.org; Sat, 28 Dec 2024 03:53:02 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dariqq@HIDDEN>) id 1tRSZA-00005h-NX
 for bug-guix@HIDDEN; Sat, 28 Dec 2024 03:53:00 -0500
Received: from mout02.posteo.de ([185.67.36.66])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dariqq@HIDDEN>) id 1tRSZ8-0005L0-1w
 for bug-guix@HIDDEN; Sat, 28 Dec 2024 03:53:00 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout02.posteo.de (Postfix) with ESMTPS id BF577240103
 for <bug-guix@HIDDEN>; Sat, 28 Dec 2024 09:52:52 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1735375972; bh=QdgKMOYWhrk+mWrf45p6u/pToiM0bk2fUQxS5giysnY=;
 h=Message-ID:Date:MIME-Version:To:From:Subject:Content-Type:
 Content-Transfer-Encoding:From;
 b=hftvcsg2hyAo0L4/cbTkiQKsbMA780t76+47utocZLCsMXZrKjbHTFht1Wg/4VqGF
 jnoEx9L+/4rC9oKa/Spa3VxEXpilbDzxLhSYwpwizq4v9yX6ZAEe4dL1grxzyjjS8a
 sjPDpeQccpyUfkNtEgFdCGP94dy7T+9LAGxekueZ9KbqdtenWx1DpI5n6oBCBUOf1J
 BVStcDLQp8P1+++umZ9a9odGAGgMoRBskHVOrkZJmbbQrUm/gWM3Cv6BddMl0sN13B
 kbo5byByexR4pmpvz60h8O4+9xbypBg6Ylj0F76Y9XMM5bry3Hz3vUTM9NKBRsKfi8
 vScmSCkkRhu7Q==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4YKx2r1mcxz6twB
 for <bug-guix@HIDDEN>; Sat, 28 Dec 2024 09:52:52 +0100 (CET)
Message-ID: <fc701a2e-4317-459e-9685-56a14f5d2e21@HIDDEN>
Date: Sat, 28 Dec 2024 08:52:44 +0000
MIME-Version: 1.0
Content-Language: en-US
To: bug-guix@HIDDEN
From: Dariqq <dariqq@HIDDEN>
Subject: Grafting inconsistency with multiple outputs is causing problems
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=185.67.36.66; envelope-from=dariqq@HIDDEN;
 helo=mout02.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 WEIRD_QUOTING=0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hello,

Yesterday I was playing around with g-golf and libguile and encountered 
some weird glib issues once I linked my c program to glib/gobject.

After asking about this in #guile the problem was discovered to be 2 
different glibs being in use and the workaround is use them with 
'--no-grafts' instead.

I looked into why grafting is causing this problem and here is what I 
have found:

The following happend on guix commit 
e16cdcf37d8223b3634ec5e658356c3b7f154859


Before grafting:
/gnu/store/digl75knygzqg9lrh8adk3pz0qg9cx8h-guile-g-golf-0.8.0-a.1:
Has a reference to: /gnu/store/zgsphhmliwgmjjv1czmbyjql3gk7ynsx-glib-2.78.0
which is the out output of the hidden (@@ (gnu packages glib) glib) package


After applying grafts:
/gnu/store/2ar2h8d7nk3g7c9965y4n68gjr778prk-guile-g-golf-0.8.0-a.1:
Has reference to /gnu/store/0466q5rlccclzg70f3yprpf9kdvlyfzf-glib-2.78.0

But the hidden glib grafts to
/gnu/store/ls9p0k2chrzviadibzf0iz7rlpkmggms-glib-2.78.0
instead (which is the one I am linking to)


Looking at the grafting derivations the issue seems to be that in one 
case all outputs of glib are grafted and in the other case only the out 
output which leads to the different results.


8<---------------cut here---------------start------------->8---
/gnu/store/ikv0s6dr3yzs398i67vh3p0w8jglxm4w-glib-2.78.0.drv
Derive
([("out","/gnu/store/0466q5rlccclzg70f3yprpf9kdvlyfzf-glib-2.78.0","","")]
  ,[("/gnu/store/0s4qbdir1j1c6yfnhvj3w4kpplsaafik-pcre2-10.42.drv",["out"])
    ,("/gnu/store/1554x8kqj7xjw5an8rzrnfz3v40spiy7-glibc-2.39.drv",["out"])
    ,("/gnu/store/2c70wagxjjxk8lcj3znrqqlvn2dcj024-glibc-2.39.drv",["out"])
    ,("/gnu/store/523ngwgnmyhszf9mqbk537ka41jbzs00-guile-3.0.9.drv",["out"])
    ,("/gnu/store/7lwb609ira5a3rs9ncxk55azvsnwi6vv-glib-2.78.0.drv",["out"])
    ,("/gnu/store/gmp1ciyg5yna6983phnf22pwsivfanwq-zlib-1.3.drv",["out"])
    ,("/gnu/store/gxn87vb8lb1l3yzmnzidmxbn3nk9x3bf-gcc-11.4.0.drv",["lib"])
  
,("/gnu/store/h268dh05da4jfrl94xq5jkvyic7k2h57-libffi-3.4.4.drv",["out"])
    ,("/gnu/store/h50bkx0qkqj7x0f1sbkgkiszkbdq32qg-zlib-1.3.drv",["out"])
  
,("/gnu/store/hkz1acxfcxil4252qw7i25gcn0f852dw-libffi-3.4.4.drv",["out"])
    ,("/gnu/store/jyki6954ps4gnhpznacfws146svldkpf-gcc-11.4.0.drv",["lib"])
  
,("/gnu/store/vhi205g193z01plb6pbhm75b186zrhis-util-linux-2.37.4.drv",["lib"])
  
,("/gnu/store/w5pgbafd9apavpnczcgblbgmwwp0a8y0-util-linux-2.37.4.drv",["lib"])
    ,("/gnu/store/yni45i1ca3ymb8rna09qh038v102zyjj-pcre2-10.42.drv",["out"])
  
,("/gnu/store/zp7byldvi2imbliv154vv87iai65jwxy-module-import-compiled.drv",["out"])]
  ,["/gnu/store/2mml5mrmhmn1424pymllzk18m2z3l44q-glib-2.78.0-builder","/gnu/store/flaxnn4ciba6wd243ahwgrqw11082imp-module-import"]
  ,"x86_64-linux","/gnu/store/xv4cd7qz4yan93zkjisbmbpxfz78hah2-guile-3.0.9/bin/guile",["--no-auto-compile","-L","/gnu/store/flaxnn4ciba6wd243ahwgrqw11082imp-module-import","-C","/gnu/store/5wdfvn4mklppcg5p9i1d14ksbnsd7m8b-module-import-compiled","/gnu/store/2mml5mrmhmn1424pymllzk18m2z3l44q-glib-2.78.0-builder"]
  ,[("allowSubstitutes","0")
    ,("guix properties","((type . graft) (graft (count . 6)))")
    ,("out","/gnu/store/0466q5rlccclzg70f3yprpf9kdvlyfzf-glib-2.78.0")
    ,("preferLocalBuild","1")])
--8<---------------cut here---------------end--------------->8---


The "correctly"  grafted glib derivation looks like this:
/gnu/store/xax79x40lzs4wf2v4ipbxvy2gkc9qq7p-glib-2.78.0.drv
8<---------------cut here---------------start------------->8---
gnu/store/xax79x40lzs4wf2v4ipbxvy2gkc9qq7p-glib-2.78.0.drv
Derive
([("bin","/gnu/store/q3d08x70gcjj99k5dd0jbfc8rj97j9lz-glib-2.78.0-bin","","")
  
,("debug","/gnu/store/pn2mdlc86i7x6vrg2j6pslp5sq551255-glib-2.78.0-debug","","")
   ,("out","/gnu/store/ls9p0k2chrzviadibzf0iz7rlpkmggms-glib-2.78.0","","")
  
,("static","/gnu/store/n5s2s4rg3jax3y7kp93bgn2w6s7vlfrz-glib-2.78.0-static","","")]
  ,[("/gnu/store/0s4qbdir1j1c6yfnhvj3w4kpplsaafik-pcre2-10.42.drv",["out"])
    ,("/gnu/store/1554x8kqj7xjw5an8rzrnfz3v40spiy7-glibc-2.39.drv",["out"])
    ,("/gnu/store/2c70wagxjjxk8lcj3znrqqlvn2dcj024-glibc-2.39.drv",["out"])
    ,("/gnu/store/523ngwgnmyhszf9mqbk537ka41jbzs00-guile-3.0.9.drv",["out"])
  
,("/gnu/store/7lwb609ira5a3rs9ncxk55azvsnwi6vv-glib-2.78.0.drv",["bin","debug","out","static"])
    ,("/gnu/store/gmp1ciyg5yna6983phnf22pwsivfanwq-zlib-1.3.drv",["out"])
    ,("/gnu/store/gxn87vb8lb1l3yzmnzidmxbn3nk9x3bf-gcc-11.4.0.drv",["lib"])
  
,("/gnu/store/h268dh05da4jfrl94xq5jkvyic7k2h57-libffi-3.4.4.drv",["out"])
    ,("/gnu/store/h50bkx0qkqj7x0f1sbkgkiszkbdq32qg-zlib-1.3.drv",["out"])
  
,("/gnu/store/hkz1acxfcxil4252qw7i25gcn0f852dw-libffi-3.4.4.drv",["out"])
    ,("/gnu/store/jyki6954ps4gnhpznacfws146svldkpf-gcc-11.4.0.drv",["lib"])
  
,("/gnu/store/piymwc0w49ylyz69ikq6vnj32xhl96h6-bash-minimal-5.1.16.drv",["out"])
  
,("/gnu/store/vhi205g193z01plb6pbhm75b186zrhis-util-linux-2.37.4.drv",["lib"])
  
,("/gnu/store/w5pgbafd9apavpnczcgblbgmwwp0a8y0-util-linux-2.37.4.drv",["lib"])
  
,("/gnu/store/wqa52jpxmv1xiibdxvfls7dnphq83jb5-bash-minimal-5.1.16.drv",["out"])
  
,("/gnu/store/yhxc842f6arm91w4vhdmgazw2nvkn7g7-python-3.10.7.drv",["out"])
  
,("/gnu/store/yig8rg8bjy599m49kia7nph8393x5j2g-python-3.10.7.drv",["out"])
    ,("/gnu/store/yni45i1ca3ymb8rna09qh038v102zyjj-pcre2-10.42.drv",["out"])
  
,("/gnu/store/zp7byldvi2imbliv154vv87iai65jwxy-module-import-compiled.drv",["out"])]
  ,["/gnu/store/65ym8q6k1adkz4d4xalrsdq409r8k8r8-glib-2.78.0-builder","/gnu/store/flaxnn4ciba6wd243ahwgrqw11082imp-module-import"]
  ,"x86_64-linux","/gnu/store/xv4cd7qz4yan93zkjisbmbpxfz78hah2-guile-3.0.9/bin/guile",["--no-auto-compile","-L","/gnu/store/flaxnn4ciba6wd243ahwgrqw11082imp-module-import","-C","/gnu/store/5wdfvn4mklppcg5p9i1d14ksbnsd7m8b-module-import-compiled","/gnu/store/65ym8q6k1adkz4d4xalrsdq409r8k8r8-glib-2.78.0-builder"]
  ,[("allowSubstitutes","0")
    ,("bin","/gnu/store/q3d08x70gcjj99k5dd0jbfc8rj97j9lz-glib-2.78.0-bin")
  
,("debug","/gnu/store/pn2mdlc86i7x6vrg2j6pslp5sq551255-glib-2.78.0-debug")
    ,("guix properties","((type . graft) (graft (count . 8)))")
    ,("out","/gnu/store/ls9p0k2chrzviadibzf0iz7rlpkmggms-glib-2.78.0")
    ,("preferLocalBuild","1")
  
,("static","/gnu/store/n5s2s4rg3jax3y7kp93bgn2w6s7vlfrz-glib-2.78.0-static")])
--8<---------------cut here---------------end--------------->8---



I think it would be good if grafts are only applied per output (which 
might also help resolve #69653).






Acknowledgement sent to Dariqq <dariqq@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#75157; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

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