Message ID | cover.1683650835.git.zimon.toutoune@gmail.com |
---|---|
Headers | show |
Series | Fix libstdc++.so and gcc-toolchain | expand |
Hi, I like the direction of this patch. However, if gcc-toolchain:lib is intended to provide the runtime libraries when the full compiler isn't needed, then I think the .a and .la files should be moved back to the main gcc-toolchain output (or a separate :static output) since they are for static linking and the .a files in particular can be sizeable. Cheers, Kaelyn
Hello, On Thu, May 11, 2023 at 03:38 PM, Ludovic Courtès wrote: > Hi, > > Simon Tournier <zimon.toutoune@gmail.com> 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? > I don't have any strong opinions on the organization here of these outputs, happy to defer to whatever others decide here. It would be nice to have this sorted and taken care of before we forget about it :) However, I think this message from Kaelyn only went to the bug number (just saw that as I went to reply here) so I'm including it here: On Tue, May 09, 2023 at 06:50 PM, Kaelyn wrote: > Hi, > > I like the direction of this patch. However, if gcc-toolchain:lib is > intended to provide the runtime libraries when the full compiler isn't > needed, then I think the .a and .la files should be moved back to the > main gcc-toolchain output (or a separate :static output) since they > are for static linking and the .a files in particular can be sizeable. > > Cheers, > Kaelyn
Hi, Is there anything I can do to help (a version of) this patch get over the line? I'm currently in a state when I want to use libgcc_s.so.1, which is only provided by gcc:lib, which doesn't set the library path properly. According to #25072, gcc-toolchain should support my use-case. Thanks, Isaac
Hello, John Kehayias <john.kehayias@protonmail.com> writes: > Hello, > > On Thu, May 11, 2023 at 03:38 PM, Ludovic Courtès wrote: > >> Hi, >> >> Simon Tournier <zimon.toutoune@gmail.com> 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% Moreover, the closure of 'gcc' itself, as can be found with: --8<---------------cut here---------------start------------->8--- $ guix size $(guix build -e '(@@ (gnu packages gcc) gcc)' | tail -n1 )' élément du dépôt total lui-même /gnu/store/hfppkc3p39rxrwd1g45n3239j9d0f8qd-gcc-11.3.0 267.8 146.1 54.5% /gnu/store/ln6hxqjvz6m9gdd9s97pivlqck7hzs99-glibc-2.35 40.6 38.8 14.5% /gnu/store/k9q9jxsqldxz0yl65rcgpnnncqwha2qi-gcc-11.3.0-lib 75.3 34.7 13.0% /gnu/store/6ncav55lbk5kqvwwflrzcr41hp5jbq0c-gcc-11.3.0-lib 75.3 34.7 13.0% /gnu/store/gdy0b065fk8wwxv49ln0c7892pam78z1-isl-0.24 83.2 5.2 1.9% /gnu/store/dpvr7rj89j7xdnzpjhhll8dpqh3fizz5-gmp-6.2.1 78.0 2.7 1.0% /gnu/store/4vn8m606saf5i3nvksgvl958c0i0nvsn-mpfr-4.2.0 80.2 2.2 0.8% /gnu/store/zzyywykw7kriln18rxqd82f0k5kidla7-bash-static-5.1.16 1.8 1.8 0.7% /gnu/store/v9p25q9l5nnaixkhpap5rnymmwbhf9rp-bash-minimal-5.1.16 41.6 1.0 0.4% /gnu/store/w55122b226ss928lxxg58plalah3xl9h-mpc-1.3.1 80.6 0.5 0.2% /gnu/store/hl6lb3irs8wrfv49fnirxshsq590pi9v-zlib-1.2.13 75.5 0.2 0.1% total : 267.8 Mio --8<---------------cut here---------------end--------------->8--- Shows that the main output of GCC already keeps a reference to its "lib" output within its closure. It seems we could merge "lib" back into "out" and simplify things?
Hi, Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > Shows that the main output of GCC already keeps a reference to its "lib" > output within its closure. It seems we could merge "lib" back into > "out" and simplify things? No, because most packages depend on gcc:lib and we wouldn’t want them to depend on all of gcc: --8<---------------cut here---------------start------------->8--- $ guix size grep store item total self /gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35 40.6 38.8 50.2% /gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib 75.3 34.7 44.9% /gnu/store/zzyywykw7kriln18rxqd82f0k5kidla7-bash-static-5.1.16 1.8 1.8 2.4% /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16 41.6 1.0 1.3% /gnu/store/ixr7c3jadiqg640b8pz3njqhhm5zzmvj-grep-3.8 77.2 0.9 1.2% total: 77.2 MiB $ guix size grep gcc guix size: package 'gcc' has been superseded by 'gcc-toolchain' store item total self /gnu/store/5lqhcv91ijy82p92ac6g5xw48l0lwwz4-gcc-11.3.0 223.6 148.1 43.0% /gnu/store/zh4x65snfis7svs6906gj1z8i7dx2j3m-binutils-2.38 95.5 54.9 16.0% /gnu/store/g8p09w6r78hhkl2rv1747pcp9zbk6fxv-guile-3.0.9 134.0 53.1 15.4% /gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35 40.6 38.8 11.3% /gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib 75.3 34.7 10.1% /gnu/store/5iklcps70c0sfkxvlrhg8jhf3q4h18bj-linux-libre-headers-5.15.49 5.9 5.9 1.7% /gnu/store/wlm2r1789qi5kg242kyk72ipr14xsc0n-libunistring-1.0 77.8 2.5 0.7% /gnu/store/zzyywykw7kriln18rxqd82f0k5kidla7-bash-static-5.1.16 1.8 1.8 0.5% /gnu/store/bmcbayp2prca1svm1d5livg4f477i452-pkg-config-0.29.2 76.4 1.1 0.3% /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16 41.6 1.0 0.3% /gnu/store/ixr7c3jadiqg640b8pz3njqhhm5zzmvj-grep-3.8 77.2 0.9 0.3% /gnu/store/575d59dd56fwiyjv58n0kjc24g3wi1ik-libgc-8.2.2 76.1 0.8 0.2% /gnu/store/gqld7hz5vm4g904g7nc77z7wzvdrrwyb-zlib-1.2.13 40.8 0.2 0.1% /gnu/store/q5k9xqnq9fvbvn17xymdvnckcwp8xlp9-libffi-3.4.4 75.5 0.2 0.1% /gnu/store/fzsz6gk7g5spr7j5jx5zh6rysd5r0n64-gcc-toolchain-11.3.0 343.4 0.1 0.0% /gnu/store/na1dpbbcxjaa3n8wkwrfpch476f90hlf-ld-wrapper-0 189.1 0.1 0.0% total: 344.3 MiB --8<---------------cut here---------------end--------------->8--- Ludo’.
Hi Ludo, Ludovic Courtès <ludo@gnu.org> writes: > Hi, > > Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis: > >> Shows that the main output of GCC already keeps a reference to its "lib" >> output within its closure. It seems we could merge "lib" back into >> "out" and simplify things? > > No, because most packages depend on gcc:lib and we wouldn’t want them to > depend on all of gcc: > > $ guix size grep > store item total self > /gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35 40.6 38.8 50.2% > /gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib 75.3 34.7 44.9% > /gnu/store/zzyywykw7kriln18rxqd82f0k5kidla7-bash-static-5.1.16 1.8 1.8 2.4% > /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16 41.6 1.0 1.3% > /gnu/store/ixr7c3jadiqg640b8pz3njqhhm5zzmvj-grep-3.8 77.2 0.9 1.2% > total: 77.2 MiB > $ guix size grep gcc > guix size: package 'gcc' has been superseded by 'gcc-toolchain' > store item total self > /gnu/store/5lqhcv91ijy82p92ac6g5xw48l0lwwz4-gcc-11.3.0 223.6 148.1 43.0% > /gnu/store/zh4x65snfis7svs6906gj1z8i7dx2j3m-binutils-2.38 95.5 54.9 16.0% > /gnu/store/g8p09w6r78hhkl2rv1747pcp9zbk6fxv-guile-3.0.9 134.0 53.1 15.4% > /gnu/store/gsjczqir1wbz8p770zndrpw4rnppmxi3-glibc-2.35 40.6 38.8 11.3% > /gnu/store/930nwsiysdvy2x5zv1sf6v7ym75z8ayk-gcc-11.3.0-lib 75.3 34.7 10.1% > /gnu/store/5iklcps70c0sfkxvlrhg8jhf3q4h18bj-linux-libre-headers-5.15.49 5.9 5.9 1.7% > /gnu/store/wlm2r1789qi5kg242kyk72ipr14xsc0n-libunistring-1.0 77.8 2.5 0.7% > /gnu/store/zzyywykw7kriln18rxqd82f0k5kidla7-bash-static-5.1.16 1.8 1.8 0.5% > /gnu/store/bmcbayp2prca1svm1d5livg4f477i452-pkg-config-0.29.2 76.4 1.1 0.3% > /gnu/store/rib9g2ig1xf3kclyl076w28parmncg4k-bash-minimal-5.1.16 41.6 1.0 0.3% > /gnu/store/ixr7c3jadiqg640b8pz3njqhhm5zzmvj-grep-3.8 77.2 0.9 0.3% > /gnu/store/575d59dd56fwiyjv58n0kjc24g3wi1ik-libgc-8.2.2 76.1 0.8 0.2% > /gnu/store/gqld7hz5vm4g904g7nc77z7wzvdrrwyb-zlib-1.2.13 40.8 0.2 0.1% > /gnu/store/q5k9xqnq9fvbvn17xymdvnckcwp8xlp9-libffi-3.4.4 75.5 0.2 0.1% > /gnu/store/fzsz6gk7g5spr7j5jx5zh6rysd5r0n64-gcc-toolchain-11.3.0 343.4 0.1 0.0% > /gnu/store/na1dpbbcxjaa3n8wkwrfpch476f90hlf-ld-wrapper-0 189.1 0.1 0.0% > total: 344.3 MiB Thanks for putting this into perspective. So out -> lib but lib != depend on out, which makes it useful to reduce the closure when used standalone.
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 <zimon.toutoune@gmail.com> 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
Hi John, John Kehayias <john.kehayias@protonmail.com> skribis: > 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? The two patches you sent LGTM. Thanks for getting the ball rolling! Ludo’.
On Wed, Apr 10, 2024 at 11:21 PM, Ludovic Courtès wrote: > Hi John, > > John Kehayias <john.kehayias@protonmail.com> skribis: > >> 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? > > The two patches you sent LGTM. Thanks for getting the ball rolling! > > Ludo’. Thanks everyone! Pushed as b47ae1ecc43baaf726701ab2d2f810ecfaa75428.