GNU bug report logs - #48907
Grafts cause discrepancies in debug symbols file names (debug symbols missing in GDB).

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: Maxim Cournoyer <maxim.cournoyer@HIDDEN>; merged with #75157; dated Mon, 7 Jun 2021 18:20:02 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.

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


Received: (at 48907) by debbugs.gnu.org; 30 May 2024 02:39:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 29 22:39:03 2024
Received: from localhost ([127.0.0.1]:40403 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sCVh1-0002RE-1E
	for submit <at> debbugs.gnu.org; Wed, 29 May 2024 22:39:03 -0400
Received: from mail-108-mta198.mxroute.com ([136.175.108.198]:46725)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <richard@HIDDEN>) id 1sCVgy-0002Qn-Ur
 for 48907 <at> debbugs.gnu.org; Wed, 29 May 2024 22:39:02 -0400
Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com)
 (Authenticated sender: mN4UYu2MZsgR)
 by mail-108-mta198.mxroute.com (ZoneMTA) with ESMTPSA id
 18fc75d433b000efce.001 for <48907 <at> debbugs.gnu.org>
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
 Thu, 30 May 2024 02:38:49 +0000
X-Zone-Loop: 816f07e5cebe6bf08ed5d36219fd9ee8e45bdb427e5c
X-Originating-IP: [136.175.111.3]
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=freakingpenguin.com; s=x; h=Content-Type:MIME-Version:Message-ID:Date:CC:
 Subject:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=2KeHevkksxaZXZaOsd2bSQi8DqU4riXNNqR1IK7fTPA=; b=TmWTgvm3xa14FTCDbc7ICW5pxJ
 TM8YHfGzOMyyaXsq+hmzhUPDXX7AG8Me9x4AuzgqHZx2oBD+OrihQ2oe3GPaP2vfhJWSLZH0X1X7I
 ts7/Bgd7tHRikBPpF1/RmT9MHc5PoxifBKrexRwbEPa3EDSDm5c2XVIdmgtpXDKDL0rc/nQL5Dte0
 HGPWeVKXNrMLTF9TK29t/h2S/6fJPicZdwdrWP8Aqyv/Wa3ds+SUUF7Ge4aDChzzdGa+Vul9aKscw
 7R5nqHe0SsQj31ug+sYbZ3RNge7A2xaPvBeD55znWO7kt6zfCRIytu0nlf7IVfon84MRBc4r8Tpk8
 eWdnMnJA==;
From: Richard Sent <richard@HIDDEN>
To: 48907 <at> debbugs.gnu.org
Subject: Other possibly related issues
Date: Wed, 29 May 2024 22:38:40 -0400
Message-ID: <87sey081n3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Authenticated-Id: richard@HIDDEN
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48907
Cc: ludo@HIDDEN, pelzflorian@HIDDEN, maxim.cournoyer@HIDDEN
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 (-)

Hi all,

I believe https://issues.guix.gnu.org/62890 is another example of this
problem. Possibly https://issues.guix.gnu.org/47115#23 as well.

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.

Funny, I just started investigating the grafting code myself to see if I
could understand what's going on and I stumble upon this 3 year old
issue just an hour after Maxim comments.

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.




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

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


