From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id VgJoEoXkUmFXdAAAgWs5BA (envelope-from ) for ; Tue, 28 Sep 2021 11:46:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 8ClgDYXkUmG3JQAAbx9fmQ (envelope-from ) for ; Tue, 28 Sep 2021 09:46:45 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 92C0B2E5F1 for ; Tue, 28 Sep 2021 11:46:44 +0200 (CEST) Received: from localhost ([::1]:39814 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mV9hD-0003hb-Pp for larch@yhetil.org; Tue, 28 Sep 2021 05:46:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mV9gX-0003ek-VW for bug-guix@gnu.org; Tue, 28 Sep 2021 05:46:01 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mV9gX-00074L-NK for bug-guix@gnu.org; Tue, 28 Sep 2021 05:46:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mV9gX-0007N5-M7 for bug-guix@gnu.org; Tue, 28 Sep 2021 05:46:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#48907: Grafts cause discrepancies in debug symbols file names (debug symbols missing in GDB). Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 28 Sep 2021 09:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48907 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer Received: via spool by 48907-submit@debbugs.gnu.org id=B48907.163282234228310 (code B ref 48907); Tue, 28 Sep 2021 09:46:01 +0000 Received: (at 48907) by debbugs.gnu.org; 28 Sep 2021 09:45:42 +0000 Received: from localhost ([127.0.0.1]:43889 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mV9gE-0007MX-E6 for submit@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 ) id 1mV9gD-0007ML-3M for 48907@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 ) 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 ) id 1mV9fe-00051v-BD; Tue, 28 Sep 2021 05:45:24 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87r1hdtu4t.fsf@gmail.com> <87eeczikq5.fsf@gnu.org> <87ilyqk8jg.fsf_-_@gmail.com> <87lf3mm560.fsf@gnu.org> <87v92lh1wc.fsf@gmail.com> 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@gmail.com> (Maxim Cournoyer's message of "Mon, 27 Sep 2021 22:25:39 -0400") Message-ID: <877df1f2zk.fsf@gnu.org> 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 48907@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1632822404; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=ySkHq+3ztJOWX6CLbhQcx97gk0PMXDRN2iLG160Yu74=; b=RRmtaFck/qWZ4LzbJOQpdMXGRVEJjxczLQ53PrqrCMIcch7z0kF/vTFrxJeEKETvJl4c8j sPenCOx3YpLO0vWUKxjhSKaeFoXPpyFTOmb38a95Uo5ips40mtiCjGyVrC7s+KR+noXb7L Bih5WQujtuw3HKg69I3rEjyQW2gaKO8Y7PGBxbCmY6DZkwesCisYXcqmKOsB6zvKm/UtNb tx7LmK2f23TE7ONAYcRc7v1BRombf16djYcmbAuMB0A9DeZcwNHbeB1iBLYUusH37qlA/Z Akkq+Y76dDlziUkovaeCTbZ/tfcz8OeMdodOwnv7gu9+BJ7mLQvopAgMRqOmMg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632822404; a=rsa-sha256; cv=none; b=VTIvp0WKsxBlnaMj0PVSjicN1l9dOeZk5tql9VUSgDs59T+ohqh1iOFk2WNPpvTc1bOzTL 0GoXFhytQ9gTLYj0DAi/FWWseZGM16eAl3HlxVtPGz88JmBScptDvZCofSEmv+XERnGM9R C3lVKDW+RKSz37N00tIJfL+C/8UldNiBQfQmcwXgYQPbhChtNiFfjkaH3Nv9UqhWMqwxKE Dp3LcpG5NIFyhvO2NtWQ93c4tzciUOfoH8hk/itgnXgJICW+t93MtyhAg4/fJH1mJgog4r Xk1Qh6Q4RXdrIPRfbDZglnQrbmU5DB5u3SOe88DiB0xVbgRd3ZH794mf6qVMVw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.89 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 92C0B2E5F1 X-Spam-Score: -2.89 X-Migadu-Scanner: scn0.migadu.com X-TUID: ItE9zC9pL7ZY Hi, Maxim Cournoyer skribis: > Ludovic Court=C3=A8s 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 .) Ludo=E2=80=99.