help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Installing gcc debugging symbols?


From: Simon South
Subject: Installing gcc debugging symbols?
Date: Wed, 30 Sep 2020 12:52:43 -0400

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 via email to

[Prev in Thread] Current Thread [Next in Thread]