Received: (at 48907) by debbugs.gnu.org; 30 May 2024 01:12:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 29 21:12:32 2024
Received: from localhost ([127.0.0.1]:37068 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1sCULI-0007YQ-4b
	for submit <at> debbugs.gnu.org; Wed, 29 May 2024 21:12:32 -0400
Received: from mail-qv1-f46.google.com ([209.85.219.46]:46307)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1sCULF-0007Y8-VV
 for 48907 <at> debbugs.gnu.org; Wed, 29 May 2024 21:12:30 -0400
Received: by mail-qv1-f46.google.com with SMTP id
 6a1803df08f44-6ae0c4d23ddso1894396d6.0
 for <48907 <at> debbugs.gnu.org>; Wed, 29 May 2024 18:12:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1717031474; x=1717636274; darn=debbugs.gnu.org;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date
 :message-id:reply-to;
 bh=J89RkObtE27b7YoZL6jnx6jlJxSxmx/qn1xemirTJUM=;
 b=iYvfAlgkqKGZd8IRANcDBpUOoMUQ+Cl9MtBGdfH36OVeEH8yuuIFzIJrd3Xzt1X2vJ
 1dZ05UlY8kV4NCiQ9KYLpSrt3kmFYmXLYK+erARTG+BW0+cF9RqTh0aMar5lFOeRRUxY
 qsNwj6aVPyAB9MT7py4p66sDGy1sN3FzeGXlJgDFI/aMqasQ3EVGLsUhwzyiS13DFkmN
 fjsnHXCib6TSLgLjXahyzmphCwoLpMc5VAxjTOPxMNY5bvQKCDXinoTKknNTxb867tKj
 7glWpOo5dT1QMyEEXiay52t+fxwiW5YmRh2cFVMSGtH1rLEP9wM9Oc76a92d45CgSk5k
 cloQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1717031474; x=1717636274;
 h=content-transfer-encoding:mime-version:user-agent:message-id:date
 :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from
 :to:cc:subject:date:message-id:reply-to;
 bh=J89RkObtE27b7YoZL6jnx6jlJxSxmx/qn1xemirTJUM=;
 b=h+KCTBaZJl59Zr8iFOrbJgoSVGVu7Gmqiyvfzwg2Qkuw28ob8MXbtsb1dMD2mZ6JFC
 pZHlIG+M4FtVTbLN7xCipTUtqBjp+ENeBwK1V7mFQdizCcKtwrrX4jRUdwcI2Zxs+i/a
 n7fqBZBGjhlXSlJXHQoYJcPpI1/f8rnG7WW3siFYGMbBWFDvOWzsMDW17l/dytcfjbp1
 iqYnOMUKpHXeijwW/+cNMaOF2QtdKfYzPFWOZ6Sgk69pfAkjPwm7PBdQ4dfIbz0yR/0u
 aolm6NjTLj8XD2P6Z5VTPvU7M1ot4EwrEqzAaUqnrE3H8BBEU+nAnbRp7HvQaSWkt/3G
 bREw==
X-Gm-Message-State: AOJu0Ywig1iktp4zC8oVI+UrRQVBcLnJ+npu3YQmT8ZBghPfQnYScCIK
 nsJcfgiXXOMT+rDVSPlG/21A+mxkEgkUrHgPPCad6rJ5MqMLkjDprVOM6Mml
X-Google-Smtp-Source: AGHT+IE92t6D5eMUqY08q1kn/LOILbjxdS+P8KeCA7cZFI9vj/ptVeUxUODexefeEGH9eRQys+dc9g==
X-Received: by 2002:a05:6214:53c8:b0:6a8:ff23:aa0a with SMTP id
 6a1803df08f44-6ae0cb1ebc6mr9289846d6.26.1717031474042; 
 Wed, 29 May 2024 18:11:14 -0700 (PDT)
Received: from hurd (dsl-10-133-96.b2b2c.ca. [72.10.133.96])
 by smtp.gmail.com with ESMTPSA id
 6a1803df08f44-6ae0b9dfcc0sm3667936d6.41.2024.05.29.18.11.13
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 29 May 2024 18:11:13 -0700 (PDT)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
Subject: Re: bug#48907: Grafts cause discrepancies in debug symbols file
 names (debug symbols missing in GDB).
In-Reply-To: <871q6r9qsg.fsf@HIDDEN>
 (pelzflorian@HIDDEN's message of "Sat, 27 Apr 2024 10:02:39
 +0200")
References: <87r1hdtu4t.fsf@HIDDEN> <87eeczikq5.fsf@HIDDEN>
 <87ilyqk8jg.fsf_-_@HIDDEN> <87lf3mm560.fsf@HIDDEN>
 <87v92lh1wc.fsf@HIDDEN> <8735phq6dy.fsf@HIDDEN>
 <871q6r9qsg.fsf@HIDDEN>
Date: Wed, 29 May 2024 21:11:12 -0400
Message-ID: <87plt4f6j3.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-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48907
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>, 48907 <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 (-)

Hi Florian,

"pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN> writes:

> Hello all.
>
> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>>>> I wonder if we should revert 482fda2729c3e76999892cb8f9a0391a7bd37119.
>>>> It=E2=80=99s often not very helpful anyway (we often find ourselves do=
wnloading
>>>> unnecessary package outputs because of grafting).
>>>
>>> Hmm.  Perhaps.  But it'd also suck to have to download 1 GiB of unneeded
>>> debugging symbols to just apply a graft to Qt, for example.
>>
>> Yeah.  That=E2=80=99s already the case in some cases though, that=E2=80=
=99s what I
>> meant.
>
> I believe I got bitten by this 482fda2729c3e76999892cb8f9a0391a7bd37119
> too, not only for debug symbols, which annoys me, and not like the Go
> users, but for me the issue surfaced when trying to use guile-g-golf,
> whose hello-world.scm errors out with =E2=80=9Ccannot register existing t=
ype
> 'GdkPixbuf'=E2=80=9D and GDB debugging shows (I think) it is because a va=
riant
> of gdk-pixbuf without a debug output is used by Gtk while guile-g-golf
> loads gdk-pixbuf with debug output before.  `guix shell --no-grafts` is
> a workaround.

I'm guessing bug #64836 ("pygobject GTK modules lookup fails following
CUPS graft") may be another manifestation of this problem.

--=20
Thanks,
Maxim




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

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


Received: (at 48907) by debbugs.gnu.org; 27 Apr 2024 08:04:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 27 04:04:58 2024
Received: from localhost ([127.0.0.1]:38856 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1s0d3I-0002dh-1y
	for submit <at> debbugs.gnu.org; Sat, 27 Apr 2024 04:04:58 -0400
Received: from relay.yourmailgateway.de ([185.244.194.184]:48959)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <pelzflorian@HIDDEN>) id 1s0d3E-0002ch-Jo
 for 48907 <at> debbugs.gnu.org; Sat, 27 Apr 2024 04:04:55 -0400
Received: from relay01-mors.netcup.net (localhost [127.0.0.1])
 by relay01-mors.netcup.net (Postfix) with ESMTPS id 4VRMZ81trwz92sQ;
 Sat, 27 Apr 2024 10:04:32 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=pelzflorian.de;
 s=key2; t=1714205072;
 bh=MaDeAmdW+PpCx+c2nvpvukHfQ6z6oi8KO5tcdiE0iIQ=;
 h=From:To:Cc:Subject:In-Reply-To:Date:References:From;
 b=GioabwYE1mxq+5qB1/2j1xWZhFMu4gtYlTKU4csB1HZqpKAWrJtWTghh2ybVLcRKX
 2PVWxxQ5z3IUSIyBGZnI2diOgM1n1s4b/0jHowvttAw02wdRMFWQSe7mSrGw4s39eM
 Mr46ylmfmefhEtVjg9OOldMTiSf/+V5BnnHKH1+dWRr7m5d1S/XWDKFycT5DJMdULT
 KxIdGGnBheBNu2iJmO2J+ki9em2wJrS0aXN3jpymphgzOusDNVS8OtGvOTFOcw7hV4
 /rLt2ysgXKe9TQlBS+aao15IrjOYQThL6IbNYzZ7XWVtfZRxklGhP+Gr9Ei27lD0B1
 IRpMYdydhL2Cw==
Received: from policy02-mors.netcup.net (unknown [46.38.225.35])
 by relay01-mors.netcup.net (Postfix) with ESMTPS id 4VRMZ81D1Hz7wDG;
 Sat, 27 Apr 2024 10:04:32 +0200 (CEST)
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 4VRMZ7624xz8sbC;
 Sat, 27 Apr 2024 10:04:31 +0200 (CEST)
Received: from florianrock64 (ipb2186896.dynamic.kabel-deutschland.de
 [178.24.104.150])
 by mxe217.netcup.net (Postfix) with ESMTPSA id 38CB0839FD;
 Sat, 27 Apr 2024 10:04:25 +0200 (CEST)
From: "pelzflorian (Florian Pelz)" <pelzflorian@HIDDEN>
To: 48907 <at> debbugs.gnu.org
Subject: Re: bug#48907: Grafts cause discrepancies in debug symbols file
 names (debug symbols missing in GDB).
In-Reply-To: <8735phq6dy.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Mon, 04 Oct 2021 15:14:17 +0200")
Date: Sat, 27 Apr 2024 10:02:39 +0200
Message-ID: <871q6r9qsg.fsf@HIDDEN>
References: <87r1hdtu4t.fsf@HIDDEN> <87eeczikq5.fsf@HIDDEN>
 <87ilyqk8jg.fsf_-_@HIDDEN> <87lf3mm560.fsf@HIDDEN>
 <87v92lh1wc.fsf@HIDDEN> <8735phq6dy.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: 38CB0839FD
X-Rspamd-Server: rspamd-worker-8404
X-NC-CID: r/YF8PhBbgqw4ZKe9FclERpW/xhgX90N7NSX4W/WkZh26dJhH8ygY+TE
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 48907
Cc: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>,
 Maxim Cournoyer <maxim.cournoyer@HIDDEN>
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 all.

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>>> I wonder if we should revert 482fda2729c3e76999892cb8f9a0391a7bd37119.
>>> It=E2=80=99s often not very helpful anyway (we often find ourselves dow=
nloading
>>> unnecessary package outputs because of grafting).
>>
>> Hmm.  Perhaps.  But it'd also suck to have to download 1 GiB of unneeded
>> debugging symbols to just apply a graft to Qt, for example.
>
> Yeah.  That=E2=80=99s already the case in some cases though, that=E2=80=
=99s what I
> meant.

I believe I got bitten by this 482fda2729c3e76999892cb8f9a0391a7bd37119
too, not only for debug symbols, which annoys me, and not like the Go
users, but for me the issue surfaced when trying to use guile-g-golf,
whose hello-world.scm errors out with =E2=80=9Ccannot register existing type
'GdkPixbuf'=E2=80=9D and GDB debugging shows (I think) it is because a vari=
ant
of gdk-pixbuf without a debug output is used by Gtk while guile-g-golf
loads gdk-pixbuf with debug output before.  `guix shell --no-grafts` is
a workaround.

Perhaps guile-gi have the same issue.  Quoting
<https://github.com/spk121/guile-gi/issues/96>:
> It is pretty clear to me, that the main culprit here is a different
> version of GLib being linked to Guile-GI than the one that should be
> loaded through Guile-GI.

In essence it seems to me 482fda2729c3e76999892cb8f9a0391a7bd37119 is
implemented at the wrong level.  It changed the grafting derivation and
thus the hash, when it could probably be done in guix-daemon directly.

Is it better to wait with fixing this until the guix-daemon is rewritten
in Guile?  And use `--no-grafts' in the meantime?

Regards,
Florian




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

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


Received: (at 48907) by debbugs.gnu.org; 4 Oct 2021 13:14:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 04 09:14:27 2021
Received: from localhost ([127.0.0.1]:35924 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mXNnX-0002vy-HO
	for submit <at> debbugs.gnu.org; Mon, 04 Oct 2021 09:14:27 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53382)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mXNnU-0002vj-Vn
 for 48907 <at> debbugs.gnu.org; Mon, 04 Oct 2021 09:14:26 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52912)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1mXNnP-0007LC-NV; Mon, 04 Oct 2021 09:14:19 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=60542 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1mXNnP-0002oM-9j; Mon, 04 Oct 2021 09:14:19 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: bug#48907: Grafts cause discrepancies in debug symbols file
 names (debug symbols missing in GDB).
In-Reply-To: <87v92lh1wc.fsf@HIDDEN> (Maxim Cournoyer's message of "Mon, 27
 Sep 2021 22:25:39 -0400")
References: <87r1hdtu4t.fsf@HIDDEN> <87eeczikq5.fsf@HIDDEN>
 <87ilyqk8jg.fsf_-_@HIDDEN> <87lf3mm560.fsf@HIDDEN>
 <87v92lh1wc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 7 =?utf-8?Q?Vend=C3=A9miaire?= an 230 de la
 =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Mon, 04 Oct 2021 15:14:17 +0200
Message-ID: <8735phq6dy.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48907
Cc: 48907 <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 (---)

Hi,

Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis:

> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>
> [...]
>
>>> Yikes!  This means that debugging with grafts (with the aid of debugging
>>> symbols) is no longer possible, right?
>>
>> It depends on whether the separate =E2=80=9Cdebug=E2=80=9D output gets g=
rafted or not,
>> but yeah, if a dependency tree has this shape (app -> lib + lib:debug),
>> running =E2=80=98guix install app=E2=80=99 alone will prevent you from g=
etting debugging
>> symbols from =E2=80=98lib:debug=E2=80=99 I believe.  That sucks.
>>
>> I wonder if we should revert 482fda2729c3e76999892cb8f9a0391a7bd37119.
>> It=E2=80=99s often not very helpful anyway (we often find ourselves down=
loading
>> unnecessary package outputs because of grafting).
>
> Hmm.  Perhaps.  But it'd also suck to have to download 1 GiB of unneeded
> debugging symbols to just apply a graft to Qt, for example.

Yeah.  That=E2=80=99s already the case in some cases though, that=E2=80=99s=
 what I
meant.

>>> I remember reading about a 2nd option to locate the separate debug
>>> symbol files with GDB in info '(gdb) Separate Debug Files':
>>>
>>>
>>>    * The executable contains a "build ID", a unique bit string that is
>>
>> We=E2=80=99d have to check if this is applicable.  Looking at the ld man=
ual
>> (info "(ld) Options"), it seems that the UUID =E2=80=9Cstyle=E2=80=9D is=
 ruled out
>> because it=E2=80=99s non-deterministic, and the md5 and sha1 styles would
>> require us to rewrite build IDs IIUC, similar to how we rewrite CRCs.
>
> Seems like it could work?  simark from #gdb says it should be
> deterministic for reproducible builds.  We'd need to fixup the grafted
> debug output, but they could being done in a separate derivation would
> no longer matter (as the debug symbols would be matched on a unique ID
> that is not linked to that derivation, not on their file name, which
> is).
>
> Did I get the above right?

To summarize, =E2=80=98.gnu_debuglink=E2=80=99 in executables/libraries con=
tains the
CRC of the debug file.

Conversely, IIUC what the =E2=80=9Cnormative parts of the output contents=
=E2=80=9D (info
"(ld) Options") really are, build IDs are computed on the code, not on
debug info.

But the problems remains the same I think: if you have
/gnu/store/abc=E2=80=A6/libfoo.so and /gnu/store/xyz=E2=80=A6/libfoo.so, ch=
ances are
that they are different due to embedded store file names, and thus get a
different build ID.

Am I right?

(BTW, I just noticed build IDs were also discussed at
<https://issues.guix.gnu.org/25752>.)

Ludo=E2=80=99.




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

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


Received: (at 48907) by debbugs.gnu.org; 28 Sep 2021 10:29:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 06:29:03 2021
Received: from localhost ([127.0.0.1]:43984 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVAMA-0000Az-Dh
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 06:29:03 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53430)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mVALv-0000AG-9h
 for 48907 <at> debbugs.gnu.org; Tue, 28 Sep 2021 06:29:01 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:37126)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1mVALq-0000Jg-2j; Tue, 28 Sep 2021 06:28:42 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=60474 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1mVALp-0003OE-Bc; Tue, 28 Sep 2021 06:28:41 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: bug#48907: Grafts cause discrepancies in debug symbols file
 names (debug symbols missing in GDB).
References: <87r1hdtu4t.fsf@HIDDEN> <87eeczikq5.fsf@HIDDEN>
 <87ilyqk8jg.fsf_-_@HIDDEN> <87lf3mm560.fsf@HIDDEN>
 <87v92lh1wc.fsf@HIDDEN> <877df1f2zk.fsf@HIDDEN>
Date: Tue, 28 Sep 2021 12:28:39 +0200
In-Reply-To: <877df1f2zk.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Tue, 28 Sep 2021 11:45:03 +0200")
Message-ID: <87lf3hdmeg.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48907
Cc: 48907 <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 (---)

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> Conversely, IIUC what the =E2=80=9Cnormative parts of the output contents=
=E2=80=9D (info
> "(ld) Options") really are, build IDs are computed on the code, not on
> debug info.
>
> But the problems remains the same I think: if you have
> /gnu/store/abc=E2=80=A6/libfoo.so and /gnu/store/xyz=E2=80=A6/libfoo.so, =
chances are
> that they are different due to embedded store file names, and thus get a
> different build ID.

We discussed this with Mark Wielaard on #guix=C2=B9, and one important
takeaway is:

--8<---------------cut here---------------start------------->8---
<civodul> so gdb just checks that the separate debug file has the same
	  build-id as the code, right?  [12:16]
<civodul> it doesn't matter whether it really is the sha1 of all those
	  sections, does it?
<mjw> that is kind of the whole point of the build-id, that it captures the
      whole build environment, not just the generated code, but also how it
      was generated (which is what the .debug sections kind of represent)
<civodul> ok  [12:17]
<mjw> civodul, no, it doesn't need to be a hash over the actual bits
      produced. It can be a completely different hash, it can be a different
      number of bits (but not too short, they need to be globally unique).
<civodul> ok, so we could have our own way of caculating build IDs  [12:18]
<mjw> civodul, all that really matters is that it uniquely identifies this
      binary blob. If any input, source, compiler, flags, etc. changes, it
      should be unique.
--8<---------------cut here---------------end--------------->8---

So I suspect that we would not need to rewrite build IDs upon grafting,
and we could use the ungrafted debug info with grafted code and vice
versa.

We should try it out to test the hypothesis, but if that works, that=E2=80=
=99d
be great.

Ludo=E2=80=99.

=C2=B9 https://logs.guix.gnu.org/guix/2021-09-28.log#114610




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

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


Received: (at 48907) by debbugs.gnu.org; 28 Sep 2021 09:45:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 05:45:42 2021
Received: from localhost ([127.0.0.1]:43889 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mV9gE-0007MX-E6
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 05:45:42 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44812)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mV9gD-0007ML-3M
 for 48907 <at> debbugs.gnu.org; Tue, 28 Sep 2021 05:45:41 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:35974)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1mV9g5-0006gh-GM; Tue, 28 Sep 2021 05:45:34 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=60470 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1mV9fe-00051v-BD; Tue, 28 Sep 2021 05:45:24 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: bug#48907: Grafts cause discrepancies in debug symbols file
 names (debug symbols missing in GDB).
References: <87r1hdtu4t.fsf@HIDDEN> <87eeczikq5.fsf@HIDDEN>
 <87ilyqk8jg.fsf_-_@HIDDEN> <87lf3mm560.fsf@HIDDEN>
 <87v92lh1wc.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 7 =?utf-8?Q?Vend=C3=A9miaire?= an 230 de la
 =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Tue, 28 Sep 2021 11:45:03 +0200
In-Reply-To: <87v92lh1wc.fsf@HIDDEN> (Maxim Cournoyer's message of "Mon, 27
 Sep 2021 22:25:39 -0400")
Message-ID: <877df1f2zk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48907
Cc: 48907 <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 (---)

Hi,

Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis:

> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:
>
> [...]
>
>>> Yikes!  This means that debugging with grafts (with the aid of debugging
>>> symbols) is no longer possible, right?
>>
>> It depends on whether the separate =E2=80=9Cdebug=E2=80=9D output gets g=
rafted or not,
>> but yeah, if a dependency tree has this shape (app -> lib + lib:debug),
>> running =E2=80=98guix install app=E2=80=99 alone will prevent you from g=
etting debugging
>> symbols from =E2=80=98lib:debug=E2=80=99 I believe.  That sucks.
>>
>> I wonder if we should revert 482fda2729c3e76999892cb8f9a0391a7bd37119.
>> It=E2=80=99s often not very helpful anyway (we often find ourselves down=
loading
>> unnecessary package outputs because of grafting).
>
> Hmm.  Perhaps.  But it'd also suck to have to download 1 GiB of unneeded
> debugging symbols to just apply a graft to Qt, for example.

Yeah.  That=E2=80=99s already the case in some cases though, that=E2=80=99s=
 what I
meant.

>>> I remember reading about a 2nd option to locate the separate debug
>>> symbol files with GDB in info '(gdb) Separate Debug Files':
>>>
>>>
>>>    * The executable contains a "build ID", a unique bit string that is
>>
>> We=E2=80=99d have to check if this is applicable.  Looking at the ld man=
ual
>> (info "(ld) Options"), it seems that the UUID =E2=80=9Cstyle=E2=80=9D is=
 ruled out
>> because it=E2=80=99s non-deterministic, and the md5 and sha1 styles would
>> require us to rewrite build IDs IIUC, similar to how we rewrite CRCs.
>
> Seems like it could work?  simark from #gdb says it should be
> deterministic for reproducible builds.  We'd need to fixup the grafted
> debug output, but they could being done in a separate derivation would
> no longer matter (as the debug symbols would be matched on a unique ID
> that is not linked to that derivation, not on their file name, which
> is).
>
> Did I get the above right?

To summarize, =E2=80=98.gnu_debuglink=E2=80=99 in executables/libraries con=
tains the
CRC of the debug file.

Conversely, IIUC what the =E2=80=9Cnormative parts of the output contents=
=E2=80=9D (info
"(ld) Options") really are, build IDs are computed on the code, not on
debug info.

But the problems remains the same I think: if you have
/gnu/store/abc=E2=80=A6/libfoo.so and /gnu/store/xyz=E2=80=A6/libfoo.so, ch=
ances are
that they are different due to embedded store file names, and thus get a
different build ID.

Am I right?

(BTW, I just noticed build IDs were also discussed at
<https://issues.guix.gnu.org/25752>.)

Ludo=E2=80=99.




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

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


Received: (at 48907) by debbugs.gnu.org; 28 Sep 2021 02:25:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 27 22:25:48 2021
Received: from localhost ([127.0.0.1]:43279 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mV2oW-0008KI-Bs
	for submit <at> debbugs.gnu.org; Mon, 27 Sep 2021 22:25:48 -0400
Received: from mail-qt1-f178.google.com ([209.85.160.178]:33571)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1mV2oU-0008K4-Pn
 for 48907 <at> debbugs.gnu.org; Mon, 27 Sep 2021 22:25:47 -0400
Received: by mail-qt1-f178.google.com with SMTP id x9so18699830qtv.0
 for <48907 <at> debbugs.gnu.org>; Mon, 27 Sep 2021 19:25:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=1dh27lAFuI/kaNJDNJq2dsQaIio1BiJ5R0tTDPyZvME=;
 b=jt3p8XbGmiNfbJsCkZhxcCCUfj+SxdMuxWVeO7Mv7mrCnF6utsarOL7vB8j3bVkHES
 MrC9ziauEMWriwvYQbQTFZjvKdbJtA4mkybFzl0YCamlTSTu+xGKeWHnaNZ0zfZZgp0M
 Uywuzb/TyLJJ9JgCMBChtVaBMBftzWRwdYhpoXinqrG2EIKOkw62eqnRpVu/9nisfR4o
 bZrYYqcd5JFWWmaf+T4/11/3panrOgpgEuTaFEOS89nlpdQJXF+Gdz89dk8h4L9aMg84
 evqgGDHCyJYECwCmDLrRBypCirS79KZNsCbuxg7KeY5QtMXXmGn83DkY6zZNrRNo88vM
 JdqA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=1dh27lAFuI/kaNJDNJq2dsQaIio1BiJ5R0tTDPyZvME=;
 b=hnePsN/8/TIewTY0IXg4/5jPbHyLMedcPGHioRRLDGpJOA8FJ5sTC8q3XO87YPDJ8w
 J7xDV5+b2BFfAooCOKmAv+K7GQhtGrppan523KegcEFFzl+SzHADwNDogC5H3cGCWxwl
 sfFphPJ8+/1GK4IulpGKlhr7Le3N876BtO862HHlwtcF97l8MDbC/S8ZQZtuR5Nh83M5
 91uhhPVUPJ6+cx+QOkYXOHvvNOMLpSQ6AXps6gVheEOve0tRxsIbXOC2cNG+fYqqFRbq
 DMlqRgNSp6motSP7s1EsP7ekpkKq0Ufzb8XlqpDqhbISnYRf0hqrqY4+wPUTr0+1shxP
 rIzw==
X-Gm-Message-State: AOAM5319lQgzC4nNgHGwQBK1H/ekE2Te9UchJHc4Tys4YdIruWreSSNA
 hpQq/47KKuUCUuT37CDUa9AdQ2dSCCA=
X-Google-Smtp-Source: ABdhPJxjuE8zDpdQF8FSXWs49plhwY8NLT7lfFQnEtzwgFswGF0fziWzAmEgUTZLidCBO4keVhEpwA==
X-Received: by 2002:ac8:7548:: with SMTP id b8mr3287725qtr.79.1632795941032;
 Mon, 27 Sep 2021 19:25:41 -0700 (PDT)
Received: from hurd (dsl-10-149-239.b2b2c.ca. [72.10.149.239])
 by smtp.gmail.com with ESMTPSA id j21sm12598751qkl.25.2021.09.27.19.25.40
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 27 Sep 2021 19:25:40 -0700 (PDT)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#48907: Grafts cause discrepancies in debug symbols file
 names (debug symbols missing in GDB).
References: <87r1hdtu4t.fsf@HIDDEN> <87eeczikq5.fsf@HIDDEN>
 <87ilyqk8jg.fsf_-_@HIDDEN> <87lf3mm560.fsf@HIDDEN>
Date: Mon, 27 Sep 2021 22:25:39 -0400
In-Reply-To: <87lf3mm560.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Fri, 24 Sep 2021 16:14:47 +0200")
Message-ID: <87v92lh1wc.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 48907
Cc: 48907 <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 (-)

Heya,

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

[...]

>> Yikes!  This means that debugging with grafts (with the aid of debugging
>> symbols) is no longer possible, right?
>
> It depends on whether the separate =E2=80=9Cdebug=E2=80=9D output gets gr=
afted or not,
> but yeah, if a dependency tree has this shape (app -> lib + lib:debug),
> running =E2=80=98guix install app=E2=80=99 alone will prevent you from ge=
tting debugging
> symbols from =E2=80=98lib:debug=E2=80=99 I believe.  That sucks.
>
> I wonder if we should revert 482fda2729c3e76999892cb8f9a0391a7bd37119.
> It=E2=80=99s often not very helpful anyway (we often find ourselves downl=
oading
> unnecessary package outputs because of grafting).

Hmm.  Perhaps.  But it'd also suck to have to download 1 GiB of unneeded
debugging symbols to just apply a graft to Qt, for example.

>> I remember reading about a 2nd option to locate the separate debug
>> symbol files with GDB in info '(gdb) Separate Debug Files':
>>
>>
>>    * The executable contains a "build ID", a unique bit string that is
>
> We=E2=80=99d have to check if this is applicable.  Looking at the ld manu=
al
> (info "(ld) Options"), it seems that the UUID =E2=80=9Cstyle=E2=80=9D is =
ruled out
> because it=E2=80=99s non-deterministic, and the md5 and sha1 styles would
> require us to rewrite build IDs IIUC, similar to how we rewrite CRCs.

Seems like it could work?  simark from #gdb says it should be
deterministic for reproducible builds.  We'd need to fixup the grafted
debug output, but they could being done in a separate derivation would
no longer matter (as the debug symbols would be matched on a unique ID
that is not linked to that derivation, not on their file name, which
is).

Did I get the above right?

Thanks,

Maxim




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

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


Received: (at 48907) by debbugs.gnu.org; 24 Sep 2021 14:14:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Sep 24 10:14:57 2021
Received: from localhost ([127.0.0.1]:58975 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mTlyb-0006yS-52
	for submit <at> debbugs.gnu.org; Fri, 24 Sep 2021 10:14:57 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50096)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1mTlyZ-0006yD-9q
 for 48907 <at> debbugs.gnu.org; Fri, 24 Sep 2021 10:14:55 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54734)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1mTlyU-0000Yl-5D; Fri, 24 Sep 2021 10:14:50 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=60464 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>)
 id 1mTlyT-0004i7-Sv; Fri, 24 Sep 2021 10:14:50 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: bug#48907: Grafts cause discrepancies in debug symbols file
 names (debug symbols missing in GDB).
References: <87r1hdtu4t.fsf@HIDDEN> <87eeczikq5.fsf@HIDDEN>
 <87ilyqk8jg.fsf_-_@HIDDEN>
Date: Fri, 24 Sep 2021 16:14:47 +0200
In-Reply-To: <87ilyqk8jg.fsf_-_@HIDDEN> (Maxim Cournoyer's message of "Thu, 
 23 Sep 2021 22:32:35 -0400")
Message-ID: <87lf3mm560.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48907
Cc: 48907 <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 (---)

Hi,

Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis:

> Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

[...]

>> This is due to the fact that, when you run =E2=80=98guix build jami-qt=
=E2=80=99, the
>> grafting derivation dismisses the =E2=80=9Cdebug=E2=80=9D output of qtde=
clarative, since
>> jami-qt does not depend on it.  That way it doesn=E2=80=99t have to
>> build/download and graft qtdeclarative:debug.

[...]

> Yikes!  This means that debugging with grafts (with the aid of debugging
> symbols) is no longer possible, right?

It depends on whether the separate =E2=80=9Cdebug=E2=80=9D output gets graf=
ted or not,
but yeah, if a dependency tree has this shape (app -> lib + lib:debug),
running =E2=80=98guix install app=E2=80=99 alone will prevent you from gett=
ing debugging
symbols from =E2=80=98lib:debug=E2=80=99 I believe.  That sucks.

I wonder if we should revert 482fda2729c3e76999892cb8f9a0391a7bd37119.
It=E2=80=99s often not very helpful anyway (we often find ourselves downloa=
ding
unnecessary package outputs because of grafting).

> I remember reading about a 2nd option to locate the separate debug
> symbol files with GDB in info '(gdb) Separate Debug Files':
>
>
>    * The executable contains a "build ID", a unique bit string that is

We=E2=80=99d have to check if this is applicable.  Looking at the ld manual
(info "(ld) Options"), it seems that the UUID =E2=80=9Cstyle=E2=80=9D is ru=
led out
because it=E2=80=99s non-deterministic, and the md5 and sha1 styles would
require us to rewrite build IDs IIUC, similar to how we rewrite CRCs.

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#48907; Package guix. Full text available.
Severity set to 'important' from 'normal' Request was from Ludovic Courtès <ludo@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 48907) by debbugs.gnu.org; 24 Sep 2021 02:32:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 23 22:32:46 2021
Received: from localhost ([127.0.0.1]:56344 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mTb14-0002ZR-2D
	for submit <at> debbugs.gnu.org; Thu, 23 Sep 2021 22:32:46 -0400
Received: from mail-qk1-f182.google.com ([209.85.222.182]:35798)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1mTb11-0002ZB-U6
 for 48907 <at> debbugs.gnu.org; Thu, 23 Sep 2021 22:32:44 -0400
Received: by mail-qk1-f182.google.com with SMTP id c7so26729976qka.2
 for <48907 <at> debbugs.gnu.org>; Thu, 23 Sep 2021 19:32:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=SD6pkl2qUv5lGU98DLyZGkWAeuiv74TJmM6+IiwedAw=;
 b=OmP6zOugnsOz/zP1ESrQohLJP0CEwDOOeMGdoRx0OMCagAPpC4pjcHky/p6x0PgTsZ
 /9H1rX6pf2c1oGizHtoz3g37CUygn5Uc/PFdonMAPrKm1sDehElHPHrmy1d9NWCTX0Xn
 MgENVkn0CPFgebWM+rXAjxujpttnkHto/fpbbptn7/dBUynUsPf39r1s++h4l25zRwOx
 wRVcjykyXNvkXBGMK204YzC2NxliCqSfr6xFBWFre9b9WViIc0uNr6BzVpX+PBKP9lio
 CPjU/VZowA0JN6nMw7x64U8CR61xxezNgueyel+uGT6ANjbADvJTjREvGOVMbhcMdla+
 9jDQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=SD6pkl2qUv5lGU98DLyZGkWAeuiv74TJmM6+IiwedAw=;
 b=PaM7qDfATlGNXZPKn5hwP+Nw/43CPDa/XxVz7/2/RxUK+gbGVVczBwtJPu4D2ObQSB
 8RCEhCo+66TWWMIUNu6FE6wg+VwjttTkIfYwBiShDrwCXbf3ciii5h8+Vg4MF5ZjpXSv
 fKz+u8GBdULn0QsbkVeTqV2+NH9VpS0kmAmkA7cqJB14cr4wN4MChXI+zeiMFi/J2VuH
 bAsa0575chEuvn4UXs9oGb/S7u4Zacpa2UFnnKHbzpl/GbeNUSrhvXSSClLP6JCWPKoc
 DtJt8+qew9KmvU1bLP+FWcpm2n0yL/yWrtZqm4sRPrvKovL1166bu6kzm0JECL6x9PQr
 G0Gw==
X-Gm-Message-State: AOAM533UrXzyJKZ17+OW/YgW6SeWYU5AZzZjgLxDeIc7mMy73km1IA8G
 yvG4i/7l6pcwxED8P9Dh5CxiRKJax8E=
X-Google-Smtp-Source: ABdhPJzaKPsW8Bw+fNUF6kGOxrbHrMZA6bUsrxxjQHkUAgRJ62ZtrHiRRY3oqsB7S1U+3RFdENg3Og==
X-Received: by 2002:ae9:ea19:: with SMTP id f25mr8350771qkg.341.1632450758041; 
 Thu, 23 Sep 2021 19:32:38 -0700 (PDT)
Received: from hurd (dsl-10-149-91.b2b2c.ca. [72.10.149.91])
 by smtp.gmail.com with ESMTPSA id 12sm4445927qtt.16.2021.09.23.19.32.36
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 23 Sep 2021 19:32:37 -0700 (PDT)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#48907: Grafts cause discrepancies in debug symbols file
 names (debug symbols missing in GDB).
References: <87r1hdtu4t.fsf@HIDDEN> <87eeczikq5.fsf@HIDDEN>
Date: Thu, 23 Sep 2021 22:32:35 -0400
In-Reply-To: <87eeczikq5.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Fri, 18 Jun 2021 11:29:54 +0200")
Message-ID: <87ilyqk8jg.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48907
Cc: 48907 <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 (-)

Hi!

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Hi,
>
> Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis:
>
>> $ guix build qtdeclarative | xargs -I{} find -L {} -name *libQt5Qml.so.5*
>> substitute: updating substitutes from 'http://127.0.0.1:8080'... 100.0%
>> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
>> The following files will be downloaded:
>>    /gnu/store/g1gxfbkyxilnx7s6mjdlj697y5n5wazn-qtdeclarative-5.15.2-debug
>>    /gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2
>> substituting /gnu/store/g1gxfbkyxilnx7s6mjdlj697y5n5wazn-qtdeclarative-5=
.15.2-debug...
>> downloading from https://ci.guix.gnu.org/nar/lzip/g1gxfbkyxilnx7s6mjdlj6=
97y5n5wazn-qtdeclarative-5.15.2-debug ...
>>  qtdeclarative-5.15.2-debug  94.9MiB                            1.2MiB/s=
 01:21 [##################] 100.0%
>>
>> The following graft will be made:
>>    /gnu/store/djhcai9rixm2j3jlamwdhsgwgidg7w74-qtdeclarative-5.15.2.drv
>> applying 2 grafts for /gnu/store/djhcai9rixm2j3jlamwdhsgwgidg7w74-qtdecl=
arative-5.15.2.drv ...
>> grafting '/gnu/store/g1gxfbkyxilnx7s6mjdlj697y5n5wazn-qtdeclarative-5.15=
.2-debug' -> '/gnu/store/l3h4ka7v3j1yhik0f1phwch08a09p0bx-qtdeclarative-5.1=
5.2-debug'...
>> grafting '/gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15=
.2' -> '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2'...
>> updating '.gnu_debuglink' CRC in '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6n=
wnywf-qtdeclarative-5.15.2/bin/qml'
>> updating '.gnu_debuglink' CRC in '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6n=
wnywf-qtdeclarative-5.15.2/bin/q
>> [...]
>> updating '.gnu_debuglink' CRC in '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6n=
wnywf-qtdeclarative-5.15.2/lib/qt5/qml/QtQuick/Window.2/libwindowplugin.so'
>> updating '.gnu_debuglink' CRC in '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6n=
wnywf-qtdeclarative-5.15.2/lib/qt5/qml/QtTest/libqmltestplugin.so'
>> successfully built /gnu/store/djhcai9rixm2j3jlamwdhsgwgidg7w74-qtdeclara=
tive-5.15.2.drv
>> /gnu/store/l3h4ka7v3j1yhik0f1phwch08a09p0bx-qtdeclarative-5.15.2-debug/l=
ib/debug/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/li=
b/libQt5Qml.so.5.15.2.debug
>> /gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/lib/lib=
Qt5Qml.so.5.15.2
>> /gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/lib/lib=
Qt5Qml.so.5
>> /gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/lib/lib=
Qt5Qml.so.5.15
>>
>>
>> So far so good.  The file hierarchy under the debug output matches the
>> actual shared library file name.  Next, let's verify which qtdeclarative
>> shared libraries jami-qt is dynamically linked against:
>>
>> $ guix build jami-qt | tail -1 | xargs -I{} ldd {}/bin/.jami-qt-real | g=
rep qtdeclarative
>>         libQt5QuickWidgets.so.5 =3D> /gnu/store/mjl02yma4r5xjark6d8pp5h2=
j0a2vccs-qtdeclarative-5.15.2/lib/libQt5QuickWidgets.so.5 (0x00007fb9e38a80=
00)
>>         libQt5Quick.so.5 =3D> /gnu/store/mjl02yma4r5xjark6d8pp5h2j0a2vcc=
s-qtdeclarative-5.15.2/lib/libQt5Quick.so.5 (0x00007fb9dba47000)
>>         libQt5QmlModels.so.5 =3D> /gnu/store/mjl02yma4r5xjark6d8pp5h2j0a=
2vccs-qtdeclarative-5.15.2/lib/libQt5QmlModels.so.5 (0x00007fb9db9c3000)
>>         libQt5Qml.so.5 =3D> /gnu/store/mjl02yma4r5xjark6d8pp5h2j0a2vccs-=
qtdeclarative-5.15.2/lib/libQt5Qml.so.5 (0x00007fb9dae4e000)
>
> This is due to the fact that, when you run =E2=80=98guix build jami-qt=E2=
=80=99, the
> grafting derivation dismisses the =E2=80=9Cdebug=E2=80=9D output of qtdec=
larative, since
> jami-qt does not depend on it.  That way it doesn=E2=80=99t have to
> build/download and graft qtdeclarative:debug.
>
> Conversely, when you run =E2=80=98guix build qtdeclarative=E2=80=99, it g=
rafts both
> outputs of qtdeclarative.  Thus, this grafting derivation is different
> from the one jami-qt.drv depends on.
>
> This behavior was implemented in commit
> 482fda2729c3e76999892cb8f9a0391a7bd37119.  Not sure what a good solution
> would be.
>
> Thoughts?

Yikes!  This means that debugging with grafts (with the aid of debugging
symbols) is no longer possible, right?

I remember reading about a 2nd option to locate the separate debug
symbol files with GDB in info '(gdb) Separate Debug Files':


   * The executable contains a "build ID", a unique bit string that is
     also present in the corresponding debug info file.  (This is
     supported only on some operating systems, when using the ELF or PE
     file formats for binary files and the GNU Binutils.)  For more
     details about this feature, see the description of the '--build-id'
     command-line option in *note Command Line Options: (ld)Options.
     The debug info file's name is not specified explicitly by the build
     ID, but can be computed from the build ID, see below.

   [...]
=20=20=20
   * For the "build ID" method, GDB looks in the '.build-id'
     subdirectory of each one of the global debug directories for a file
     named 'NN/NNNNNNNN.debug', where NN are the first 2 hex characters
     of the build ID bit string, and NNNNNNNN are the rest of the bit
     string.  (Real build ID strings are 32 or more hex characters, not
     10.)

What may help us here, compared to debug links, is that it seems to be
file name agnostic; the debug files would be matched by an internal ID
that they got at build time rather than from their file names (which
doesn't work with the current different derivations in the presence of
grafts).

Perhaps it'd also lift the need to recompute the CRC checksum of the
debug links produced when grafting!

HTH!

Maxim




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

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


Received: (at 48907) by debbugs.gnu.org; 18 Jun 2021 09:30:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Jun 18 05:30:04 2021
Received: from localhost ([127.0.0.1]:55773 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1luAp9-0004HA-JY
	for submit <at> debbugs.gnu.org; Fri, 18 Jun 2021 05:30:04 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53062)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1luAp7-0004GF-FD
 for 48907 <at> debbugs.gnu.org; Fri, 18 Jun 2021 05:30:02 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:48620)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1luAp2-0007PP-8w; Fri, 18 Jun 2021 05:29:56 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52960 helo=ribbon)
 by fencepost.gnu.org with esmtpsa
 (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1luAp1-0008Cn-I3; Fri, 18 Jun 2021 05:29:55 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
Subject: Re: bug#48907: Debug symbols file name discrepancies
References: <87r1hdtu4t.fsf@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 30 Prairial an 229 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Fri, 18 Jun 2021 11:29:54 +0200
In-Reply-To: <87r1hdtu4t.fsf@HIDDEN> (Maxim Cournoyer's message of "Mon, 07
 Jun 2021 14:19:30 -0400")
Message-ID: <87eeczikq5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 48907
Cc: 48907 <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 (---)

Hi,

Maxim Cournoyer <maxim.cournoyer@HIDDEN> skribis:

> $ guix build qtdeclarative | xargs -I{} find -L {} -name *libQt5Qml.so.5*
> substitute: updating substitutes from 'http://127.0.0.1:8080'... 100.0%
> substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
> The following files will be downloaded:
>    /gnu/store/g1gxfbkyxilnx7s6mjdlj697y5n5wazn-qtdeclarative-5.15.2-debug
>    /gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2
> substituting /gnu/store/g1gxfbkyxilnx7s6mjdlj697y5n5wazn-qtdeclarative-5.=
15.2-debug...
> downloading from https://ci.guix.gnu.org/nar/lzip/g1gxfbkyxilnx7s6mjdlj69=
7y5n5wazn-qtdeclarative-5.15.2-debug ...
>  qtdeclarative-5.15.2-debug  94.9MiB                            1.2MiB/s =
01:21 [##################] 100.0%
>
> The following graft will be made:
>    /gnu/store/djhcai9rixm2j3jlamwdhsgwgidg7w74-qtdeclarative-5.15.2.drv
> applying 2 grafts for /gnu/store/djhcai9rixm2j3jlamwdhsgwgidg7w74-qtdecla=
rative-5.15.2.drv ...
> grafting '/gnu/store/g1gxfbkyxilnx7s6mjdlj697y5n5wazn-qtdeclarative-5.15.=
2-debug' -> '/gnu/store/l3h4ka7v3j1yhik0f1phwch08a09p0bx-qtdeclarative-5.15=
.2-debug'...
> grafting '/gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.=
2' -> '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2'...
> updating '.gnu_debuglink' CRC in '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nw=
nywf-qtdeclarative-5.15.2/bin/qml'
> updating '.gnu_debuglink' CRC in '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nw=
nywf-qtdeclarative-5.15.2/bin/q
> [...]
> updating '.gnu_debuglink' CRC in '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nw=
nywf-qtdeclarative-5.15.2/lib/qt5/qml/QtQuick/Window.2/libwindowplugin.so'
> updating '.gnu_debuglink' CRC in '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nw=
nywf-qtdeclarative-5.15.2/lib/qt5/qml/QtTest/libqmltestplugin.so'
> successfully built /gnu/store/djhcai9rixm2j3jlamwdhsgwgidg7w74-qtdeclarat=
ive-5.15.2.drv
> /gnu/store/l3h4ka7v3j1yhik0f1phwch08a09p0bx-qtdeclarative-5.15.2-debug/li=
b/debug/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/lib=
/libQt5Qml.so.5.15.2.debug
> /gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/lib/libQ=
t5Qml.so.5.15.2
> /gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/lib/libQ=
t5Qml.so.5
> /gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/lib/libQ=
t5Qml.so.5.15
>
>
> So far so good.  The file hierarchy under the debug output matches the
> actual shared library file name.  Next, let's verify which qtdeclarative
> shared libraries jami-qt is dynamically linked against:
>
> $ guix build jami-qt | tail -1 | xargs -I{} ldd {}/bin/.jami-qt-real | gr=
ep qtdeclarative
>         libQt5QuickWidgets.so.5 =3D> /gnu/store/mjl02yma4r5xjark6d8pp5h2j=
0a2vccs-qtdeclarative-5.15.2/lib/libQt5QuickWidgets.so.5 (0x00007fb9e38a800=
0)
>         libQt5Quick.so.5 =3D> /gnu/store/mjl02yma4r5xjark6d8pp5h2j0a2vccs=
-qtdeclarative-5.15.2/lib/libQt5Quick.so.5 (0x00007fb9dba47000)
>         libQt5QmlModels.so.5 =3D> /gnu/store/mjl02yma4r5xjark6d8pp5h2j0a2=
vccs-qtdeclarative-5.15.2/lib/libQt5QmlModels.so.5 (0x00007fb9db9c3000)
>         libQt5Qml.so.5 =3D> /gnu/store/mjl02yma4r5xjark6d8pp5h2j0a2vccs-q=
tdeclarative-5.15.2/lib/libQt5Qml.so.5 (0x00007fb9dae4e000)

This is due to the fact that, when you run =E2=80=98guix build jami-qt=E2=
=80=99, the
grafting derivation dismisses the =E2=80=9Cdebug=E2=80=9D output of qtdecla=
rative, since
jami-qt does not depend on it.  That way it doesn=E2=80=99t have to
build/download and graft qtdeclarative:debug.

Conversely, when you run =E2=80=98guix build qtdeclarative=E2=80=99, it gra=
fts both
outputs of qtdeclarative.  Thus, this grafting derivation is different
from the one jami-qt.drv depends on.

This behavior was implemented in commit
482fda2729c3e76999892cb8f9a0391a7bd37119.  Not sure what a good solution
would be.

Thoughts?

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#48907; Package guix. Full text available.
Changed bug title to 'Grafts cause discrepancies in debug symbols file names (debug symbols missing in GDB).' from 'Debug symbols file name discrepancies' Request was from Maxim Cournoyer <maxim.cournoyer@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

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


Received: (at 48907) by debbugs.gnu.org; 7 Jun 2021 19:26:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 07 15:26:14 2021
Received: from localhost ([127.0.0.1]:56705 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lqKt4-0004dv-5Y
	for submit <at> debbugs.gnu.org; Mon, 07 Jun 2021 15:26:14 -0400
Received: from mail-qk1-f180.google.com ([209.85.222.180]:34585)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1lqKt2-0004dg-Ez
 for 48907 <at> debbugs.gnu.org; Mon, 07 Jun 2021 15:26:12 -0400
Received: by mail-qk1-f180.google.com with SMTP id k11so16217756qkk.1
 for <48907 <at> debbugs.gnu.org>; Mon, 07 Jun 2021 12:26:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:subject:references:date:in-reply-to:message-id:user-agent
 :mime-version; bh=WV7NkUZPHa9ugQaw4n12RJ8AlkWPsL6+iiAGbvma2Pg=;
 b=Sq5SLi4kNGFzG7ZFeuEdqG0nJVcKznh/b9Y/s+2jiN9cso9s1wKCF/IYKkOdu93lIw
 4mg4ZmM0OzSXSle4wgLVvjqIINkANcKJP16itB8PkEKHKSnO34IIFe5e3ReRoC4IB8Yl
 Ps2FZk76SyozC8Wz3XdHW+McU2o+TdJbK+0Jl6tDGv+IVarrK/y8AlIuFhLLFcJau3N3
 dvaRvFZC/6uZanvZOZL610r7leEMMb2EcB4eTeJfTSJJXm4N2b6XX3RYBXouQPxFkCk0
 GNbbzo+lgh3r09L+K4blj8E9cVfzlwG/FIJmEugPiXq0woMMbFJnyh9W1AgCvOVQOLNX
 gjDA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=WV7NkUZPHa9ugQaw4n12RJ8AlkWPsL6+iiAGbvma2Pg=;
 b=L96ZIO2YviIJ1Bc8ZVZxM+NWpvZ0zdMRwHLlWCDfkTLbs3juRkOaMM4VPB6Y7UyrC/
 St7wOve/SvOJ4l5Q+VTUcZAOtC8Ivg8RZJgl7ZnD36lXzjUd/FKZnuJqhQWWUrhU/Ig5
 DsZDdYVE8RAPCIRZq1CVmTsfJaVd2f8GCAvUbOuqT9NL0fAYwkUfN8TEC+ANQwVI1CC0
 APXJzbO+U3f99A70uJuudlQnrl+5usTdy35bntiQs0Lqx4OnK59iMBDnuZGbM1IlxgQr
 K3Wa5wX3Mh2PQ8+YpY9eThGgg0lHlUx0Ip/0cDXTc+wcj9MKj7mgGQwDHPOax8mioT+s
 SRXw==
X-Gm-Message-State: AOAM532Kcg9tUoemVvQ5nxVxrZpIt3GYrVDgG/DXua2rL1tTf4+WvFY+
 ADW26hHTj6L2wQwDFaOOQfwh7xg3gVY=
X-Google-Smtp-Source: ABdhPJxYN/hvuyAfoRK6HoWgosxgAznEWsXeb27lYEtSIfMOrDrp3nuBSieNwOFAumnb6utQfMz5PQ==
X-Received: by 2002:a37:b9c7:: with SMTP id
 j190mr18115617qkf.234.1623093966729; 
 Mon, 07 Jun 2021 12:26:06 -0700 (PDT)
Received: from hurd (dsl-153-212.b2b2c.ca. [66.158.153.212])
 by smtp.gmail.com with ESMTPSA id 64sm9256576qtc.95.2021.06.07.12.26.06
 for <48907 <at> debbugs.gnu.org>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 07 Jun 2021 12:26:06 -0700 (PDT)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: 48907 <at> debbugs.gnu.org
Subject: Re: bug#48907: Debug symbols file name discrepancies
References: <87r1hdtu4t.fsf@HIDDEN>
Date: Mon, 07 Jun 2021 15:26:05 -0400
In-Reply-To: <87r1hdtu4t.fsf@HIDDEN> (Maxim Cournoyer's message of "Mon, 07
 Jun 2021 14:19:30 -0400")
Message-ID: <87mts1tr1u.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 48907
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 again,

Building everything without grafts does resolve the file name
discrepancy issue, e.g.:

guix build --no-grafts qtdeclarative | xargs -I{} find -L {} -name *libQt5Qml.so.5*
/gnu/store/g1gxfbkyxilnx7s6mjdlj697y5n5wazn-qtdeclarative-5.15.2-debug/lib/debug/gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2/lib/libQt5Qml.so.5.15.2.debug
/gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2/lib/libQt5Qml.so.5
/gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2/lib/libQt5Qml.so.5.15
/gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2/lib/libQt5Qml.so.5.15.2

guix build --no-grafts jami-qt | tail -1 | xargs -I{} ldd {}/bin/.jami-qt-real | grep qtdeclarative
        libQt5QuickWidgets.so.5 => /gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2/lib/libQt5QuickWidgets.so.5 (0x00007f42c79b2000)
        libQt5Quick.so.5 => /gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2/lib/libQt5Quick.so.5 (0x00007f42bfb52000)
        libQt5QmlModels.so.5 => /gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2/lib/libQt5QmlModels.so.5 (0x00007f42bface000)
        libQt5Qml.so.5 => /gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2/lib/libQt5Qml.so.5 (0x00007f42bef59000)

And the debug symbols are now discovered and usable by GDB.  So this
issue is indeed caused by grafts.

Maxim




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

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


Received: (at submit) by debbugs.gnu.org; 7 Jun 2021 18:19:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jun 07 14:19:42 2021
Received: from localhost ([127.0.0.1]:56648 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lqJqc-0002zF-1b
	for submit <at> debbugs.gnu.org; Mon, 07 Jun 2021 14:19:42 -0400
Received: from lists.gnu.org ([209.51.188.17]:59022)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1lqJqZ-0002z6-B0
 for submit <at> debbugs.gnu.org; Mon, 07 Jun 2021 14:19:35 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47466)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1lqJqZ-0003p2-4o
 for bug-guix@HIDDEN; Mon, 07 Jun 2021 14:19:35 -0400
Received: from mail-qt1-x836.google.com ([2607:f8b0:4864:20::836]:35686)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1lqJqX-0002eB-5z
 for bug-guix@HIDDEN; Mon, 07 Jun 2021 14:19:34 -0400
Received: by mail-qt1-x836.google.com with SMTP id g12so959437qtb.2
 for <bug-guix@HIDDEN>; Mon, 07 Jun 2021 11:19:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:subject:date:message-id:mime-version;
 bh=PtWAtVSbsmY+8HIOWdVfJDTVz0hK5NRQ8iBtZeQKcio=;
 b=R6GRBs4Z54bzl8xXOtkuPKeqN1tvsYutWGAj8rSjF/h61t7OxdwS4IxFuLMA71tbdv
 FEgqnWWe6fg3Q63825htqQOejk3Ccs22Dj/xygla3nugUkxD+ncSGoA8lPJALro6JgzE
 L6xYnurO9iRA5JXAOXLC9WuRnyrMnKbVjEokpITn9NxJ78TFomt1xcdkP/GfF81ttLDY
 6lGbWdjH3m4alWqWtps1YyjCseDOK42kcDViMIl2S+OFjxLrWFMB0YNdy2nu4HyLl3/J
 6uK/CHbBcKKZ5g1jXo40NFZRBm/98lAjW3GMoCed3HxLYFjC4lx6ApEQAbwtWgOvDxG5
 u3Hg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=PtWAtVSbsmY+8HIOWdVfJDTVz0hK5NRQ8iBtZeQKcio=;
 b=GaK3tdA6zOD8vq5Asr20zFioKOe8wDrgwrs9RFnoTRzTEeR/tzPC/ARU7KxGshaF60
 F3MzVsvmWrajZ43EbuMwI+DVgf5d7J1a0Bs/88fe1ZktYJBmu5dJstblq6eZ+G9ni63P
 wVKbtkXttB/pHgfGT5HAs6qqfDNgJlmdJQ+uHsKgLFa0BVFS/N2JmGZatCMIMvfElEqq
 jnwKieyoZWEyrn13FVg/mTj9JyoZd8pUjRjAmE13y30pSdCAx0ixvUAyB5/P8SRUFagm
 yl9MQW8BX369vW48DvX7zpMmBxapV/5pG1iHrPfTpGdiwdlv7VfDCzdd9wiTs63ylXO2
 HbgA==
X-Gm-Message-State: AOAM533NQKFqPJhyJFmyHomPzuwfL2ogHRZZKFV5alXXacRPHy1x3D/B
 vZcQnMs1MgrpD5a2YDi5K39bpTgQ9qQ=
X-Google-Smtp-Source: ABdhPJw1xLRfEu7iqwb4fOk3RsBO4LwACCXVhb1+g6NBGB+nNO5eq757fzdlGJNNZMlpeZ/NSpTzQA==
X-Received: by 2002:ac8:7d0c:: with SMTP id g12mr2334159qtb.248.1623089971637; 
 Mon, 07 Jun 2021 11:19:31 -0700 (PDT)
Received: from hurd (dsl-153-212.b2b2c.ca. [66.158.153.212])
 by smtp.gmail.com with ESMTPSA id h19sm8090165qtq.5.2021.06.07.11.19.30
 for <bug-guix@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 07 Jun 2021 11:19:31 -0700 (PDT)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: bug-guix <bug-guix@HIDDEN>
Subject: Debug symbols file name discrepancies
Date: Mon, 07 Jun 2021 14:19:30 -0400
Message-ID: <87r1hdtu4t.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2607:f8b0:4864:20::836;
 envelope-from=maxim.cournoyer@HIDDEN; helo=mail-qt1-x836.google.com
X-Spam_score_int: -8
X-Spam_score: -0.9
X-Spam_bar: /
X-Spam_report: (-0.9 / 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, FREEMAIL_FROM=0.001,
 NUMERIC_HTTP_ADDR=1.242, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-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: -3.3 (---)

Hello,

While attempting to debug a crash in jami-qt, I've noticed that GDB
would fail to load the symbol tables of the shared libraries it uses,
for example qtdeclarative.

It seems that grafts are to blame.  Let's start by looking at the debug
files found for the qtdeclarative libQt5Qml.so.5 shared library:

--8<---------------cut here---------------start------------->8---
$ guix build qtdeclarative | xargs -I{} find -L {} -name *libQt5Qml.so.5*
substitute: updating substitutes from 'http://127.0.0.1:8080'... 100.0%
substitute: updating substitutes from 'https://ci.guix.gnu.org'... 100.0%
The following files will be downloaded:
   /gnu/store/g1gxfbkyxilnx7s6mjdlj697y5n5wazn-qtdeclarative-5.15.2-debug
   /gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2
substituting /gnu/store/g1gxfbkyxilnx7s6mjdlj697y5n5wazn-qtdeclarative-5.15.2-debug...
downloading from https://ci.guix.gnu.org/nar/lzip/g1gxfbkyxilnx7s6mjdlj697y5n5wazn-qtdeclarative-5.15.2-debug ...
 qtdeclarative-5.15.2-debug  94.9MiB                            1.2MiB/s 01:21 [##################] 100.0%

The following graft will be made:
   /gnu/store/djhcai9rixm2j3jlamwdhsgwgidg7w74-qtdeclarative-5.15.2.drv
applying 2 grafts for /gnu/store/djhcai9rixm2j3jlamwdhsgwgidg7w74-qtdeclarative-5.15.2.drv ...
grafting '/gnu/store/g1gxfbkyxilnx7s6mjdlj697y5n5wazn-qtdeclarative-5.15.2-debug' -> '/gnu/store/l3h4ka7v3j1yhik0f1phwch08a09p0bx-qtdeclarative-5.15.2-debug'...
grafting '/gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2' -> '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2'...
updating '.gnu_debuglink' CRC in '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/bin/qml'
updating '.gnu_debuglink' CRC in '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/bin/q
[...]
updating '.gnu_debuglink' CRC in '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/lib/qt5/qml/QtQuick/Window.2/libwindowplugin.so'
updating '.gnu_debuglink' CRC in '/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/lib/qt5/qml/QtTest/libqmltestplugin.so'
successfully built /gnu/store/djhcai9rixm2j3jlamwdhsgwgidg7w74-qtdeclarative-5.15.2.drv
/gnu/store/l3h4ka7v3j1yhik0f1phwch08a09p0bx-qtdeclarative-5.15.2-debug/lib/debug/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/lib/libQt5Qml.so.5.15.2.debug
/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/lib/libQt5Qml.so.5.15.2
/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/lib/libQt5Qml.so.5
/gnu/store/pryhgzb6cwnzsskqwldwc6dxr6nwnywf-qtdeclarative-5.15.2/lib/libQt5Qml.so.5.15
--8<---------------cut here---------------end--------------->8---

So far so good.  The file hierarchy under the debug output matches the
actual shared library file name.  Next, let's verify which qtdeclarative
shared libraries jami-qt is dynamically linked against:

--8<---------------cut here---------------start------------->8---
$ guix build jami-qt | tail -1 | xargs -I{} ldd {}/bin/.jami-qt-real | grep qtdeclarative
        libQt5QuickWidgets.so.5 => /gnu/store/mjl02yma4r5xjark6d8pp5h2j0a2vccs-qtdeclarative-5.15.2/lib/libQt5QuickWidgets.so.5 (0x00007fb9e38a8000)
        libQt5Quick.so.5 => /gnu/store/mjl02yma4r5xjark6d8pp5h2j0a2vccs-qtdeclarative-5.15.2/lib/libQt5Quick.so.5 (0x00007fb9dba47000)
        libQt5QmlModels.so.5 => /gnu/store/mjl02yma4r5xjark6d8pp5h2j0a2vccs-qtdeclarative-5.15.2/lib/libQt5QmlModels.so.5 (0x00007fb9db9c3000)
        libQt5Qml.so.5 => /gnu/store/mjl02yma4r5xjark6d8pp5h2j0a2vccs-qtdeclarative-5.15.2/lib/libQt5Qml.so.5 (0x00007fb9dae4e000)
--8<---------------cut here---------------end--------------->8---

Oops!  The actual store file name of the libQt5Qml.so.5 known to jami-qt
is *not* the same as the one obtained earlier, which explains why GDB
doesn't find its symbols.  Without grafts, the first command gives:

--8<---------------cut here---------------start------------->8---
$ guix build --no-grafts qtdeclarative | xargs -I{} find -L {} -name *libQt5Qml.so.5*
/gnu/store/g1gxfbkyxilnx7s6mjdlj697y5n5wazn-qtdeclarative-5.15.2-debug/lib/debug/gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2/lib/libQt5Qml.so.5.15.2.debug
/gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2/lib/libQt5Qml.so.5
/gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2/lib/libQt5Qml.so.5.15
/gnu/store/nvzvrr137qfqsn2875yrs9ilfd12wi96-qtdeclarative-5.15.2/lib/libQt5Qml.so.5.15.2
--8<---------------cut here---------------end--------------->8---

Which still doesn't match the libraries jami-qt is linked with.

I'm out of ideas for now.  Would someone have a clue?

Thank you!

Maxim




Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#48907; 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.