all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* gcc-toolchain is missing libstdc++.so
@ 2023-05-04 14:46 Christopher Rodriguez
  2023-05-04 15:05 ` Christopher Rodriguez
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Christopher Rodriguez @ 2023-05-04 14:46 UTC (permalink / raw)
  To: bug-guix; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 548 bytes --]


Hello All,

I noticed today that libstdc++.so.1 (and some others), which used to be
part of gcc:lib, are not included in any of the outputs of the
superceding `gcc-toolchain` package.

Is there another method for getting these needed shared libraries in a
guix system at this point? It's entirely possible I'm missing something.

I am CCing guix-devel@gnu.org per podiki[m]'s request.

Thanks!

-- 
Christopher Rodriguez
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gcc-toolchain is missing libstdc++.so
  2023-05-04 14:46 gcc-toolchain is missing libstdc++.so Christopher Rodriguez
@ 2023-05-04 15:05 ` Christopher Rodriguez
  2023-05-04 15:26   ` bug#63267: " John Kehayias via Bug reports for GNU Guix
  2023-05-04 15:23 ` bug#63267: Possible Solution Christopher Rodriguez
  2023-05-04 17:34 ` bug#63267: gcc-toolchain is missing libstdc++.so John Kehayias via Bug reports for GNU Guix
  2 siblings, 1 reply; 11+ messages in thread
From: Christopher Rodriguez @ 2023-05-04 15:05 UTC (permalink / raw)
  To: Christopher Rodriguez; +Cc: 63267, guix-devel

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]


Sorry for the spam; Resending this without the bugs address, but with
the issue's address.

Christopher Rodriguez <yewscion@gmail.com> writes:

> [[PGP Signed Part:Undecided]]
>
> Hello All,
>
> I noticed today that libstdc++.so.1 (and some others), which used to be
> part of gcc:lib, are not included in any of the outputs of the
> superceding `gcc-toolchain` package.
>
> Is there another method for getting these needed shared libraries in a
> guix system at this point? It's entirely possible I'm missing something.
>
> I am CCing guix-devel@gnu.org per podiki[m]'s request.
>
> Thanks!

-- 

Christopher Rodriguez
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#63267: Possible Solution
  2023-05-04 14:46 gcc-toolchain is missing libstdc++.so Christopher Rodriguez
  2023-05-04 15:05 ` Christopher Rodriguez
@ 2023-05-04 15:23 ` Christopher Rodriguez
  2023-05-04 17:34 ` bug#63267: gcc-toolchain is missing libstdc++.so John Kehayias via Bug reports for GNU Guix
  2 siblings, 0 replies; 11+ messages in thread
From: Christopher Rodriguez @ 2023-05-04 15:23 UTC (permalink / raw)
  To: 63267

