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

2023-04-24 Thread Brian Cully via Bug reports for GNU Guix



Josselin Poiret  writes:


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.


With a lot of help on IRC, the culprit was discovered: you *must* 
run ‘guix pull --branch=core-updates’ to update your current 
profile's guix. This is because guix does not update itself 
without the pull.


Without this step, the guix in your user profile will keep around 
its old rules about which C compiler to use, which, in turn, pulls 
in the old glibc, which causes the error I initially reported.


-bjc





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

2023-04-24 Thread Josselin Poiret via Bug reports for GNU Guix
Hello everyone,

Brian Cully via Bug reports for GNU Guix  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---
>  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]
>  ludo says it's libgit2 linking against an old libc, but i have no idea
>   how that's even possible
>  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


signature.asc
Description: PGP signature


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

2023-04-19 Thread Brian Cully via Bug reports for GNU Guix
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---
 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]
 ludo says it's libgit2 linking against an old libc, but i have no idea
  how that's even possible
 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,





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

2023-04-19 Thread Brian Cully via Bug reports for GNU Guix



Ludovic Courtès  writes:

Make sure everything is in sync, and use ‘guix shell -D guix -C’ 
to

avoid interference!


This has made the glibc locale error and the libgit2 bindings to 
work. Thank you!


However, I'm not sure how this happened in the first place. The 
system I'm running on is running core-updates, from a ‘guix system 
reconfigure’ and reboot. Where is the improperly linked libgit2 
coming from that guix is loading it (and then, only when used with 
‘pre-inst-env’).


-bjc





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

2023-04-19 Thread Ludovic Courtès
Hi,

Brian Cully  skribis:

> git/bindings.scm:66:8: In procedure git_libgit2_init: Function not 
> implemented

That indicates that Guile-Git failed to load libgit2.so, which could be
because libgit2.so is linked against a different libc version (since
you’re testing core-updates).

Make sure everything is in sync, and use ‘guix shell -D guix -C’ to
avoid interference!

Thanks,
Ludo’.





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

2023-04-19 Thread Brian Cully via Bug reports for GNU Guix



Simon Tournier  writes:


~/src/guix-core-updates $ ./pre-inst-env -- guix build zsh


Are you sure about the dash-dash (--) with ./pre-inst-env?

I get this:

$ ./pre-inst-env guix describe
Git checkout:
  repository: /home/simon/src/guix/wk/core-updates/
  branch: core-updates
  commit: 1c86be2fd69d84f536518cc5e4a32c067e851709

$ ./pre-inst-env -- guix describe
./pre-inst-env: 55: exec: --: not found


Odd. I didn't think it made a difference (though I don't currently 
have a working ‘pre-inst-env’) to check with. Do note that the 
error you're seeing is different from the one I posted, and 
explicable.


If I try without the double dash, there's no difference for me:

--8<---cut here---start->8---
~/src/guix-core-updates $ ./pre-inst-env guix build emacs-magit
hint: Consider installing the `glibc-locales' package and defining 
`GUIX_LOCPATH', along these lines:


guix install glibc-locales
export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"

See the "Application Setup" section in the manual, for more info.

guix build: error: gcry_md_hash_buffer: Function not implemented
--8<---cut here---end--->8---

As a fun aside, using ‘guix describe’ also fails, though at a 
different C binding point:


--8<---cut here---start->8---
~/src/guix-core-updates $ ./pre-inst-env guix describe
hint: Consider installing the `glibc-locales' package and defining 
`GUIX_LOCPATH', along these lines:


guix install glibc-locales
export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"

See the "Application Setup" section in the manual, for more info.

Backtrace:
In ice-9/threads.scm:
   390:8 19 (_ _)
In ice-9/boot-9.scm:
 3253:13 18 (_)
In ice-9/threads.scm:
   390:8 17 (_ _)
In ice-9/boot-9.scm:
 3544:20 16 (_)
  2836:4 15 (save-module-excursion _)
 3564:26 14 (_)
In unknown file:
 13 (primitive-load-path "guix/channels" # 7f7677c326e0 at ice-9/boot-9.scm:3551?>)

In ice-9/boot-9.scm:
 3923:23 12 (_)
  3411:4 11 (define-module* _ #:filename _ #:pure _ #:version _ 
  #:imports _ #:exports _ # _ # _ # _ ?)

 3424:24 10 (_)
  222:17  9 (map1 (((git)) ((guix git)) ((guix git-authenticate)) 
  ((guix openpgp) #:select (?)) # ?))
 3327:17  8 (resolve-interface (git) #:select _ #:hide _ #:prefix 
 _ #:renamer _ #:version _)

In ice-9/threads.scm:
   390:8  7 (_ _)
In ice-9/boot-9.scm:
 3253:13  6 (_)
In ice-9/threads.scm:
   390:8  5 (_ _)
In ice-9/boot-9.scm:
 3544:20  4 (_)
  2836:4  3 (save-module-excursion #  ice-9/boot-9.scm:3545:21 ()>)

 3564:26  2 (_)
In unknown file:
  1 (primitive-load-path "git" #  at ice-9/boot-9.scm:3551:37 ()>)

In git/bindings.scm:
66:8  0 (_ . _)

git/bindings.scm:66:8: In procedure git_libgit2_init: Function not 
implemented

--8<---cut here---end--->8---


-bjc





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

2023-04-19 Thread Simon Tournier
Hi,

On Tue, 18 Apr 2023 at 10:51, Brian Cully via Bug reports for GNU Guix 
 wrote:

> ~/src/guix-core-updates $ ./pre-inst-env -- guix build zsh

Are you sure about the dash-dash (--) with ./pre-inst-env?

I get this:

--8<---cut here---start->8---
$ ./pre-inst-env guix describe
Git checkout:
  repository: /home/simon/src/guix/wk/core-updates/
  branch: core-updates
  commit: 1c86be2fd69d84f536518cc5e4a32c067e851709

$ ./pre-inst-env -- guix describe
./pre-inst-env: 55: exec: --: not found
--8<---cut here---end--->8---


Cheers,
simon





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

2023-04-18 Thread Brian Cully via Bug reports for GNU Guix



After re-configuring my system with core updates and rebooting, 
I'm no longer able to use Guix' ‘pre-inst-env’ command to do 
testing:


--8<---cut here---start->8---
~/src/guix-core-updates $ ./pre-inst-env -- guix build zsh
hint: Consider installing the `glibc-locales' package and defining 
`GUIX_LOCPATH', along these lines:


guix install glibc-locales
export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"

See the "Application Setup" section in the manual, for more info.

guix build: error: gcry_md_hash_buffer: Function not implemented
~/src/guix-core-updates $ 
--8<---cut here---end--->8---


System guix (which is now from core-updates on my system) works 
fine:


--8<---cut here---start->8---
~/src/guix-core-updates $ guix build zsh
/gnu/store/viwf9ar2cgly6im3yk9wf2c1dq8l1z3g-zsh-5.8.1
--8<---cut here---end--->8---

I'm not sure what's going on with the locales warning above, but I 
assume it's related to #62934.


-bjc