Re: Installing gcc debugging symbols?

2020-10-21 Thread Ludovic Courtès
Hi,

Simon South  skribis:

> Simon South  writes:
>> I could edit gnu/packages/gcc.scm to set the "stripped?" variable to
>> false...
>
> Of course if you're willing to make this change, you can just as easily
> remove the "hidden-package" wrapper around gcc 4.7's package definition
> and then install the debug symbols in the usual manner, i.e. with
>
>   ./pre-inst-env guix install gcc@7.5:debug
>
> At least, I assume this is going to work.
>
> Still, I wonder if there is a more "official" method that involves less
> hackery.

I’m afraid there’s no better method currently.  The new
‘--with-debug-info’ option wouldn’t help here since it’s compiled with
-g0 unless ‘stripped?’ is changed to #f.

We should make ‘stripped?’ a parameter somehow.

Ludo’.



Re: Installing gcc debugging symbols?

2020-10-01 Thread Simon South
Simon South  writes:
> I could edit gnu/packages/gcc.scm to set the "stripped?" variable to
> false...

Of course if you're willing to make this change, you can just as easily
remove the "hidden-package" wrapper around gcc 4.7's package definition
and then install the debug symbols in the usual manner, i.e. with

  ./pre-inst-env guix install gcc@7.5:debug

At least, I assume this is going to work.

Still, I wonder if there is a more "official" method that involves less
hackery.

-- 
Simon South
si...@simonsouth.net



Installing gcc debugging symbols?

2020-09-30 Thread Simon South
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
si...@simonsouth.net