unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Simon South <simon@simonsouth.net>
To: help-guix@gnu.org
Subject: Installing gcc debugging symbols?
Date: Wed, 30 Sep 2020 12:52:43 -0400	[thread overview]
Message-ID: <871rijgqas.fsf@simonsouth.net> (raw)

Is there a way to install debugging information for gcc, as one can for
glibc and other packages?

I'm trying to test a change to Knot 3.0.0 and have found that gcc takes
forever to finish linking (and usually crashes from running out of
memory) when building the package using "guix build knot". Meanwhile, if
I build the source "manually", from within "guix environment --pure
knot", everything works fine.

I'd like to diagnose this but connecting to the running gcc instance
using gdb doesn't reveal much without gcc's debugging information
available.

I've tried "guix install gcc-toolchain@7.5:debug" but that installs
debugging information for only glibc.

I could edit gnu/packages/gcc.scm to set the "stripped?" variable to
false and rebuild gcc so its debugging symbols are preserved, but then
it's not clear how to install them. It seems I can build and install gcc
itself with

  guix package --install-from-expression='(@ (gnu packages gcc) gcc-7)'

but what I really want is

  guix package --install-from-expression='(@ (gnu packages gcc) (list gcc-7 "debug"))'

This fails with a syntax error, however, and I see the documentation for
"guix package" says

   Note that this option installs the first output of the specified
   package, which may be insufficient when needing a specific output of
   a multiple-output package.

Is there a trick to making this work?

-- 
Simon South
simon@simonsouth.net


             reply	other threads:[~2020-09-30 17:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 16:52 Simon South [this message]
2020-10-01 12:10 ` Installing gcc debugging symbols? Simon South
2020-10-21 22:01   ` Ludovic Courtès

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=871rijgqas.fsf@simonsouth.net \
    --to=simon@simonsouth.net \
    --cc=help-guix@gnu.org \
    /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.
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).