unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: 48907@debbugs.gnu.org
Subject: bug#48907: Grafts cause discrepancies in debug symbols file names (debug symbols missing in GDB).
Date: Mon, 04 Oct 2021 15:14:17 +0200	[thread overview]
Message-ID: <8735phq6dy.fsf@gnu.org> (raw)
In-Reply-To: <87v92lh1wc.fsf@gmail.com> (Maxim Cournoyer's message of "Mon, 27 Sep 2021 22:25:39 -0400")

Hi,

Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:

> Ludovic Courtès <ludo@gnu.org> 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 “debug” output gets grafted or not,
>> but yeah, if a dependency tree has this shape (app -> lib + lib:debug),
>> running ‘guix install app’ alone will prevent you from getting debugging
>> symbols from ‘lib:debug’ I believe.  That sucks.
>>
>> I wonder if we should revert 482fda2729c3e76999892cb8f9a0391a7bd37119.
>> It’s often not very helpful anyway (we often find ourselves downloading
>> 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’s already the case in some cases though, that’s 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’d have to check if this is applicable.  Looking at the ld manual
>> (info "(ld) Options"), it seems that the UUID “style” is ruled out
>> because it’s 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, ‘.gnu_debuglink’ in executables/libraries contains the
CRC of the debug file.

Conversely, IIUC what the “normative parts of the output contents” (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…/libfoo.so and /gnu/store/xyz…/libfoo.so, chances 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’.




  parent reply	other threads:[~2021-10-04 13:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 18:19 bug#48907: Debug symbols file name discrepancies Maxim Cournoyer
2021-06-07 19:26 ` Maxim Cournoyer
2021-06-18  9:29 ` Ludovic Courtès
2021-09-24  2:32   ` bug#48907: Grafts cause discrepancies in debug symbols file names (debug symbols missing in GDB) Maxim Cournoyer
2021-09-24 14:14     ` Ludovic Courtès
2021-09-28  2:25       ` Maxim Cournoyer
2021-09-28  9:45         ` Ludovic Courtès
2021-09-28 10:28           ` Ludovic Courtès
2021-10-04 13:14         ` Ludovic Courtès [this message]
2024-04-27  8:02           ` pelzflorian (Florian Pelz)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8735phq6dy.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=48907@debbugs.gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).