diff options
author | Janneke Nieuwenhuizen <janneke@gnu.org> | 2024-11-04 14:54:55 +0100 |
---|---|---|
committer | Janneke Nieuwenhuizen <janneke@gnu.org> | 2024-11-18 08:41:51 +0100 |
commit | b0416b8503e38746717a2d1167f9d1410634981e (patch) | |
tree | 652e200ee6451d39a1cabcfb5217da70067cc233 | |
parent | e37ee527a01ceb1ad8b92e6d91f4550016207da9 (diff) | |
download | guix-b0416b8503e38746717a2d1167f9d1410634981e.tar.gz |
guile: Silence GC warnings on the Hurd.
This should work around <https://issues.guix.gnu.org/73181>, resurrecting offloading to the Hurd. * gnu/packages/aux-files/guile-launcher.c (no_warnings)[__GNU__]: New function. (main)[__GNU__]: Use it to silence libgc warnings. Co-authored-by: Ludovic Courtès <ludo@gnu.org>. Change-Id: I8f30732d192ce46144da4a1a081813a104a5f376
-rw-r--r-- | gnu/packages/aux-files/guile-launcher.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/gnu/packages/aux-files/guile-launcher.c b/gnu/packages/aux-files/guile-launcher.c index ad0094bff5..bc7fa21b63 100644 --- a/gnu/packages/aux-files/guile-launcher.c +++ b/gnu/packages/aux-files/guile-launcher.c @@ -1,7 +1,8 @@ /* GNU Guix --- Functional package management for GNU Copyright 1996-1997,2000-2001,2006,2008,2011,2013,2018,2020,2021 Free Software Foundation, Inc. - Copyright (C) 2020 Ludovic Courtès <ludo@gnu.org> + Copyright (C) 2020, 2024 Ludovic Courtès <ludo@gnu.org> + Copyright (C) 2024 Janneke Nieuwenhuizen <janneke@gnu.org> This file is part of GNU Guix. @@ -28,6 +29,14 @@ #include <locale.h> #include <libguile.h> +#if defined __GNU__ +#include <gc.h> +static void +no_warnings (char *message, GC_word arg) +{ +} +#endif + /* Saved values of GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH. */ static const char *load_path, *load_compiled_path; @@ -73,6 +82,14 @@ main (int argc, char **argv) which is always preferable over the C locale. */ setlocale (LC_ALL, "en_US.utf8"); +#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. */ + GC_set_warn_proc (no_warnings); +#endif + const char *str; str = getenv ("GUILE_LOAD_PATH"); load_path = str != NULL ? strdup (str) : NULL; |