all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Choosing C++ library versions in Guix
@ 2025-01-06 17:27 Daniel Hatton
  2025-01-07 18:14 ` Fredrik Salomonsson
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Hatton @ 2025-01-06 17:27 UTC (permalink / raw)
  To: Guix help list


[-- Attachment #1.1: Type: text/plain, Size: 1153 bytes --]


On my Guix system, I'm trying to install an Octave package (struct) 
using Octave's internal "pkg install" tool (since the conclusion from 
thread 
<https://lists.gnu.org/archive/html/help-guix/2025-01/msg00001.html> 
seems to be that the Octave packages I want are not available in the 
Guix repositories).

The process fails with the error message

/gnu/store/zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/libstdc++.so.6: 
version `GLIBCXX_3.4.32' not found (required by 
/home/dan/.local/share/octave/api-v59/packages/struct-1.0.18/x86_64-unknown-linux-gnu-api-v59/cell2fields.oct).

I think the fundamental problem is that the process shouldn't be 
pointing to gcc/glibc 11.4.0, because the only libstdc++.so.6 I have 
anywhere under $(HOME)/.guix-profile is more recent (14.2.0).  But then, 
I wasn't expecting the process to be trying to compile any C++ code at 
all, so what do I know?  Any ideas how to sort this, please?

-- 

Kind regards,

Dan Hatton

                 Dr. Daniel C. Hatton

E-mail:         dan.hatton@btinternet.com

SIP:            dan.hatton@sip.linphone.org
Signal:         dch.28


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

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

* Re: Choosing C++ library versions in Guix
  2025-01-06 17:27 Choosing C++ library versions in Guix Daniel Hatton
@ 2025-01-07 18:14 ` Fredrik Salomonsson
  2025-01-08 14:00   ` Daniel Hatton
  0 siblings, 1 reply; 3+ messages in thread
From: Fredrik Salomonsson @ 2025-01-07 18:14 UTC (permalink / raw)
  To: Daniel Hatton, Guix help list


Hi Daniel,

Daniel Hatton <dan.hatton@btinternet.com> writes:

> On my Guix system, I'm trying to install an Octave package (struct) 
> using Octave's internal "pkg install" tool (since the conclusion from 
> thread 
> <https://lists.gnu.org/archive/html/help-guix/2025-01/msg00001.html> 
> seems to be that the Octave packages I want are not available in the 
> Guix repositories).
>
> The process fails with the error message
>
> /gnu/store/zzpbp6rr43smwxzvzd4qd317z5j7qblj-gcc-11.4.0-lib/lib/libstdc++.so.6: 
> version `GLIBCXX_3.4.32' not found (required by 
> /home/dan/.local/share/octave/api-v59/packages/struct-1.0.18/x86_64-unknown-linux-gnu-api-v59/cell2fields.oct).
>
> I think the fundamental problem is that the process shouldn't be 
> pointing to gcc/glibc 11.4.0, because the only libstdc++.so.6 I have 
> anywhere under $(HOME)/.guix-profile is more recent (14.2.0).  But then, 
> I wasn't expecting the process to be trying to compile any C++ code at 
> all, so what do I know?  Any ideas how to sort this, please?

I haven't used Octave so my understand on how it works could be off.  I
did a quick look at its source — using guix build -S octave — to see
what it was written in, and at least some parts are C++.  I didn't
verify but is most likely using dlopen to load those extra packages.
Given that assumption, what is happening is that octave is linked
against that gcc-11 libstdc++ you see in the error message.  Guix build
system also rpath the path to that library to make sure it is used at
runtime.  Which means that when you start octave that is the libstdc++
the runtime linker is going to use.

And then I think what happened was that when you did `pkg install` it
just picked up the gcc you had in your profile, which is 14.2.0.  That
libstdc++ contains newer versions of some of the symbols — with the
version GLIBCXX_3.4.3.  When then Octave tries to load that package it
will fail since it already has libstdc++ loaded from gcc-11 and
therefore will not look for the one from gcc-14.

To solve this you need to match the gcc-toolchain or make sure the gcc
version used to build Octave is newer than the one you use to build the
Octave package.

I don't see the octave package definition in guix pinning to any
particular gcc version.  So just updating/reconfiguring your profile —
depending on how you have set it up — might work.  If not you can see if
picking a matching gcc-toolchain works when building the Octave package:

Using something like this:
```
guix shell gcc-toolchain@11 -- pkg install ...
```

I hope that helps.

-- 
s/Fred[re]+i[ck]+/Fredrik/g


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

* Re: Choosing C++ library versions in Guix
  2025-01-07 18:14 ` Fredrik Salomonsson
@ 2025-01-08 14:00   ` Daniel Hatton
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Hatton @ 2025-01-08 14:00 UTC (permalink / raw)
  To: Guix help list


[-- Attachment #1.1: Type: text/plain, Size: 592 bytes --]

On 07/01/2025 18:14, Fredrik Salomonsson wrote:

> Using something like this:
> ```
> guix shell gcc-toolchain@11 -- pkg install ...
> ```
> 
> I hope that helps.

Yep.  I did

   guix shell gcc-toolchain@11 -- octave

Then at the resulting Octave prompt

   pkg install 
"https://downloads.sourceforge.net/project/octave/Octave%20Forge%20Packages/Individual%20Package%20Releases/struct-1.0.18.tar.gz"

And that successfully installed the relevant Octave package.  Thanks 
very much.

Now I just have to remember why I wanted that Octave package in the 
first place.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

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

end of thread, other threads:[~2025-01-08 14:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06 17:27 Choosing C++ library versions in Guix Daniel Hatton
2025-01-07 18:14 ` Fredrik Salomonsson
2025-01-08 14:00   ` Daniel Hatton

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.