libgpg-error t-lock-single-posix failure on Hurd (was: libgpg-error t-printf test fails on powerpc and ppc64)
John Paul Adrian Glaubitz
glaubitz at physik.fu-berlin.de
Thu Aug 27 09:09:11 CEST 2026
Hi,
On Thu, 2026-08-27 at 09:00 +0200, Samuel Thibault wrote:
> John Paul Adrian Glaubitz, le jeu. 27 août 2026 08:18:19 +0200, a ecrit:
> > On Thu, 2026-08-27 at 11:57 +0900, NIIBE Yutaka wrote:
> > > I continue watching Debian build for libgpg-error. I observed failures
> > > on Hurd machines.
> >
> > I have very little experience with Hurd only, so I suggest we ask Samuel
> > Thibault himself who is the main person behind Debian's Hurd port.
> >
> > > If you have any experiences on Hurd, please tell us. Attached is my
> > > guess work by reading GNU libc code. It confirmed it built successfully
> > > (make check goes well) on the Debian porterbox, but I don't know well if
> > > it's the correct fix.
>
> I'm missing the patch file :)
Oops, apologies, my mail client must have swallowed it. I'm pasting it inline:
>From 50a86dd7c0a447468043aec0d147818d67a8a816 Mon Sep 17 00:00:00 2001
Message-ID: <50a86dd7c0a447468043aec0d147818d67a8a816.1787799007.git.gniibe at fsij.org>
From: NIIBE Yutaka <gniibe at fsij.org>
Date: Thu, 27 Aug 2026 11:40:26 +0900
Subject: [PATCH Libgpg-error] Fix use_pthread_p for GNU Hurd.
To: gnupg-devel at gnupg.org
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------2.47.3"
This is a multi-part message in MIME format.
--------------2.47.3
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
* src/posix-lock.c: [__gnu_hurd__] (use_pthread_p): Implement for
GNU Hurd.
--
Hurd uses an internal thread for handling signals, and
__libc_single_threaded is zero. We need to examine __pthread_total
instead.
Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
---
src/posix-lock.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--------------2.47.3
Content-Type: text/x-patch; name="0001-Fix-use_pthread_p-for-GNU-Hurd.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Fix-use_pthread_p-for-GNU-Hurd.patch"
diff --git a/src/posix-lock.c b/src/posix-lock.c
index 85ec660..e2dd826 100644
--- a/src/posix-lock.c
+++ b/src/posix-lock.c
@@ -44,7 +44,10 @@
#if USE_POSIX_THREADS
-# if USE_POSIX_THREADS_FROM_LIBC && HAVE_SYS_SINGLE_THREADED_H
+# ifdef __gnu_hurd__
+extern unsigned int __pthread_total;
+# define use_pthread_p() (__pthread_total > 1)
+# elif USE_POSIX_THREADS_FROM_LIBC && HAVE_SYS_SINGLE_THREADED_H
# include <sys/single_threaded.h>
# define use_pthread_p() !__libc_single_threaded
# elif USE_POSIX_THREADS_WEAK
--------------2.47.3--
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
More information about the Gnupg-devel
mailing list