From: Fredrik Salomonsson <plattfot@posteo.net>
To: Daniel Hatton <dan.hatton@btinternet.com>,
Guix help list <help-guix@gnu.org>
Subject: Re: Choosing C++ library versions in Guix
Date: Tue, 07 Jan 2025 18:14:48 +0000 [thread overview]
Message-ID: <87o70io5if.fsf@posteo.net> (raw)
In-Reply-To: <aa0b3af5-573a-4af2-86b5-584d85e4b8e0@btinternet.com>
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
next prev parent reply other threads:[~2025-01-07 18:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-06 17:27 Choosing C++ library versions in Guix Daniel Hatton
2025-01-07 18:14 ` Fredrik Salomonsson [this message]
2025-01-08 14:00 ` Daniel Hatton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87o70io5if.fsf@posteo.net \
--to=plattfot@posteo.net \
--cc=dan.hatton@btinternet.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.