From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id DdyLHu84TWHWlgAAgWs5BA (envelope-from ) for ; Fri, 24 Sep 2021 04:33:19 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 8JLCGe84TWFfdwAA1q6Kng (envelope-from ) for ; Fri, 24 Sep 2021 02:33:19 +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 8EE912DA98 for ; Fri, 24 Sep 2021 04:33:18 +0200 (CEST) Received: from localhost ([::1]:46236 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTb1X-0006RX-Ra for larch@yhetil.org; Thu, 23 Sep 2021 22:33:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55606) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTb1K-0006RH-Uu for bug-guix@gnu.org; Thu, 23 Sep 2021 22:33:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44798) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTb1J-00039Z-Sh for bug-guix@gnu.org; Thu, 23 Sep 2021 22:33:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mTb1J-0002Zx-Kc for bug-guix@gnu.org; Thu, 23 Sep 2021 22:33: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: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 24 Sep 2021 02:33: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 48907-submit@debbugs.gnu.org id=B48907.16324507669889 (code B ref 48907); Fri, 24 Sep 2021 02:33:01 +0000 Received: (at 48907) by debbugs.gnu.org; 24 Sep 2021 02:32:46 +0000 Received: from localhost ([127.0.0.1]:56344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mTb14-0002ZR-2D for submit@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 ) id 1mTb11-0002ZB-U6 for 48907@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@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 References: <87r1hdtu4t.fsf@gmail.com> <87eeczikq5.fsf@gnu.org> Date: Thu, 23 Sep 2021 22:32:35 -0400 In-Reply-To: <87eeczikq5.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Fri, 18 Jun 2021 11:29:54 +0200") Message-ID: <87ilyqk8jg.fsf_-_@gmail.com> 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=1632450798; 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:dkim-signature; bh=SD6pkl2qUv5lGU98DLyZGkWAeuiv74TJmM6+IiwedAw=; b=mS7RL8RAYouFfamqnh8x5mCDWVJiiZpGhHGx2eYfElm5ZTJ9zvUIR9qvGGCnM2hjQB4JwC DStXu85SKMUYPR79ectFZshKcwY0ldoUpQTNQ7Mpo2uR1v2qiB01bAcR2+zOYFmOc8Pu4c 6mEspKW4eEArlEyPBXUjtMYKAM8j6dVq/B1HPK7yf02cLDoWiOqqDehgeNQUTvB7/KQL42 EgEztNq5VslG3acwGWL9A+ezt3YdzMoG9yM+MAXeyPWXAFu1doiaqzOVPk/orbhio4E5Kt rpunCQBEIbmbQyUqJOlNEKlCkoY4c4OOIY5dfrphOnrWPBk6VLYgjPYQa/2xiA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1632450798; a=rsa-sha256; cv=none; b=gAZhYpxXvtXBtKmEKyaL754zdKCLmlZvE9Z+4I85ainPgTcOC1imKdkwOJrpsV8BVeKyl6 l1rP1/F0TMCZBqZ50PBsnvozW6m+QeHp2wHcBnGhZB7p5Z87PZimQGIBBcf4TOwCta0Nf+ zw2YuUfeqZ0rQvC/RYFqOInzQhG0qcO1OR3zDROgHyHk/7wodDF/djZ1d9DOBHZnDRNMRO Mak/XYM5KzKLqBDSVse3I+aioDtksdxDWqoH9IHhtwHEl+fJ1Q87z3oXw+PwOs+AiMZrFc 978YpVpuJg9DQlK9gRBgM5AAlYYZxgd2wUvZ3I5i2sRLXtCJ22gNReuj7rV6PQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=OmP6zOug; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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: -1.69 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=OmP6zOug; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=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-Queue-Id: 8EE912DA98 X-Spam-Score: -1.69 X-Migadu-Scanner: scn1.migadu.com X-TUID: VKIXBD/KQZ1F Hi! Ludovic Court=C3=A8s writes: > Hi, > > Maxim Cournoyer 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