Subject: Re: bug#73181: guix-daemon fails when invoking‘guix authenticate’ on the Hurd

From: Ludovic Courtès <[email-masked]>
Date: Tue, 10 Dec 2024 09:07:43 +0100

Hi Janneke,

Janneke Nieuwenhuizen <[email-masked]> skribis:

> So, the problem is that our patch doesrn't disable the warnings after all.
> The guile-launcher has
>
> guile-launcher.c:
>
> #if defined __GNU__
>   /* XXX: On 32-bit GNU/Hurd (i586-gnu), libgc emits "Repeated allocation"
>      warnings that are annoying and interfere with communications between
>      'guix-daemon' and 'guix authenticate':
>      <https://issues.guix.gnu.org/73181>.  Silence them.  */
>   std::cerr << "silencing libgc warnings" << std::endl;
>   GC_set_warn_proc (no_warnings);
> #endif
>   ..
>   scm_boot_guile (argc, argv, inner_main, 0);
>
>
> and then guile's gc.c just undoes that

D’oh!  Good catch!

> From c555134310728360cb3b12472e8d487421d57a7d Mon Sep 17 00:00:00 2001
> Message-ID: <[email-masked]>
> From: Janneke Nieuwenhuizen <[email-masked]>
> Date: Fri, 6 Dec 2024 16:25:54 +0100
> Subject: [PATCH] gnu: guile-3.0: Silence GC warnings on the Hurd.
>
> * gnu/packages/patches/guile-hurd-silence-gc-warnings.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Register it.
> * gnu/packages/guile.scm (guile-3.0): When building for the Hurd, use it in
> new stage "patch-silence-gc-warnings".
>
> Change-Id: I48f2641a162c3fab15655293e10c4aa2200d5843

You’ll hate me for suggesting that :-) but what if in ‘guile-launcher.c’
we moved the ‘GC_set_warn_proc’ call to ‘inner_main’?  I believe in that
case it would have the desired effect, right?

That would avoid patching Guile wholesale.

Anyhow, kudos for the tricky and probably lengthy debugging session!

Thanks,
Ludo’.