Source: wget Version: 1.19.1-3 Severity: important Tags: patch, upstream User: debian-h...@lists.debian.org Usertags: hurd
Hi, wget currently does not build from source on GNU/Hurd since Debian version 1.18- 4. This is due to that HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER is not defined by configure and then assumes that the function pthread_rwlockattr_setkind_np() is available. On GNU/Hurd it is not. The Hurd libpthread is built from the sources in glibc/libpthread/*, not in glibc/nptl. The problem is due to the gnulib version used in the wget build. The attached (modified) upstream gnulib patch fixes the build problems by using the fallback implementation of rwlocks.glibc on systems without PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP. This patch is a modified version of the upstream gnulib patch: gnulib.git-4084b3a1094372b960ce4a97634e08f4538c8bdd.patch where the ChangeLog entry of the patch is slightly modified. -2017-02-20 Bruno Haible <br...@clisp.org> +2017-02-11 Tim Rühsen <tim.rueh...@gmx.de> As written in the comments of m4/pthread_rwlock_rdlock.m4 POSIX-2008 only requires this for specific implementations: dnl POSIX:2008 makes this requirement only for implementations that support TPS dnl (Thread Priority Scheduling) and only for the scheduling policies SCHED_FIFO dnl and SCHED_RR, see dnl http://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rdl ock.html dnl but test verifies the guarantee regardless of TPS and regardless of dnl scheduling policy. This regression has already been fixed in upstream gnulib as written above. Additionally it is also reported to upstream wget developers. Thanks!
From 4084b3a1094372b960ce4a97634e08f4538c8bdd Mon Sep 17 00:00:00 2001 From: Bruno Haible <br...@clisp.org> Date: Tue, 21 Feb 2017 17:07:27 +0100 Subject: [PATCH] lock tests: Fix build failure on GNU/Hurd (regression from 2017-01-05). Reported by Rene Saavedra <ren...@openmailbox.org> in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25821 via Paul Eggert. * lib/glthread/lock.h: On glibc systems without PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP, use the fallback implementation of rwlocks. * lib/glthread/lock.c: Likewise. --- ChangeLog | 10 ++++++++++ lib/glthread/lock.c | 2 +- lib/glthread/lock.h | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) Index: wget-1.19.1/ChangeLog =================================================================== --- wget-1.19.1.orig/ChangeLog +++ wget-1.19.1/ChangeLog @@ -1,3 +1,13 @@ +2017-02-21 Bruno Haible <br...@clisp.org> + + lock tests: Fix build failure on GNU/Hurd (regression from 2017-01-05). + Reported by Rene Saavedra <ren...@openmailbox.org> in + https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25821 via Paul Eggert. + * lib/glthread/lock.h: On glibc systems without + PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP, use the fallback + implementation of rwlocks. + * lib/glthread/lock.c: Likewise. + 2017-02-11 Tim Rühsen <tim.rueh...@gmx.de> * NEWS: update Index: wget-1.19.1/lib/glthread/lock.c =================================================================== --- wget-1.19.1.orig/lib/glthread/lock.c +++ wget-1.19.1/lib/glthread/lock.c @@ -30,7 +30,7 @@ /* ------------------------- gl_rwlock_t datatype ------------------------- */ -# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (__GNU_LIBRARY__ > 1)) +# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1))) # ifdef PTHREAD_RWLOCK_INITIALIZER Index: wget-1.19.1/lib/glthread/lock.h =================================================================== --- wget-1.19.1.orig/lib/glthread/lock.h +++ wget-1.19.1/lib/glthread/lock.h @@ -176,7 +176,7 @@ typedef pthread_mutex_t gl_lock_t; /* ------------------------- gl_rwlock_t datatype ------------------------- */ -# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (__GNU_LIBRARY__ > 1)) +# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1))) # ifdef PTHREAD_RWLOCK_INITIALIZER