unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
blob a006d9336165e2bc793538e5183088185bb1f84e 1686 bytes (raw)
name: gnu/packages/patches/guile-hurd-silence-gc-warnings.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
 
From 1256fb0925c5ff7c94249f53e0fb47d1ec280b3f Mon Sep 17 00:00:00 2001
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Fri, 6 Dec 2024 16:18:13 +0100
Subject: [PATCH] Silence GC warnings on the Hurd.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

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>.

* libguile/gc.c (scm_gc_no_warnings)[__GNU__]: New procedure.
(scm_init_gc)[__GNU__]: Use it to silence GC warnings.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
---
 libguile/gc.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/libguile/gc.c b/libguile/gc.c
index 3cbe43ec5..1ea4abcf8 100644
--- a/libguile/gc.c
+++ b/libguile/gc.c
@@ -84,6 +84,13 @@ int scm_debug_cells_gc_interval = 0;
    garbage collection.  */
 static SCM scm_protects;
 
+#if defined __GNU__
+#include <gc.h>
+static void
+scm_gc_no_warnings (char *message, GC_word arg)
+{
+}
+#endif
 
 \f
 
@@ -616,7 +623,15 @@ scm_init_gc ()
   scm_c_hook_add (&scm_after_gc_c_hook, accumulate_gc_timer, NULL, 0);
 
   GC_set_oom_fn (scm_oom_fn);
+#if __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 (scm_gc_no_warnings);
+#else
   GC_set_warn_proc (scm_gc_warn_proc);
+#endif
   GC_set_start_callback (run_before_gc_c_hook);
 
 #include "gc.x"
-- 
2.46.0


debug log:

solving a006d93361 ...
found a006d93361 in https://yhetil.org/guix-bugs/878qssbq9b.fsf@gnu.org/

applying [1/1] https://yhetil.org/guix-bugs/878qssbq9b.fsf@gnu.org/
diff --git a/gnu/packages/patches/guile-hurd-silence-gc-warnings.patch b/gnu/packages/patches/guile-hurd-silence-gc-warnings.patch
new file mode 100644
index 0000000000..a006d93361

1:35: trailing whitespace.
 
1:43: trailing whitespace.
 
1:45: trailing whitespace.
 
1:48: trailing whitespace.
 
1:60: trailing whitespace.
 
Checking patch gnu/packages/patches/guile-hurd-silence-gc-warnings.patch...
Applied patch gnu/packages/patches/guile-hurd-silence-gc-warnings.patch cleanly.
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.

index at:
100644 a006d9336165e2bc793538e5183088185bb1f84e	gnu/packages/patches/guile-hurd-silence-gc-warnings.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).