[-- Attachment #1: Type: text/plain, Size: 715 bytes --]


Just spun up a different solution in my personal channel, creating a
package "gcc-unhidden" which inherits from the hidden gcc package and
uses (properties (alist-delete 'hidden?  (package-properties gcc))) to
expose it. If the standard use-case—what is expected for most
uses—doesn't require these libraries, maybe it would be better to create
a dedicated package for the edge cases that might need it?



(define-public gcc-unhidden
  (package
   (inherit gcc)
   (name "gcc-unhidden")
   (properties (alist-delete 'hidden? (package-properties gcc)))))

-- 
Christopher Rodriguez
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#63267: gcc-toolchain is missing libstdc++.so
  2023-05-04 15:05 ` Christopher Rodriguez
@ 2023-05-04 15:26   ` John Kehayias via Bug reports for GNU Guix
  2023-05-04 17:33     ` Kaelyn
  0 siblings, 1 reply; 11+ messages in thread
From: John Kehayias via Bug reports for GNU Guix @ 2023-05-04 15:26 UTC (permalink / raw)
  To: Christopher Rodriguez; +Cc: guix-devel, 63267

Hi Christopher,

On Thu, May 04, 2023 at 11:05 AM, Christopher Rodriguez wrote:
>
> Sorry for the spam; Resending this without the bugs address, but with
> the issue's address.
>
> Christopher Rodriguez <yewscion@gmail.com> writes:
>
>>
>> Hello All,
>>
>> I noticed today that libstdc++.so.1 (and some others), which used to be
>> part of gcc:lib, are not included in any of the outputs of the
>> superceding `gcc-toolchain` package.
>>
>> Is there another method for getting these needed shared libraries in a
>> guix system at this point? It's entirely possible I'm missing something.
>>
>> I am CCing guix-devel@gnu.org per podiki[m]'s request.
>>
>> Thanks!

Thanks for opening this and cc'ing; this has come up with some
frequency on IRC, especially recently. In discussing there today, the
current reasoning is that usually one will just call g++ which knows
how to find libstdc++. So, gcc-toolchain does not include gcc:lib as
part of what it makes available.

I think what we (and when this comes up, others) are getting at are
some edge cases or different use cases where one wants to directly get
at libstdc++. Previously it was more direct to use gcc:lib; of course
one still can in code and/or cli with the proper call. For example,
guix build -e "(@@ (gnu packages gcc) gcc)" will download/build/show
the lib output of the (hidden) gcc package. Though I'm not sure how to
select just the lib output here.

My use case currently is in the FHS container where a binary wants to
find some libraries directly. Previously one would include the gcc:lib
package output in the guix shell call. Now some of those libraries can
be found elsewhere, like libgccjit, but libstdc++ seems to be the
trickier one. Open to other suggestions/workarounds, or thoughts on if
it is worthwhile to include gcc:lib in the gcc-toolchain package (or
make a gcc-toolchain:lib output?).

Thanks all!
John





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gcc-toolchain is missing libstdc++.so
  2023-05-04 15:26   ` bug#63267: " John Kehayias via Bug reports for GNU Guix
@ 2023-05-04 17:33     ` Kaelyn
  2023-05-04 18:14       ` Katherine Cox-Buday
  0 siblings, 1 reply; 11+ messages in thread
From: Kaelyn @ 2023-05-04 17:33 UTC (permalink / raw)
  To: John Kehayias; +Cc: Christopher Rodriguez, 63267, guix-devel

Hi,

------- Original Message -------
On Thursday, May 4th, 2023 at 3:26 PM, John Kehayias <john.kehayias@protonmail.com> wrote:

> 
> Hi Christopher,
> 
> On Thu, May 04, 2023 at 11:05 AM, Christopher Rodriguez wrote:
> 
> > Sorry for the spam; Resending this without the bugs address, but with
> > the issue's address.
> > 
> > Christopher Rodriguez yewscion@gmail.com writes:
> > 
> > > Hello All,
> > > 
> > > I noticed today that libstdc++.so.1 (and some others), which used to be
> > > part of gcc:lib, are not included in any of the outputs of the
> > > superceding `gcc-toolchain` package.
> > > 
> > > Is there another method for getting these needed shared libraries in a
> > > guix system at this point? It's entirely possible I'm missing something.
> > > 
> > > I am CCing guix-devel@gnu.org per podiki[m]'s request.
> > > 
> > > Thanks!
> 
> 
> Thanks for opening this and cc'ing; this has come up with some
> frequency on IRC, especially recently. In discussing there today, the
> current reasoning is that usually one will just call g++ which knows
> how to find libstdc++. So, gcc-toolchain does not include gcc:lib as
> part of what it makes available.
> 
> I think what we (and when this comes up, others) are getting at are
> some edge cases or different use cases where one wants to directly get
> at libstdc++. Previously it was more direct to use gcc:lib; of course
> one still can in code and/or cli with the proper call. For example,
> guix build -e "(@@ (gnu packages gcc) gcc)" will download/build/show
> the lib output of the (hidden) gcc package. Though I'm not sure how to
> select just the lib output here.
> 
> My use case currently is in the FHS container where a binary wants to
> find some libraries directly. Previously one would include the gcc:lib
> package output in the guix shell call. Now some of those libraries can
> be found elsewhere, like libgccjit, but libstdc++ seems to be the
> trickier one. Open to other suggestions/workarounds, or thoughts on if
> it is worthwhile to include gcc:lib in the gcc-toolchain package (or
> make a gcc-toolchain:lib output?).

I have similar use cases of FHS containers to run binaries (primarily games). I recently ran into the issue of gcc:lib going away and no output from a visible package providing libstdc++. My current workaround was to implement a replacement for specifications->manifest that could handle packages and '(package "output") pairs in addition to strings, so that I could include `(,(@@ (gnu packages gcc) gcc) "lib") in place of "gcc:lib". Internally it resolves package strings to packages with specification->package, then passes the package and optional output specifier to package->manifest-entry. But I digress a little...

Regarding solutions, I would prefer to have libstdc++ in it's own package or output rather than bundled into gcc-toolchain:out; it feels messy and against the grain of isolating programs in containers if I have to make the gcc and g++ compilers available in the container in order to run a program that needs libstdc++.

Cheers,
Kaelyn



^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#63267: gcc-toolchain is missing libstdc++.so
  2023-05-04 14:46 gcc-toolchain is missing libstdc++.so Christopher Rodriguez
  2023-05-04 15:05 ` Christopher Rodriguez
  2023-05-04 15:23 ` bug#63267: Possible Solution Christopher Rodriguez
@ 2023-05-04 17:34 ` John Kehayias via Bug reports for GNU Guix
  2023-05-09 17:07   ` Simon Tournier
  2 siblings, 1 reply; 11+ messages in thread
From: John Kehayias via Bug reports for GNU Guix @ 2023-05-04 17:34 UTC (permalink / raw)
  To: Christopher Rodriguez; +Cc: guix-devel, 63267

Hi again,

On Thu, May 04, 2023 at 11:19 AM, John Kehayias wrote:

> Thanks for opening this and cc'ing; this has come up with some
> frequency on IRC, especially recently. In discussing there today, the
> current reasoning is that usually one will just call g++ which knows
> how to find libstdc++. So, gcc-toolchain does not include gcc:lib as
> part of what it makes available.
>

I tried locally just adding gcc:lib as an input for gcc-toolchain and
that does the trick. And since it is just a union-build, very quick to
try out :)

guix size reports an increase in gcc-toolchain as 0.1 MiB with gcc:lib
included.

> I think what we (and when this comes up, others) are getting at are
> some edge cases or different use cases where one wants to directly get
> at libstdc++. Previously it was more direct to use gcc:lib; of course
> one still can in code and/or cli with the proper call. For example,
> guix build -e "(@@ (gnu packages gcc) gcc)" will download/build/show
> the lib output of the (hidden) gcc package. Though I'm not sure how to
> select just the lib output here.
>
> My use case currently is in the FHS container where a binary wants to
> find some libraries directly. Previously one would include the gcc:lib
> package output in the guix shell call. Now some of those libraries can
> be found elsewhere, like libgccjit, but libstdc++ seems to be the
> trickier one. Open to other suggestions/workarounds, or thoughts on if
> it is worthwhile to include gcc:lib in the gcc-toolchain package (or
> make a gcc-toolchain:lib output?).
>

I tried with my local gcc-toolchain modification and this gets me what
I wanted.

On that note, I forgot to bring up the problem I had with using
make-libstdc++: it does not seem to build the same libstdc++ as
included in the gcc package. The doc string for that procedure notes
that this is meant to be used when using non-gcc toolchains, but we
also have the libstdc++ variable which seems to suggest that
(make-libstdc++ gcc) should be the same library as in gcc.

I'm not sure the difference in looking at the package definitions, but
I don't really know this stuff. Here's an example of the difference I
was finding:

I was running something and it complained that

--8<---------------cut here---------------start------------->8---
<some-binary> symbol lookup error: <some-binary>: undefined symbol: _ZNSt18condition_variableD1Ev, version GLIBCXX_3.4.11
--8<---------------cut here---------------end--------------->8---

Indeed, looking at the libstdc++ I used via (or could have used
libstdc++ here directly since I used the default gcc):

--8<---------------cut here---------------start------------->8---
guix shell -e "(begin (use-modules (gnu packages gcc)) (make-libstdc++ gcc))"
--8<---------------cut here---------------end--------------->8---

I see

--8<---------------cut here---------------start------------->8---
$strings /gnu/store/6897bpw5858bdng744ddqw8rrqjb4frr-libstdc++-11.3.0/lib/libstdc++.so | grep "_ZNSt18condition_variableD1Ev"
--8<---------------cut here---------------end--------------->8---

while for gcc:lib it is defined

--8<---------------cut here---------------start------------->8---
$ strings /gnu/store/l684qgqlrqkbsh8jffp9d8ag6vrpcwgs-gcc-11.3.0-lib/lib/libstdc++.so | grep "_ZNSt18condition_variableD1Ev"
_ZNSt18condition_variableD1Ev
--8<---------------cut here---------------end--------------->8---

and using that libstdc++ does not result in that error.

Is make-libstdc++ not meant to be used/mixed with e.g. gcc-toolchain?
Is this expected that it is a different library produced or is this a
bug?

Thanks!
John





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: gcc-toolchain is missing libstdc++.so
  2023-05-04 17:33     ` Kaelyn
@ 2023-05-04 18:14       ` Katherine Cox-Buday
  0 siblings, 0 replies; 11+ messages in thread
From: Katherine Cox-Buday @ 2023-05-04 18:14 UTC (permalink / raw)
  To: Kaelyn, John Kehayias; +Cc: Christopher Rodriguez, 63267, guix-devel

On 5/4/23 11:33 AM, Kaelyn wrote:

> Regarding solutions, I would prefer to have libstdc++ in it's own package or output rather than bundled into gcc-toolchain:out; it feels messy and against the grain of isolating programs in containers if I have to make the gcc and g++ compilers available in the container in order to run a program that needs libstdc++.

+1. I recently ran into this as well and went looking for it.

I think a good reason to give libstdc++ its own output is that this 
question continually gets asked.

--
Katherine



^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#63267: gcc-toolchain is missing libstdc++.so
  2023-05-05 23:59     ` Kaelyn
@ 2023-05-08  8:41       ` Josselin Poiret via Bug reports for GNU Guix
  0 siblings, 0 replies; 11+ messages in thread
From: Josselin Poiret via Bug reports for GNU Guix @ 2023-05-08  8:41 UTC (permalink / raw)
  To: Kaelyn, John Kehayias; +Cc: guix-devel, 63267

[-- Attachment #1: Type: text/plain, Size: 615 bytes --]

Hi Kaelyn,

Kaelyn via Bug reports for GNU Guix <bug-guix@gnu.org> writes:

> Thanks! A small side note: I have glibc in there mainly so ldd is available for debugging problems or getting new binaries working (I think the comment with it is a remnant of an older version of the manifest from before "-F" was added to "guix shell").

Small note: `ldd` is only a wrapper around setting
`LD_TRACE_LOADED_OBJECTS=1`, so you don't really need to pull in all of
glibc just for this.  There's also LD_DEBUG with possible values
explained by LD_DEBUG=help, which I use quite often.

Best,
-- 
Josselin Poiret

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 682 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug#63267: gcc-toolchain is missing libstdc++.so
  2023-05-04 17:34 ` bug#63267: gcc-toolchain is missing libstdc++.so John Kehayias via Bug reports for GNU Guix
@ 2023-05-09 17:07   ` Simon Tournier
  2024-04-17  5:21     ` John Kehayias via Bug reports for GNU Guix
  0 siblings, 1 reply; 11+ messages in thread
From: Simon Tournier @ 2023-05-09 17:07 UTC (permalink / raw)
  To: John Kehayias, Christopher Rodriguez
  Cc: guix-devel, 63267, Katherine Cox-Buday, Kaelyn,
	Josselin Poiret via Bug reports for GNU Guix

Hi,

I am proposing patch#63393 [1] which adds the output lib to
gcc-toolchain.  Well, quoting the comment:

      ;; The main raison d'être of this "meta-package" is (1) to conveniently
      ;; install everything that we need, and (2) to make sure ld-wrapper comes
      ;; before Binutils' ld in the user's profile.

I think, this package gcc-toolchain should be the visible package and
battery included.

WDYT?

1: https://issues.guix.gnu.org/issue/63393

Cheers,
simon


^ permalink raw reply	[flat|nested] 11+ messages in thread

* bug#63267: gcc-toolchain is missing libstdc++.so
  2023-05-09 17:07   ` Simon Tournier
@ 2024-04-17  5:21     ` John Kehayias via Bug reports for GNU Guix
  2024-04-22  0:14       ` Simon Tournier
  0 siblings, 1 reply; 11+ messages in thread
From: John Kehayias via Bug reports for GNU Guix @ 2024-04-17  5:21 UTC (permalink / raw)
  To: Simon Tournier
  Cc: guix-devel, cox.katherine.e, Christopher Rodriguez, kaelyn.alexi,
	63267-done

Hi everyone,

Apologies for the long delay on this.

On Tue, May 09, 2023 at 07:07 PM, Simon Tournier wrote:

> Hi,
>
> I am proposing patch#63393 [1] which adds the output lib to
> gcc-toolchain.  Well, quoting the comment:
>
>       ;; The main raison d'être of this "meta-package" is (1) to conveniently
>       ;; install everything that we need, and (2) to make sure ld-wrapper comes
>       ;; before Binutils' ld in the user's profile.
>
> I think, this package gcc-toolchain should be the visible package and
> battery included.
>
> WDYT?
>
> 1: https://issues.guix.gnu.org/issue/63393
>
> Cheers,
> simon

I've just pushed, as b47ae1ecc43baaf726701ab2d2f810ecfaa75428, the
patches from that issue (the first from simon, the second my simplified
one just adding gcc:lib to gcc-toolchain).

This should fix the original bug here, so I am closing. However, it was
raised here and in 63393 about alternatives in how we use gcc-toolchain
outputs. As well as the issue I ran into about make-libstdc++.

So, if anyone would like to change anything from the new status quo,
please open a new issue. At least now we are working from a better
default I would say, with gcc-toolchain including the libraries from
gcc:lib.

Thanks all,
John





^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: bug#63267: gcc-toolchain is missing libstdc++.so
  2024-04-17  5:21     ` John Kehayias via Bug reports for GNU Guix
@ 2024-04-22  0:14       ` Simon Tournier
  0 siblings, 0 replies; 11+ messages in thread
From: Simon Tournier @ 2024-04-22  0:14 UTC (permalink / raw)
  To: John Kehayias
  Cc: guix-devel, cox.katherine.e, Christopher Rodriguez, kaelyn.alexi,
	63267-done

Hi,

On mer., 17 avril 2024 at 05:21, John Kehayias via Bug reports for GNU Guix <bug-guix@gnu.org> wrote:

> I've just pushed, as b47ae1ecc43baaf726701ab2d2f810ecfaa75428,

Cool!  Thank you for crossing the finish line.

Cheers,
simon


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-04-22 13:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-04 14:46 gcc-toolchain is missing libstdc++.so Christopher Rodriguez
2023-05-04 15:05 ` Christopher Rodriguez
2023-05-04 15:26   ` bug#63267: " John Kehayias via Bug reports for GNU Guix
2023-05-04 17:33     ` Kaelyn
2023-05-04 18:14       ` Katherine Cox-Buday
2023-05-04 15:23 ` bug#63267: Possible Solution Christopher Rodriguez
2023-05-04 17:34 ` bug#63267: gcc-toolchain is missing libstdc++.so John Kehayias via Bug reports for GNU Guix
2023-05-09 17:07   ` Simon Tournier
2024-04-17  5:21     ` John Kehayias via Bug reports for GNU Guix
2024-04-22  0:14       ` Simon Tournier
  -- strict thread matches above, loose matches on Subject: below --
2023-05-04 21:50 John Kehayias
2023-05-04 23:45 ` Kaelyn
2023-05-05 20:59   ` John Kehayias
2023-05-05 23:59     ` Kaelyn
2023-05-08  8:41       ` bug#63267: " Josselin Poiret via Bug reports for GNU Guix

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.