From unknown Mon Jun 23 04:15:41 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#63942] [PATCH 1/5] gnu: guile-fibers: Add 1.3.1. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 07 Jun 2023 08:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63942 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 63942@debbugs.gnu.org Cc: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16861271502370 (code B ref -1); Wed, 07 Jun 2023 08:40:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jun 2023 08:39:10 +0000 Received: from localhost ([127.0.0.1]:53529 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6ohB-0000c9-K4 for submit@debbugs.gnu.org; Wed, 07 Jun 2023 04:39:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:44988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6oh6-0000bz-DO for submit@debbugs.gnu.org; Wed, 07 Jun 2023 04:39:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6oh6-0003u0-3d for guix-patches@gnu.org; Wed, 07 Jun 2023 04:39:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6oh5-000475-25; Wed, 07 Jun 2023 04:39:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:References:In-Reply-To:Date:Subject:To: From; bh=WA1Bd7UAklboQB/AOX4y9llOcvQ0a+P9Wm4e4craD9g=; b=IAlKVmNIBhp6ExL3DCOk v4nYdWlPuYJpLSOZw6qbXY3gDp2CSR6fDGxFWAjNSwcEH99EIZKtSnNGjM9lX5/QlvXLQuymaIZlD ryeSAfVXiS3fhXeOPlgLErJnffTzCPcnpJYGXr1W0EabhifWiPu7IXj3QMVWqNQrNYksEl56YL+ny ObvBXUlr0ci7lkz/+Kyjzidyt+KghX9HFhLBTK0cW8r2n0+wxISsF1NX7ITG5tJSw6OtA7uB/xIHH Ip2dIHVphEOfTXMba7Kdcy2hSENy1bntTZRQxdqEiM5iGTjTd82SFTvXMVdDMIaQJjRHD3RZ1jDnH NkU0rYJRNKZ4PQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6oh4-000664-Le; Wed, 07 Jun 2023 04:39:02 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 7 Jun 2023 10:38:48 +0200 Message-Id: <3a86e6815a5d5d160e17105095546f6c3ff0d95a.1686126946.git.ludo@gnu.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/guile-xyz.scm (guile-fibers-1.3): New variable. (guile-fibers-1.1): Inherit from it. * gnu/packages/patches/guile-fibers-libevent-32-bit.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/guile-xyz.scm | 53 ++++++++++++++----- .../guile-fibers-libevent-32-bit.patch | 18 +++++++ 3 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 gnu/packages/patches/guile-fibers-libevent-32-bit.patch diff --git a/gnu/local.mk b/gnu/local.mk index f9afb433e6..f466f91746 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1317,6 +1317,7 @@ dist_patch_DATA = \ %D%/packages/patches/guile-fibers-epoll-instance-is-dead.patch \ %D%/packages/patches/guile-fibers-fd-finalizer-leak.patch \ %D%/packages/patches/guile-fibers-wait-for-io-readiness.patch \ + %D%/packages/patches/guile-fibers-libevent-32-bit.patch \ %D%/packages/patches/guile-fix-invalid-unicode-handling.patch \ %D%/packages/patches/guile-gdbm-ffi-support-gdbm-1.14.patch \ %D%/packages/patches/guile-git-adjust-for-libgit2-1.2.0.patch \ diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index d8684bb818..43334eea0c 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -92,6 +92,7 @@ (define-module (gnu packages guile-xyz) #:use-module (gnu packages hurd) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) + #:use-module (gnu packages libevent) #:use-module (gnu packages libffi) #:use-module (gnu packages libunistring) #:use-module (gnu packages linux) @@ -788,10 +789,10 @@ (define-public guile2.2-dsv (inputs (list guile-2.2)) (propagated-inputs `(("guile-lib" ,guile2.2-lib))))) -(define-public guile-fibers-1.1 +(define-public guile-fibers-1.3 (package (name "guile-fibers") - (version "1.1.1") + (version "1.3.1") (source (origin (method git-fetch) (uri (git-reference @@ -800,11 +801,9 @@ (define-public guile-fibers-1.1 (file-name (git-file-name name version)) (sha256 (base32 - "0ll63d7202clapg1k4bilbnlmfa4qvpjnsd7chbkka4kxf5klilc")) + "0wvdi4l58f9a5c9wi3cdc9l1bniscsixb6w2zj86mch7j7j814lc")) (patches - (search-patches "guile-fibers-wait-for-io-readiness.patch" - "guile-fibers-epoll-instance-is-dead.patch" - "guile-fibers-fd-finalizer-leak.patch")))) + (search-patches "guile-fibers-libevent-32-bit.patch")))) (build-system gnu-build-system) (arguments (list #:make-flags @@ -822,17 +821,15 @@ (define-public guile-fibers-1.1 (substitute* "Makefile" (("tests/speedup.scm") "")))))))) (native-inputs - (list texinfo pkg-config autoconf automake libtool + (list texinfo pkg-config autoconf-2.71 automake libtool guile-3.0 ;for 'guild compile ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS' gettext-minimal)) (inputs - (list guile-3.0)) ;for libguile-3.0.so - (supported-systems - ;; This version requires 'epoll' and is thus limited to Linux-based - ;; systems, but this may change soon: - ;; . - (filter (cut string-suffix? "-linux" <>) %supported-systems)) + (append (list guile-3.0) ;for libguile-3.0.so + (if (hurd-target?) + (list libevent) + '()))) (synopsis "Lightweight concurrency facility for Guile") (description "Fibers is a Guile library that implements a a lightweight concurrency @@ -849,6 +846,36 @@ (define-public guile-fibers-1.1 (properties '((upstream-name . "fibers"))) (license license:lgpl3+))) +(define-public guile-fibers-1.1 + (package + (inherit guile-fibers-1.3) + (version "1.1.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/wingo/fibers") + (commit (string-append "v" version)))) + (file-name (git-file-name "guile-fibers" version)) + (sha256 + (base32 + "0ll63d7202clapg1k4bilbnlmfa4qvpjnsd7chbkka4kxf5klilc")) + (patches + (search-patches "guile-fibers-wait-for-io-readiness.patch" + "guile-fibers-epoll-instance-is-dead.patch" + "guile-fibers-fd-finalizer-leak.patch")))) + (native-inputs + (list texinfo pkg-config autoconf automake libtool + guile-3.0 ;for 'guild compile + ;; Gettext brings 'AC_LIB_LINKFLAGS_FROM_LIBS' + gettext-minimal)) + (inputs + (list guile-3.0)) ;for libguile-3.0.so + (supported-systems + ;; This version requires 'epoll' and is thus limited to Linux-based + ;; systems, which is fixed in 1.2.0: + ;; . + (filter (cut string-suffix? "-linux" <>) %supported-systems)))) + (define-public guile-fibers-next (let ((commit "99fc3e38048f732de67c43fde52e949fa294aa7d") (revision "1")) diff --git a/gnu/packages/patches/guile-fibers-libevent-32-bit.patch b/gnu/packages/patches/guile-fibers-libevent-32-bit.patch new file mode 100644 index 0000000000..a1cc99fdbe --- /dev/null +++ b/gnu/packages/patches/guile-fibers-libevent-32-bit.patch @@ -0,0 +1,18 @@ +This fixes a bug with the libevent backend on 32-bit platforms: + + https://github.com/wingo/fibers/issues/86 + +diff --git a/extensions/libevent.c b/extensions/libevent.c +index 4f44de9..52c9d73 100644 +--- a/extensions/libevent.c ++++ b/extensions/libevent.c +@@ -215,7 +215,8 @@ run_event_loop (void *p) + microsec = -1; + else if (data->timeout >= 0) + { +- microsec = data->timeout / time_units_per_microsec; ++ microsec = (time_units_per_microsec == 0) ++ ? 0 : data->timeout / time_units_per_microsec; + tv.tv_sec = 0; + tv.tv_usec = microsec; + } -- 2.40.1 From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 07 04:42:18 2023 Received: (at control) by debbugs.gnu.org; 7 Jun 2023 08:42:18 +0000 Received: from localhost ([127.0.0.1]:53561 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6okE-0000jG-Hy for submit@debbugs.gnu.org; Wed, 07 Jun 2023 04:42:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q6okD-0000id-0n for control@debbugs.gnu.org; Wed, 07 Jun 2023 04:42:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6ok7-0004nZ-QK for control@debbugs.gnu.org; Wed, 07 Jun 2023 04:42:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:Subject:From:To:Date:in-reply-to: references; bh=XMICAT6R8m4k4+AL0Z/5KfVd7uMR/W4UvLNhze/mx7M=; b=qXEtaJN0DBaIG8 SThgJ/VVtPEk6Goseyly1lYq37pcO7DQEui7R3zMZLlvUAUwzyeIOM7xIlY5t3yKJ7FcknC/CkCxC 4Qphp1GgDXc+HB5S1CHk4eDJm6A2xFuNJXd3mmDMlTBIjE2RF2hpVi/SMWU2Q6888ZBiNZpAXLqS1 E58ZU3GLIsMFcvLocBvmQcK3VIU4hgOHpod9p29eMUNC6vFYXWIBzq8ByTGWp/pumQjx9oMXt6DUX nrIaSaQr75JIyjXMjcxjf1yMksnYJkaNue5vqY12kYv+bKL672WKr9Cvwub+9/VHxHx4AG/12xTpo yVEMZodYVhX/E935NJgQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q6ok7-0006SF-Dy for control@debbugs.gnu.org; Wed, 07 Jun 2023 04:42:11 -0400 Date: Wed, 07 Jun 2023 10:42:10 +0200 Message-Id: <87v8fz64v1.fsf@gnu.org> To: control@debbugs.gnu.org From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: control message for bug #63943 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) merge 63943 63942 quit