Subject: Re: bug#62936: [core-updates] pre-inst-env no longer works

From: Josselin Poiret <[email-masked]>
Date: Mon, 24 Apr 2023 10:34:19 +0200

Hello everyone,

Brian Cully via Bug reports for GNU Guix <[email-masked]> writes:

> I did a full rebuild before submitting this bug: bootstrap -> configure
> -> make clean -> make.
>
> FWIW, I still have the issue with ‘pre-inst-env’ when not run from
> within ‘guix shell -D guix’, which is a step I have never previously
> needed. As I just explained on IRC:
>
> --8<---------------cut here---------------start------------->8---
> <bjc> i'm confused why it's suddenly a problem, though. i've never needed to
>       use ‘guix shell’ with pre-inst-env before  [15:41]
> <bjc> ludo says it's libgit2 linking against an old libc, but i have no idea
>       how that's even possible
> <bjc> for one thing: my system has been reconfigured. all my packages are now
>       running core-updates, and that includes libgit2. for another: doesn't
>       libgit link with a specific path in /gnu/store, so it'll use whatever
>       glibc it needs regardless of what's in my “system” configuration?
> --8<---------------cut here---------------end--------------->8---
>
> Even if this is some particular problem to my build environment somehow,
> I'd love an explanation as to what's going on because I'm extremely
> confused.
>
> In case it matters, I've re-run ‘system reconfigure’ and ‘home
> reconfigure’ since moving to core-updates, thinking maybe there's some
> bootstrapping issue. I'm now 2 system and home generations into
> core-updates, but I have the same problem.
>
> Thanks,

Ran into this problem myself, here's the reason and the fix:

We build a modified `guile` executable in the source tree (for reasons),
and use that to run guix.  Note that it is only added to PATH by
./pre-inst-env!  That guile executable is linked against glibc, and so
after upgrading to a newer glibc, it isn't rebuilt (I don't know how
autotools cope with external dependencies getting updated).  So glibc
2.33 gets loaded, and once (gcrypt) tries to open the libgcrypt library,
it fails because that newer library needs at least glibc 2.34.  The
solution is just to `rm guile` inside of the checkout and run `make`
again.

Best,
-- 
Josselin Poiret