Subject: [bug#63393] [PATCH 0/2] Fix libstdc++.so and gcc-toolchain

From: John Kehayias <[email-masked]>
Date: Wed, 03 Apr 2024 19:22:06 +0000

Hi everyone,

(And adding another CC for Isaac, where I think their message went just
to the debbugs address, which goes to no one. Another victim of needing
a "wide reply" which is easy from e.g. Emacs but not obvious especially
for people who don't interact with debbugs much as I can attest to in my
earlier days. Anyway, that's yet another issue to improve elsewhere.)

On Sun, Jul 16, 2023 at 06:33 PM, John Kehayias wrote:

> Hello,
>
> On Thu, May 11, 2023 at 03:38 PM, Ludovic Courtès wrote:
>
>> Hi,
>>
>> Simon Tournier <[email-masked]> skribis:
>>
>>> * gnu/packages/commencement.scm (make-gcc-toolchain): Add 'lib' outputs.
>>
>> [...]
>>
>>>                                      (filter-map (match-lambda
>>>                                                    (("libc-debug" . _) #f)
>>>                                                    (("libc-static" . _) #f)
>>> +                                                  (("gcc-lib" . _) #f)
>>> +                                                  (("gcc-debug" . _) #f)
>>
>> I would include gcc:lib in “out” (thus not adding a “lib” output to
>> ‘gcc-toolchain’).
>>
>> Yes, gcc:lib includes *.a and *.la, but those are already part of the
>> ‘gcc-toolchain’ closure:
>>
>> $ guix size gcc-toolchain |head -6
>> store item                                                       total    self
>> /gnu/store/jv78mm3dmr6fl2hhy1bkbhfpm702v3gq-gcc-12.3.0             292.6   169.4  41.2%
>> /gnu/store/zh4x65snfis7svs6906gj1z8i7dx2j3m-binutils-2.38           95.5    54.9  13.4%
>> /gnu/store/g8p09w6r78hhkl2rv1747pcp9zbk6fxv-guile-3.0.9            134.0    53.1  12.9%
>> /gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35              40.6    38.8   9.4%
>> /gnu/store/gmv6n5vy5qcsn71pkapg2hnknyn1p7g3-gcc-12.3.0-lib          76.8    36.2   8.8%
>>
>> However, I’d leave out gcc:debug because (0) it’s unrelated :-), (1)
>> ‘gcc-final’ has no “debug” output, and (2) it’s really for a niche
>> (folks developing compiler plugins, typically).
>>
>> I’d also leave out the /lib directory of Binutils, which is again rarely
>> useful.
>>
>> WDYT?
>>

To return to this, at the very least so I don't have to give the
incantation (which I got from someone else): guix shell -e '(list (@@
(gnu packages commencement) gcc) "lib")' to someone on IRC every few
days.

I'm sending a V2 of sorts, where it is the first patch from Simon (I had
to make a minor adjustment for it to apply cleanly now, please double
check!) and then my own very basic patch to solve the issue at hand:
just add gcc:lib to the inputs. I checked that building gcc-toolchain
works and includes libstdc++ and libgcc_s, which are the ones everyone
always asks about and assumes would be in gcc-toolchain.

What do we all think?

This is low impact and I don't think should negatively affect anything
so it would be great to get this pushed and close this finally :-)

Hope all is well!
John