From unknown Sun Jun 22 11:40:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51241] [PATCH 0/1] gnu: ragel: Fix build of knot on aarch64-linux. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 16 Oct 2021 17:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51241@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16344038999577 (code B ref -1); Sat, 16 Oct 2021 17:05:02 +0000 Received: (at submit) by debbugs.gnu.org; 16 Oct 2021 17:04:59 +0000 Received: from localhost ([127.0.0.1]:42950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbn7D-0002UP-DB for submit@debbugs.gnu.org; Sat, 16 Oct 2021 13:04:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:57688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbn78-0002UE-Cb for submit@debbugs.gnu.org; Sat, 16 Oct 2021 13:04:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbn77-0002HQ-RO for guix-patches@gnu.org; Sat, 16 Oct 2021 13:04:54 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:46220) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbn74-0001V0-Sq for guix-patches@gnu.org; Sat, 16 Oct 2021 13:04:53 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 42A851361 for ; Sat, 16 Oct 2021 17:04:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo02-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo02-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0q4p0ge6Hj3Y for ; Sat, 16 Oct 2021 17:04:47 +0000 (UTC) Received: from localhost.localdomain (unknown [108.162.141.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id EA8811350 for ; Sat, 16 Oct 2021 17:04:46 +0000 (UTC) From: Simon South Date: Sat, 16 Oct 2021 13:04:19 -0400 Message-Id: X-Mailer: git-send-email 2.25.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=64.68.200.34; envelope-from=simon@simonsouth.net; helo=mailout.easymail.ca X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) 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: -2.3 (--) This change fixes the build of Knot on AArch64 by patching Ragel to be explicit in its use of signed "char" types and ranges rather than assuming "char" is signed by default on all platforms, as it is not on aarch64-linux. Presently Knot's test suite is failing on aarch64-linux due to the src/libknot/ypbody.c file being improperly recreated in the package's "update-parser" phase. From Knot's runtests.log: ok 139 - set input string # wanted: 0 # seen: -999 not ok 140 - parse key with a value in UTF-8 not ok 141 - compare UTF-8 value 1..141 # Looks like you failed 2 tests of 141 With the patch applied, ypbody.c is generated as expected (including now the explicit use of "signed char" where intended) and the tests pass. I've tested these changes on AArch64 and x86-64. On the latter I've sucessfully re-built the output of "guix refresh --list-dependent ragel" with the exception of ccextractor, which fails (even without this patch) for an unrelated reason. (On AArch64 this rebuild would be an unreasonably large task, though the immediate dependents all build fine.) -- Simon South simon@simonsouth.net Simon South (1): gnu: ragel: Fix build of knot on aarch64-linux. gnu/local.mk | 1 + .../ragel-specify-char-signedness.patch | 58 +++++++++++++++++++ gnu/packages/ragel.scm | 4 +- 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ragel-specify-char-signedness.patch base-commit: 34b0aa16e77bdbb5b847267eb0f825a590e3d101 -- 2.33.0 From unknown Sun Jun 22 11:40:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51241] [PATCH 1/1] gnu: ragel: Fix build of knot on aarch64-linux. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 16 Oct 2021 17:08:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51241@debbugs.gnu.org Received: via spool by 51241-submit@debbugs.gnu.org id=B51241.16344040329838 (code B ref 51241); Sat, 16 Oct 2021 17:08:03 +0000 Received: (at 51241) by debbugs.gnu.org; 16 Oct 2021 17:07:12 +0000 Received: from localhost ([127.0.0.1]:42958 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbn9L-0002Yc-QE for submit@debbugs.gnu.org; Sat, 16 Oct 2021 13:07:12 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:34250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbn9J-0002YN-Jt for 51241@debbugs.gnu.org; Sat, 16 Oct 2021 13:07:10 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id B8EFEA94EE for <51241@debbugs.gnu.org>; Sat, 16 Oct 2021 17:07:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo04-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo04-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2EWHH_Yvp79O for <51241@debbugs.gnu.org>; Sat, 16 Oct 2021 17:07:03 +0000 (UTC) Received: from localhost.localdomain (unknown [108.162.141.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 747D9A8DDA for <51241@debbugs.gnu.org>; Sat, 16 Oct 2021 17:07:03 +0000 (UTC) From: Simon South Date: Sat, 16 Oct 2021 13:06:39 -0400 Message-Id: <8d3c7556a41b12a899c52181a5f6689111f036b4.1634402642.git.simon@simonsouth.net> X-Mailer: git-send-email 2.25.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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 (---) Make explicit Ragel's assumption of the "char" type being signed on both its build and target platforms, allowing the current version of Knot and perhaps other dependent packages to build successfully on aarch64-linux where "char" is unsigned by default. * gnu/packages/patches/ragel-specify-char-signedness.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/ragel.scm (ragel)[source]: Apply it. --- gnu/local.mk | 1 + .../ragel-specify-char-signedness.patch | 58 +++++++++++++++++++ gnu/packages/ragel.scm | 4 +- 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ragel-specify-char-signedness.patch diff --git a/gnu/local.mk b/gnu/local.mk index d1803e7f59..a4dd01a40f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1716,6 +1716,7 @@ dist_patch_DATA = \ %D%/packages/patches/quassel-qt-514-compat.patch \ %D%/packages/patches/quickswitch-fix-dmenu-check.patch \ %D%/packages/patches/qtwebkit-pbutils-include.patch \ + %D%/packages/patches/ragel-specify-char-signedness.patch \ %D%/packages/patches/randomjungle-disable-static-build.patch \ %D%/packages/patches/rapicorn-isnan.patch \ %D%/packages/patches/rapidjson-gcc-compat.patch \ diff --git a/gnu/packages/patches/ragel-specify-char-signedness.patch b/gnu/packages/patches/ragel-specify-char-signedness.patch new file mode 100644 index 0000000000..fccb79d432 --- /dev/null +++ b/gnu/packages/patches/ragel-specify-char-signedness.patch @@ -0,0 +1,58 @@ +Ragel assumes C and C++'s "char" type is signed by default but this is not +true for every architecture gcc supports. Prevent build failures of dependent +packages (on architectures such as AArch64 where "char" is normally unsigned) +by making explicit Ragel's assumption of character signedness. + +This is functionally very similar to upstream commit e2650a7, "common: Fix +ambiguous CHAR_MIN/MAX definition", which is also meant to address this issue. +However this patch applies to Ragel version 6 and it removes altogether the +ambiguous "char" type from generated C code, causing Ragel to instead specify +"signed char" or "unsigned char" as appropriate. + +diff --git a/ragel/common.cpp b/ragel/common.cpp +index 8e9f8ed0..649f388c 100644 +--- a/ragel/common.cpp ++++ b/ragel/common.cpp +@@ -27,7 +27,7 @@ + + HostType hostTypesC[] = + { +- { "char", 0, "char", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, sizeof(char) }, ++ { "signed", "char", "char", true, true, false, SCHAR_MIN, SCHAR_MAX, 0, 0, sizeof(signed char) }, + { "unsigned", "char", "uchar", false, true, false, 0, 0, 0, UCHAR_MAX, sizeof(unsigned char) }, + { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, sizeof(short) }, + { "unsigned", "short", "ushort", false, true, false, 0, 0, 0, USHRT_MAX, sizeof(unsigned short) }, +@@ -66,7 +66,7 @@ HostType hostTypesC[] = + + HostType hostTypesD[] = + { +- { "byte", 0, "byte", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, 1 }, ++ { "byte", 0, "byte", true, true, false, SCHAR_MIN, SCHAR_MAX, 0, 0, 1 }, + { "ubyte", 0, "ubyte", false, true, false, 0, 0, 0, UCHAR_MAX, 1 }, + { "char", 0, "char", false, true, false, 0, 0, 0, UCHAR_MAX, 1 }, + { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, 2 }, +@@ -93,7 +93,7 @@ HostType hostTypesGo[] = + + HostType hostTypesJava[] = + { +- { "byte", 0, "byte", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, 1 }, ++ { "byte", 0, "byte", true, true, false, SCHAR_MIN, SCHAR_MAX, 0, 0, 1 }, + { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, 2 }, + { "char", 0, "char", false, true, false, 0, 0, 0, USHRT_MAX, 2 }, + { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, 4 }, +@@ -102,13 +102,13 @@ HostType hostTypesJava[] = + /* What are the appropriate types for ruby? */ + HostType hostTypesRuby[] = + { +- { "char", 0, "char", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, 1 }, ++ { "char", 0, "char", true, true, false, SCHAR_MIN, SCHAR_MAX, 0, 0, 1 }, + { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, 4 }, + }; + + HostType hostTypesCSharp[] = + { +- { "sbyte", 0, "sbyte", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, 1 }, ++ { "sbyte", 0, "sbyte", true, true, false, SCHAR_MIN, SCHAR_MAX, 0, 0, 1 }, + { "byte", 0, "byte", false, true, false, 0, 0, 0, UCHAR_MAX, 1 }, + { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, 2 }, + { "ushort", 0, "ushort", false, true, false, 0, 0, 0, USHRT_MAX, 2 }, diff --git a/gnu/packages/ragel.scm b/gnu/packages/ragel.scm index 1d9b67a6e0..e3fc980bd7 100644 --- a/gnu/packages/ragel.scm +++ b/gnu/packages/ragel.scm @@ -34,7 +34,9 @@ (define-public ragel version ".tar.gz")) (sha256 (base32 - "0gvcsl62gh6sg73nwaxav4a5ja23zcnyxncdcdnqa2yjcpdnw5az")))) + "0gvcsl62gh6sg73nwaxav4a5ja23zcnyxncdcdnqa2yjcpdnw5az")) + (patches + (search-patches "ragel-specify-char-signedness.patch")))) (build-system gnu-build-system) (home-page "https://www.colm.net/open-source/ragel/") (synopsis "State machine compiler") -- 2.33.0 From unknown Sun Jun 22 11:40:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51241] [PATCH 0/1] gnu: ragel: Fix build of knot on aarch64-linux. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 16 Oct 2021 17:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Simon South Cc: 51241@debbugs.gnu.org X-Debbugs-Original-Cc: 51241@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163440637113515 (code B ref -1); Sat, 16 Oct 2021 17:47:01 +0000 Received: (at submit) by debbugs.gnu.org; 16 Oct 2021 17:46:11 +0000 Received: from localhost ([127.0.0.1]:43004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbnl5-0003Vv-Hl for submit@debbugs.gnu.org; Sat, 16 Oct 2021 13:46:11 -0400 Received: from lists.gnu.org ([209.51.188.17]:56942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbnl4-0003Vp-SU for submit@debbugs.gnu.org; Sat, 16 Oct 2021 13:46:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbnl4-00073F-Cn for guix-patches@gnu.org; Sat, 16 Oct 2021 13:46:10 -0400 Received: from tobias.gr ([2a02:c205:2020:6054::1]:60750) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbnkx-0004vJ-Ov for guix-patches@gnu.org; Sat, 16 Oct 2021 13:46:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=SJTlVcfoY2yLu 2qeImVl5eveTL1vK4SgBtij3qXwVZI=; h=in-reply-to:date:subject:cc:to: from:references; d=tobias.gr; b=oMrR4yILDs3DxNqZRf0IULr93mV7SFxrVm0YLj TQmAQyBLsU7gdyauiNFkRMTtAJH5akQRcMQjtlh+rnlG5Xtv8RuA7ikLEBySk230KVvVwo HMVKSiikO4dRBZ07qG9SSR52CbNTJWenhDKbhvMOMfwHzHwP49vjV2CGTdt5RcFbJCSHB2 /0czpS2pDJWFm9u1bbEGgsI266Czohx4SRfNuDLSvBxkSXUQVxSo99YKR11nRdoFXIouFA 2zFyw0hrfLJ5b2U2dBpy8PBUHs6L7UeEZpaiofxZBKmuwuarwx5enAKuqx9+q44dJR2stG cIME+MyY1j49JDXePyneUMKg== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 7aa71735 (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sat, 16 Oct 2021 17:45:56 +0000 (UTC) References: From: Tobias Geerinckx-Rice Date: Sat, 16 Oct 2021 19:42:30 +0200 In-reply-to: BIMI-Selector: v=BIMI1; s=default; Message-ID: <87pms4c17r.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a02:c205:2020:6054::1; envelope-from=me@tobias.gr; helo=tobias.gr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) 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: -2.6 (--) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Simon, Thanks for taking care of Knot. The changes themselves LGTM. Simon South =E5=86=99=E9=81=93=EF=BC=9A > With the patch applied Mmm, that's some very raw diff! :-) Is this an (applied?) upstream patch? Or did you write it, and if=20 so, have you submitted it for upstream inclusion anywhere its=20 progress can be tracked? Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYWsP2A0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15/XUA/2sFhkwifhAydI+ZRva4TzPsjjLH4bWf/hbQgrwi 3P5mAP9UHl91GErru51lfcvG5u4cf01puuRqZF1iK+CsFh4cBQ== =DOgZ -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Jun 22 11:40:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51241] [PATCH 0/1] gnu: ragel: Fix build of knot on aarch64-linux. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 16 Oct 2021 20:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Geerinckx-Rice Cc: 51241@debbugs.gnu.org Received: via spool by 51241-submit@debbugs.gnu.org id=B51241.163441499727147 (code B ref 51241); Sat, 16 Oct 2021 20:10:02 +0000 Received: (at 51241) by debbugs.gnu.org; 16 Oct 2021 20:09:57 +0000 Received: from localhost ([127.0.0.1]:43133 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbq0C-00073m-M3 for submit@debbugs.gnu.org; Sat, 16 Oct 2021 16:09:57 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:57816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbq0B-00073Z-Hh for 51241@debbugs.gnu.org; Sat, 16 Oct 2021 16:09:56 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id B5755C4B68; Sat, 16 Oct 2021 20:09:49 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo01-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo01-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id r1yLHgmddjS5; Sat, 16 Oct 2021 20:09:49 +0000 (UTC) Received: from laptop (unknown [108.162.141.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 3723AC4B5A; Sat, 16 Oct 2021 20:09:49 +0000 (UTC) From: Simon South References: <87pms4c17r.fsf@nckx> Date: Sat, 16 Oct 2021 16:09:26 -0400 In-Reply-To: <87pms4c17r.fsf@nckx> (Tobias Geerinckx-Rice's message of "Sat, 16 Oct 2021 19:42:30 +0200") Message-ID: <87v91w91ft.fsf@simonsouth.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) 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 (---) Tobias Geerinckx-Rice writes: > Or did you write it, and if so, have you submitted it for upstream > inclusion anywhere its progress can be tracked? Yes, the patch is of my own creation (borrowing heavily from the upstream commit I mention) but I haven't tried submitting it upstream yet. I agree that is where it really belongs, though. I'll give that a shot and see what response I get. -- Simon South simon@simonsouth.net From unknown Sun Jun 22 11:40:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51241] [PATCH 0/1] gnu: ragel: Fix build of knot on aarch64-linux. Resent-From: Tobias Geerinckx-Rice Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 16 Oct 2021 21:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Simon South Cc: 51241@debbugs.gnu.org Received: via spool by 51241-submit@debbugs.gnu.org id=B51241.16344203972901 (code B ref 51241); Sat, 16 Oct 2021 21:40:02 +0000 Received: (at 51241) by debbugs.gnu.org; 16 Oct 2021 21:39:57 +0000 Received: from localhost ([127.0.0.1]:43186 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbrPJ-0000ki-FY for submit@debbugs.gnu.org; Sat, 16 Oct 2021 17:39:57 -0400 Received: from tobias.gr ([80.241.217.52]:52996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbrPH-0000kZ-2m for 51241@debbugs.gnu.org; Sat, 16 Oct 2021 17:39:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=2018; bh=TyLCDsPlJU/9l rIqMP071DEMC5JzmsgFycqP4iJR4PU=; h=in-reply-to:date:subject:cc:to: from:references; d=tobias.gr; b=exoYPjHgBKeH+xZ/FirXD/25zHUC9piyI18KoV 2dJqAMz8A1n8AtfcmJ88wW8s7VzsNQY4U2tL1VSTawPnf8rFIwatAMlwKELGB3oO+iDXWC KMoFFn/T4rnsC4na4FwMul/ZftOWOural65MOBe8lof9ClIn/tP9tgNMGxzlSuOd8gryiY 327WcEKXKxQdLWU7Ir2ywF7C5C6tdhFS0Q00wOVn03GAyPnxT492SxWpQ6/VHB+ziqwQTD D/Sw5jGHXrS4RVGb5xeYFrn1EFR+Rd8NbhPllkqjtuB/crdzo2LXZwW/zhg63uQAW35evH qaER7vDKZH+mv0RiyH+fV2cA== Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 0f67c12b (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sat, 16 Oct 2021 21:39:49 +0000 (UTC) References: <87pms4c17r.fsf@nckx> <87v91w91ft.fsf@simonsouth.net> From: Tobias Geerinckx-Rice Date: Sat, 16 Oct 2021 23:37:57 +0200 In-reply-to: <87v91w91ft.fsf@simonsouth.net> BIMI-Selector: v=BIMI1; s=default; Message-ID: <87k0icbqdy.fsf@nckx> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Simon South =E5=86=99=E9=81=93=EF=BC=9A > I'll give that a shot and see what response I get. Thanks! Let us know how it goes. We don't have to wait for an upstream response to add it to Guix,=20 but it's nice to be able to refer to the issue URL. Kind regards, T G-R --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCYWtGqQ0cbWVAdG9iaWFz LmdyAAoJEA2w/4hPVW15O4UA/0gFau6WaK2qOqTEz5pJ3x4cx55v5UPoXE+RPO3f rmL1AQDMlwlUs0uHt6op0IerKFZVb0bGTrJEO430NFlny7EJBw== =6sne -----END PGP SIGNATURE----- --=-=-=-- From unknown Sun Jun 22 11:40:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51241] [PATCH v2 0/1] gnu: ragel: Fix build of knot on aarch64-linux. References: In-Reply-To: Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 12 Nov 2021 20:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51241@debbugs.gnu.org Received: via spool by 51241-submit@debbugs.gnu.org id=B51241.163674989820966 (code B ref 51241); Fri, 12 Nov 2021 20:45:02 +0000 Received: (at 51241) by debbugs.gnu.org; 12 Nov 2021 20:44:58 +0000 Received: from localhost ([127.0.0.1]:46058 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mldPu-0005S5-08 for submit@debbugs.gnu.org; Fri, 12 Nov 2021 15:44:58 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:37406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mldPr-0005Rp-F0 for 51241@debbugs.gnu.org; Fri, 12 Nov 2021 15:44:56 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 05CF470915 for <51241@debbugs.gnu.org>; Fri, 12 Nov 2021 20:44:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo05-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo05-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ju5BYI5bEsAI for <51241@debbugs.gnu.org>; Fri, 12 Nov 2021 20:44:49 +0000 (UTC) Received: from localhost.localdomain (unknown [108.162.141.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id AB0896FF25 for <51241@debbugs.gnu.org>; Fri, 12 Nov 2021 20:44:49 +0000 (UTC) From: Simon South Date: Fri, 12 Nov 2021 15:44:39 -0500 Message-Id: X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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 (---) After corresponding with Ragel's author, here's a patch that applies the solution implemented upstream[0], backported from Ragel's "ragel-6" branch. I've tested this on AArch64 and x86-64 and with these changes applied, Knot builds fine again on both platforms. On x86-64, I've once again rebuilt the output of "guix refresh --list-dependent ragel" without issue, aside from ccextractor; on AArch64, Ragel's immediate dependents[1] all build fine. [0] https://github.com/adrian-thurston/ragel/commit/2e638fccd81e96ce09841adc4b295b5ce694ea73 [1] gpick, knot, rspamd, ruby-json-pure, ruby-parser and ruby-regexp-parser. -- Simon South simon@simonsouth.net Simon South (1): gnu: ragel: Fix build of knot on aarch64-linux. gnu/local.mk | 1 + .../ragel-decide-signedness-of-char.patch | 42 +++++++++++++++++++ gnu/packages/ragel.scm | 7 +++- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ragel-decide-signedness-of-char.patch -- 2.33.1 From unknown Sun Jun 22 11:40:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51241] [PATCH v2 1/1] gnu: ragel: Fix build of knot on aarch64-linux. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 12 Nov 2021 20:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51241@debbugs.gnu.org Received: via spool by 51241-submit@debbugs.gnu.org id=B51241.163674990020980 (code B ref 51241); Fri, 12 Nov 2021 20:45:02 +0000 Received: (at 51241) by debbugs.gnu.org; 12 Nov 2021 20:45:00 +0000 Received: from localhost ([127.0.0.1]:46060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mldPw-0005SJ-7l for submit@debbugs.gnu.org; Fri, 12 Nov 2021 15:45:00 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:37408) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mldPr-0005Rq-HJ for 51241@debbugs.gnu.org; Fri, 12 Nov 2021 15:44:59 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 1C8836FF25 for <51241@debbugs.gnu.org>; Fri, 12 Nov 2021 20:44:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo05-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo05-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v9lRdokr36YT for <51241@debbugs.gnu.org>; Fri, 12 Nov 2021 20:44:49 +0000 (UTC) Received: from localhost.localdomain (unknown [108.162.141.208]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id C667A70911 for <51241@debbugs.gnu.org>; Fri, 12 Nov 2021 20:44:49 +0000 (UTC) From: Simon South Date: Fri, 12 Nov 2021 15:44:40 -0500 Message-Id: X-Mailer: git-send-email 2.33.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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 (---) Apply a patch backported from Ragel's "ragel-6" branch that allows it to reliably generate usable code on systems such as aarch64-linux where the C/C++ "char" type is unsigned by default, fixing the build of Knot on these systems. * gnu/packages/patches/ragel-decide-signedness-of-char.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/ragel.scm (ragel)[source]: Apply it. --- gnu/local.mk | 1 + .../ragel-decide-signedness-of-char.patch | 42 +++++++++++++++++++ gnu/packages/ragel.scm | 7 +++- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ragel-decide-signedness-of-char.patch diff --git a/gnu/local.mk b/gnu/local.mk index 208875754b..2b66d7c07c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1717,6 +1717,7 @@ dist_patch_DATA = \ %D%/packages/patches/quassel-qt-514-compat.patch \ %D%/packages/patches/quickswitch-fix-dmenu-check.patch \ %D%/packages/patches/qtwebkit-pbutils-include.patch \ + %D%/packages/patches/ragel-decide-signedness-of-char.patch \ %D%/packages/patches/randomjungle-disable-static-build.patch \ %D%/packages/patches/rapicorn-isnan.patch \ %D%/packages/patches/rapidjson-gcc-compat.patch \ diff --git a/gnu/packages/patches/ragel-decide-signedness-of-char.patch b/gnu/packages/patches/ragel-decide-signedness-of-char.patch new file mode 100644 index 0000000000..b3b2bf958a --- /dev/null +++ b/gnu/packages/patches/ragel-decide-signedness-of-char.patch @@ -0,0 +1,42 @@ +From 2e638fccd81e96ce09841adc4b295b5ce694ea73 Mon Sep 17 00:00:00 2001 +From: Adrian Thurston +Date: Sat, 6 Nov 2021 12:20:05 -0700 +Subject: [PATCH] C char type: decide signedness of char based on CHAR_MIN + +Previously had char fixed to signed char, this is not useful on ARM as it does +not align with the host type. Instead, decide at runtime (or probably compile +time) if char is signed or not. +--- + ragel/common.cpp | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/ragel/common.cpp b/ragel/common.cpp +index 8e9f8ed0..55875c06 100644 +--- a/ragel/common.cpp ++++ b/ragel/common.cpp +@@ -27,14 +27,14 @@ + + HostType hostTypesC[] = + { +- { "char", 0, "char", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, sizeof(char) }, +- { "unsigned", "char", "uchar", false, true, false, 0, 0, 0, UCHAR_MAX, sizeof(unsigned char) }, +- { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, sizeof(short) }, +- { "unsigned", "short", "ushort", false, true, false, 0, 0, 0, USHRT_MAX, sizeof(unsigned short) }, +- { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, sizeof(int) }, +- { "unsigned", "int", "uint", false, true, false, 0, 0, 0, UINT_MAX, sizeof(unsigned int) }, +- { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, 0, 0, sizeof(long) }, +- { "unsigned", "long", "ulong", false, true, false, 0, 0, 0, ULONG_MAX, sizeof(unsigned long) } ++ { "char", 0, "char", (CHAR_MIN != 0), true, false, SCHAR_MIN, SCHAR_MAX, 0, UCHAR_MAX, sizeof(char) }, ++ { "unsigned", "char", "uchar", false, true, false, 0, 0, 0, UCHAR_MAX, sizeof(unsigned char) }, ++ { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, sizeof(short) }, ++ { "unsigned", "short", "ushort", false, true, false, 0, 0, 0, USHRT_MAX, sizeof(unsigned short) }, ++ { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, sizeof(int) }, ++ { "unsigned", "int", "uint", false, true, false, 0, 0, 0, UINT_MAX, sizeof(unsigned int) }, ++ { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, 0, 0, sizeof(long) }, ++ { "unsigned", "long", "ulong", false, true, false, 0, 0, 0, ULONG_MAX, sizeof(unsigned long) } + }; + + #define S8BIT_MIN -128 +-- +2.33.1 + diff --git a/gnu/packages/ragel.scm b/gnu/packages/ragel.scm index 1d9b67a6e0..8b5100330a 100644 --- a/gnu/packages/ragel.scm +++ b/gnu/packages/ragel.scm @@ -34,7 +34,12 @@ (define-public ragel version ".tar.gz")) (sha256 (base32 - "0gvcsl62gh6sg73nwaxav4a5ja23zcnyxncdcdnqa2yjcpdnw5az")))) + "0gvcsl62gh6sg73nwaxav4a5ja23zcnyxncdcdnqa2yjcpdnw5az")) + (patches + (search-patches + ;; A backported fix for aarch64-linux, where the C/C++ "char" + ;; type is unsigned by default. + "ragel-decide-signedness-of-char.patch")))) (build-system gnu-build-system) (home-page "https://www.colm.net/open-source/ragel/") (synopsis "State machine compiler") -- 2.33.1 From unknown Sun Jun 22 11:40:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51241] [PATCH 0/1] gnu: ragel: Fix build of knot on aarch64-linux. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 19 Dec 2021 22:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Simon South Cc: 51241@debbugs.gnu.org Received: via spool by 51241-submit@debbugs.gnu.org id=B51241.16399530352320 (code B ref 51241); Sun, 19 Dec 2021 22:31:01 +0000 Received: (at 51241) by debbugs.gnu.org; 19 Dec 2021 22:30:35 +0000 Received: from localhost ([127.0.0.1]:48447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mz4hP-0000bM-Ji for submit@debbugs.gnu.org; Sun, 19 Dec 2021 17:30:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51052) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mz4hO-0000b9-01 for 51241@debbugs.gnu.org; Sun, 19 Dec 2021 17:30:34 -0500 Received: from [2001:470:142:3::e] (port=47622 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mz4hI-000865-GL; Sun, 19 Dec 2021 17:30:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=JcQpXO0zTA1ug52MGWH053uTHc8GLqfugKN+rE3brLU=; b=KxWBIumPZxN2FdFwlkcA 7J8ng49zVi7M1/f9IC4R1QDR3JrQp+uh9TdYnjj4VCXOGZuVlv8yCNuMZ6KaGnN3iu9YTBx1KxoNA kWfs070QPiCqGhOX++Fmgnsh6+cRf3E3AkujHrXpVNuiAKRGRPiCYniw85toPrZc+wsVY70JTK/0v +vQUH8hYTfDHKZr0pSLRjhwC/cW22FQiFfDv0P0tW+BEc7UY1oLKfujSv9K0/CYx8fmKjYv0KykP4 OK2nwP2GY8hJwjmpqhs1056gI2KIohVOf6KbbsCzp1FBcxW7LkClhizmcUkXbSkEXP6gUstWyGqAs Ys26Cj35cM4BuA==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:59694 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mz4hI-0004Zg-FI; Sun, 19 Dec 2021 17:30:28 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Sun, 19 Dec 2021 23:30:26 +0100 In-Reply-To: (Simon South's message of "Fri, 12 Nov 2021 15:44:40 -0500") Message-ID: <8735momdml.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) 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 (---) Hi, Simon South skribis: > Apply a patch backported from Ragel's "ragel-6" branch that allows it to > reliably generate usable code on systems such as aarch64-linux where the = C/C++ > "char" type is unsigned by default, fixing the build of Knot on these sys= tems. > > * gnu/packages/patches/ragel-decide-signedness-of-char.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add it. > * gnu/packages/ragel.scm (ragel)[source]: Apply it. Could you check whether this is still needed on current master, ca. 9b38d9b3b34edb55f7f42b72a611b39e5164cf9f? =E2=80=98guix refresh -l ragel=E2=80=99 reports 5K dependents, so we=E2=80= =99d need to apply the patch conditionally for aarch64 in a phase, or something along these lines. Thanks, Ludo=E2=80=99. From unknown Sun Jun 22 11:40:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51241] [PATCH 0/1] gnu: ragel: Fix build of knot on aarch64-linux. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 20 Dec 2021 22:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 51241@debbugs.gnu.org Received: via spool by 51241-submit@debbugs.gnu.org id=B51241.16400411054437 (code B ref 51241); Mon, 20 Dec 2021 22:59:01 +0000 Received: (at 51241) by debbugs.gnu.org; 20 Dec 2021 22:58:25 +0000 Received: from localhost ([127.0.0.1]:51687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzRbt-00019V-2H for submit@debbugs.gnu.org; Mon, 20 Dec 2021 17:58:25 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:46412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzRbr-00019H-AQ for 51241@debbugs.gnu.org; Mon, 20 Dec 2021 17:58:24 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id AA5C446B15; Mon, 20 Dec 2021 22:58:17 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo03-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo03-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kuEj7kt0guit; Mon, 20 Dec 2021 22:58:17 +0000 (UTC) Received: from jupiter (23-233-96-244.cpe.pppoe.ca [23.233.96.244]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 6FE5546B0D; Mon, 20 Dec 2021 22:58:17 +0000 (UTC) From: Simon South References: <8735momdml.fsf_-_@gnu.org> Date: Mon, 20 Dec 2021 17:57:32 -0500 In-Reply-To: <8735momdml.fsf_-_@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sun, 19 Dec 2021 23:30:26 +0100") Message-ID: <874k72yjdv.fsf@simonsouth.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) 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 (---) Ludovic Court=C3=A8s writes: > Could you check whether this is still needed on current master, > ca. 9b38d9b3b34edb55f7f42b72a611b39e5164cf9f? Unfortunately yes; Knot is still failing two "yparser" tests in master (2c469f04a3be) on AArch64. > =E2=80=98guix refresh -l ragel=E2=80=99 reports 5K dependents, so we=E2= =80=99d need to apply the > patch conditionally for aarch64 in a phase, or something along these > lines. I can submit a new patch with this change. Or would it make more sense to apply the existing patch to the version-1.4.0 branch, since it's fixing an issue in master? --=20 Simon South simon@simonsouth.net From unknown Sun Jun 22 11:40:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51241] [PATCH 0/1] gnu: ragel: Fix build of knot on aarch64-linux. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Dec 2021 09:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Simon South Cc: 51241@debbugs.gnu.org Received: via spool by 51241-submit@debbugs.gnu.org id=B51241.16400779638388 (code B ref 51241); Tue, 21 Dec 2021 09:13:01 +0000 Received: (at 51241) by debbugs.gnu.org; 21 Dec 2021 09:12:43 +0000 Received: from localhost ([127.0.0.1]:52346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzbCN-0002BE-0l for submit@debbugs.gnu.org; Tue, 21 Dec 2021 04:12:43 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:58144) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzbCK-0002B1-R1 for 51241@debbugs.gnu.org; Tue, 21 Dec 2021 04:12:41 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 11450478; Tue, 21 Dec 2021 10:12:35 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0cx3joE-EcTQ; Tue, 21 Dec 2021 10:12:34 +0100 (CET) Received: from ribbon (unknown [IPv6:2001:660:6102:320:e120:2c8f:8909:cdfe]) by hera.aquilenet.fr (Postfix) with ESMTPSA id D73BE35C; Tue, 21 Dec 2021 10:12:33 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <8735momdml.fsf_-_@gnu.org> <874k72yjdv.fsf@simonsouth.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 1 =?UTF-8?Q?Niv=C3=B4se?= an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 21 Dec 2021 10:12:33 +0100 In-Reply-To: <874k72yjdv.fsf@simonsouth.net> (Simon South's message of "Mon, 20 Dec 2021 17:57:32 -0500") Message-ID: <877dbyb9tq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 11450478 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCPT_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.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: -0.0 (/) Hi, Simon South skribis: > Ludovic Court=C3=A8s writes: >> Could you check whether this is still needed on current master, >> ca. 9b38d9b3b34edb55f7f42b72a611b39e5164cf9f? > > Unfortunately yes; Knot is still failing two "yparser" tests in master > (2c469f04a3be) on AArch64. > >> =E2=80=98guix refresh -l ragel=E2=80=99 reports 5K dependents, so we=E2= =80=99d need to apply the >> patch conditionally for aarch64 in a phase, or something along these >> lines. > > I can submit a new patch with this change. Or would it make more sense > to apply the existing patch to the version-1.4.0 branch, since it's > fixing an issue in master? Let=E2=80=99s apply a patch that minimizes rebuilds on =E2=80=98master=E2= =80=99 and we=E2=80=99ll cherry-pick in =E2=80=98version-1.4.0=E2=80=99. Thanks, Ludo=E2=80=99. From unknown Sun Jun 22 11:40:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51241] [PATCH 0/1] gnu: ragel: Fix build of knot on aarch64-linux. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Dec 2021 17:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51241@debbugs.gnu.org Cc: ludo@gnu.org Received: via spool by 51241-submit@debbugs.gnu.org id=B51241.16407999787063 (code B ref 51241); Wed, 29 Dec 2021 17:47:02 +0000 Received: (at 51241) by debbugs.gnu.org; 29 Dec 2021 17:46:18 +0000 Received: from localhost ([127.0.0.1]:50266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2d1m-0001pc-7u for submit@debbugs.gnu.org; Wed, 29 Dec 2021 12:46:18 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:54456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2d1k-0001jG-QW for 51241@debbugs.gnu.org; Wed, 29 Dec 2021 12:46:17 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 4D265414D1; Wed, 29 Dec 2021 17:46:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo02-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo02-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2n80aGy3m_Hm; Wed, 29 Dec 2021 17:46:11 +0000 (UTC) Received: from mars.simonsouth.net. (23-233-96-244.cpe.pppoe.ca [23.233.96.244]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id F30B4414CD; Wed, 29 Dec 2021 17:46:10 +0000 (UTC) From: Simon South Date: Wed, 29 Dec 2021 12:46:06 -0500 Message-Id: X-Mailer: git-send-email 2.34.0 In-Reply-To: <877dbyb9tq.fsf@gnu.org> References: <877dbyb9tq.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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 (---) Ludovic Courtès writes: > Let’s apply a patch that minimizes rebuilds on ‘master’ and we’ll > cherry-pick in ‘version-1.4.0’. Here's an updated patch that should do the trick, tested on AArch64 and on x86-64 (where it has no effect). Note I've shortened the name of the patch file in addition to modifying the commit message from the original. Simon South (1): gnu: ragel: Fix build of knot on aarch64-linux. gnu/local.mk | 1 + .../patches/ragel-char-signedness.patch | 42 +++++++++++++++++++ gnu/packages/ragel.scm | 29 ++++++++++++- 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ragel-char-signedness.patch base-commit: 2be274915023cdc0f4b0f4a5ab3690f53c2156c4 -- 2.34.0 From unknown Sun Jun 22 11:40:48 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51241] [PATCH 1/1] gnu: ragel: Fix build of knot on aarch64-linux. Resent-From: Simon South Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Dec 2021 17:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51241 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51241@debbugs.gnu.org Cc: ludo@gnu.org Received: via spool by 51241-submit@debbugs.gnu.org id=B51241.16407999847396 (code B ref 51241); Wed, 29 Dec 2021 17:47:02 +0000 Received: (at 51241) by debbugs.gnu.org; 29 Dec 2021 17:46:24 +0000 Received: from localhost ([127.0.0.1]:50269 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2d1r-0001ub-MD for submit@debbugs.gnu.org; Wed, 29 Dec 2021 12:46:24 -0500 Received: from mailout.easymail.ca ([64.68.200.34]:54484) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n2d1m-0001l9-Am for 51241@debbugs.gnu.org; Wed, 29 Dec 2021 12:46:19 -0500 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 0B3D94127E; Wed, 29 Dec 2021 17:46:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo02-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo02-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M8xqjBhkjKhY; Wed, 29 Dec 2021 17:46:11 +0000 (UTC) Received: from mars.simonsouth.net. (23-233-96-244.cpe.pppoe.ca [23.233.96.244]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id 2564E414CE; Wed, 29 Dec 2021 17:46:11 +0000 (UTC) From: Simon South Date: Wed, 29 Dec 2021 12:46:07 -0500 Message-Id: <8d836816bdc6015fce6a8d4dba10cac38157364b.1640799363.git.simon@simonsouth.net> X-Mailer: git-send-email 2.34.0 In-Reply-To: References: <877dbyb9tq.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) 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 (---) Apply a patch backported from Ragel's "ragel-6" branch that allows it to reliably generate usable code on aarch64-linux where the C/C++ "char" type is unsigned by default, fixing the build of Knot on this platform. * gnu/packages/patches/ragel-char-signedness.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/ragel.scm (ragel)[arguments]: Add custom phase for AArch64 that applies the patch. [native-inputs]: Add "patch" and patch file on AArch64. --- gnu/local.mk | 1 + .../patches/ragel-char-signedness.patch | 42 +++++++++++++++++++ gnu/packages/ragel.scm | 29 ++++++++++++- 3 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ragel-char-signedness.patch diff --git a/gnu/local.mk b/gnu/local.mk index 21e536a635..ebc5426e81 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1726,6 +1726,7 @@ dist_patch_DATA = \ %D%/packages/patches/qtwebkit-fix-building-with-python-3.9.patch \ %D%/packages/patches/qtwebkit-fix-building-with-icu-68.patch \ %D%/packages/patches/qtwebkit-fix-building-with-glib-2.68.patch \ + %D%/packages/patches/ragel-char-signedness.patch \ %D%/packages/patches/randomjungle-disable-static-build.patch \ %D%/packages/patches/range-v3-build-with-gcc10.patch \ %D%/packages/patches/rapicorn-isnan.patch \ diff --git a/gnu/packages/patches/ragel-char-signedness.patch b/gnu/packages/patches/ragel-char-signedness.patch new file mode 100644 index 0000000000..b3b2bf958a --- /dev/null +++ b/gnu/packages/patches/ragel-char-signedness.patch @@ -0,0 +1,42 @@ +From 2e638fccd81e96ce09841adc4b295b5ce694ea73 Mon Sep 17 00:00:00 2001 +From: Adrian Thurston +Date: Sat, 6 Nov 2021 12:20:05 -0700 +Subject: [PATCH] C char type: decide signedness of char based on CHAR_MIN + +Previously had char fixed to signed char, this is not useful on ARM as it does +not align with the host type. Instead, decide at runtime (or probably compile +time) if char is signed or not. +--- + ragel/common.cpp | 16 ++++++++-------- + 1 file changed, 8 insertions(+), 8 deletions(-) + +diff --git a/ragel/common.cpp b/ragel/common.cpp +index 8e9f8ed0..55875c06 100644 +--- a/ragel/common.cpp ++++ b/ragel/common.cpp +@@ -27,14 +27,14 @@ + + HostType hostTypesC[] = + { +- { "char", 0, "char", true, true, false, CHAR_MIN, CHAR_MAX, 0, 0, sizeof(char) }, +- { "unsigned", "char", "uchar", false, true, false, 0, 0, 0, UCHAR_MAX, sizeof(unsigned char) }, +- { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, sizeof(short) }, +- { "unsigned", "short", "ushort", false, true, false, 0, 0, 0, USHRT_MAX, sizeof(unsigned short) }, +- { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, sizeof(int) }, +- { "unsigned", "int", "uint", false, true, false, 0, 0, 0, UINT_MAX, sizeof(unsigned int) }, +- { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, 0, 0, sizeof(long) }, +- { "unsigned", "long", "ulong", false, true, false, 0, 0, 0, ULONG_MAX, sizeof(unsigned long) } ++ { "char", 0, "char", (CHAR_MIN != 0), true, false, SCHAR_MIN, SCHAR_MAX, 0, UCHAR_MAX, sizeof(char) }, ++ { "unsigned", "char", "uchar", false, true, false, 0, 0, 0, UCHAR_MAX, sizeof(unsigned char) }, ++ { "short", 0, "short", true, true, false, SHRT_MIN, SHRT_MAX, 0, 0, sizeof(short) }, ++ { "unsigned", "short", "ushort", false, true, false, 0, 0, 0, USHRT_MAX, sizeof(unsigned short) }, ++ { "int", 0, "int", true, true, false, INT_MIN, INT_MAX, 0, 0, sizeof(int) }, ++ { "unsigned", "int", "uint", false, true, false, 0, 0, 0, UINT_MAX, sizeof(unsigned int) }, ++ { "long", 0, "long", true, true, false, LONG_MIN, LONG_MAX, 0, 0, sizeof(long) }, ++ { "unsigned", "long", "ulong", false, true, false, 0, 0, 0, ULONG_MAX, sizeof(unsigned long) } + }; + + #define S8BIT_MIN -128 +-- +2.33.1 + diff --git a/gnu/packages/ragel.scm b/gnu/packages/ragel.scm index 1d9b67a6e0..d4016ed5ba 100644 --- a/gnu/packages/ragel.scm +++ b/gnu/packages/ragel.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Ricardo Wurmus ;;; Copyright © 2019 Tobias Geerinckx-Rice +;;; Copyright © 2021 Simon South ;;; ;;; This file is part of GNU Guix. ;;; @@ -22,7 +23,9 @@ (define-module (gnu packages ragel) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) - #:use-module (gnu packages)) + #:use-module (guix utils) + #:use-module (gnu packages) + #:use-module (gnu packages base)) (define-public ragel (package @@ -36,6 +39,30 @@ (define-public ragel (base32 "0gvcsl62gh6sg73nwaxav4a5ja23zcnyxncdcdnqa2yjcpdnw5az")))) (build-system gnu-build-system) + (arguments + (if (target-aarch64?) + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'apply-char-signedness-fix + ;; Apply a backported fix for aarch64-linux, where the C/C++ + ;; "char" type is unsigned by default. + ;; + ;; The patch is applied in this custom phase and not via the + ;; "origin" object above to avoid rebuilding a large number of + ;; packages on other platforms. + (lambda _ + (let ((patch + (search-input-file %build-inputs "/bin/patch")) + (char-signedness-patch + (assoc-ref %build-inputs "char-signedness-patch"))) + (invoke patch "-p1" "-i" char-signedness-patch)))))) + '())) + (native-inputs + (if (target-aarch64?) + `(("char-signedness-patch" + ,(search-patch "ragel-char-signedness.patch")) + ("patch" ,patch)) + '())) (home-page "https://www.colm.net/open-source/ragel/") (synopsis "State machine compiler") (description -- 2.34.0 From unknown Sun Jun 22 11:40:48 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Simon South Subject: bug#51241: closed (Re: [PATCH 1/1] gnu: ragel: Fix build of knot on aarch64-linux.) Message-ID: References: <87fsq8ptrl.fsf@gnu.org> X-Gnu-PR-Message: they-closed 51241 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 51241@debbugs.gnu.org Date: Fri, 31 Dec 2021 17:30:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1640971803-32147-1" This is a multi-part message in MIME format... ------------=_1640971803-32147-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #51241: [PATCH 0/1] gnu: ragel: Fix build of knot on aarch64-linux. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 51241@debbugs.gnu.org. --=20 51241: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D51241 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1640971803-32147-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 51241-done) by debbugs.gnu.org; 31 Dec 2021 17:29:59 +0000 Received: from localhost ([127.0.0.1]:57386 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3Lj5-0008Lq-2C for submit@debbugs.gnu.org; Fri, 31 Dec 2021 12:29:59 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:58282) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n3Lj3-0008Lb-Rk for 51241-done@debbugs.gnu.org; Fri, 31 Dec 2021 12:29:58 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 1B8A6287; Fri, 31 Dec 2021 18:29:52 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sTgy1rSVOkqn; Fri, 31 Dec 2021 18:29:51 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id AEC8242B; Fri, 31 Dec 2021 18:29:50 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon South Subject: Re: [PATCH 1/1] gnu: ragel: Fix build of knot on aarch64-linux. References: <877dbyb9tq.fsf@gnu.org> <8d836816bdc6015fce6a8d4dba10cac38157364b.1640799363.git.simon@simonsouth.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 11 =?utf-8?Q?Niv=C3=B4se?= an 230 de la =?utf-8?Q?R?= =?utf-8?Q?=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Fri, 31 Dec 2021 18:29:50 +0100 In-Reply-To: <8d836816bdc6015fce6a8d4dba10cac38157364b.1640799363.git.simon@simonsouth.net> (Simon South's message of "Wed, 29 Dec 2021 12:46:07 -0500") Message-ID: <87fsq8ptrl.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: / Authentication-Results: hera.aquilenet.fr; none X-Rspamd-Server: hera X-Rspamd-Queue-Id: 1B8A6287 X-Spamd-Result: default: False [-0.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 51241-done Cc: 51241-done@debbugs.gnu.org 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: -0.0 (/) Hi, Simon South skribis: > Apply a patch backported from Ragel's "ragel-6" branch that allows it to > reliably generate usable code on aarch64-linux where the C/C++ "char" typ= e is > unsigned by default, fixing the build of Knot on this platform. > > * gnu/packages/patches/ragel-char-signedness.patch: New file. > * gnu/local.mk (dist_patch_DATA): Add it. > * gnu/packages/ragel.scm (ragel)[arguments]: Add custom phase for AArch64= that > applies the patch. > [native-inputs]: Add "patch" and patch file on AArch64. Applied, thanks! Ludo=E2=80=99. ------------=_1640971803-32147-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 16 Oct 2021 17:04:59 +0000 Received: from localhost ([127.0.0.1]:42950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbn7D-0002UP-DB for submit@debbugs.gnu.org; Sat, 16 Oct 2021 13:04:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:57688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mbn78-0002UE-Cb for submit@debbugs.gnu.org; Sat, 16 Oct 2021 13:04:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbn77-0002HQ-RO for guix-patches@gnu.org; Sat, 16 Oct 2021 13:04:54 -0400 Received: from mailout.easymail.ca ([64.68.200.34]:46220) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mbn74-0001V0-Sq for guix-patches@gnu.org; Sat, 16 Oct 2021 13:04:53 -0400 Received: from localhost (localhost [127.0.0.1]) by mailout.easymail.ca (Postfix) with ESMTP id 42A851361 for ; Sat, 16 Oct 2021 17:04:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at emo02-pco.easydns.vpn Received: from mailout.easymail.ca ([127.0.0.1]) by localhost (emo02-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0q4p0ge6Hj3Y for ; Sat, 16 Oct 2021 17:04:47 +0000 (UTC) Received: from localhost.localdomain (unknown [108.162.141.208]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mailout.easymail.ca (Postfix) with ESMTPSA id EA8811350 for ; Sat, 16 Oct 2021 17:04:46 +0000 (UTC) From: Simon South To: guix-patches@gnu.org Subject: [PATCH 0/1] gnu: ragel: Fix build of knot on aarch64-linux. Date: Sat, 16 Oct 2021 13:04:19 -0400 Message-Id: X-Mailer: git-send-email 2.25.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=64.68.200.34; envelope-from=simon@simonsouth.net; helo=mailout.easymail.ca X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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: -2.3 (--) This change fixes the build of Knot on AArch64 by patching Ragel to be explicit in its use of signed "char" types and ranges rather than assuming "char" is signed by default on all platforms, as it is not on aarch64-linux. Presently Knot's test suite is failing on aarch64-linux due to the src/libknot/ypbody.c file being improperly recreated in the package's "update-parser" phase. From Knot's runtests.log: ok 139 - set input string # wanted: 0 # seen: -999 not ok 140 - parse key with a value in UTF-8 not ok 141 - compare UTF-8 value 1..141 # Looks like you failed 2 tests of 141 With the patch applied, ypbody.c is generated as expected (including now the explicit use of "signed char" where intended) and the tests pass. I've tested these changes on AArch64 and x86-64. On the latter I've sucessfully re-built the output of "guix refresh --list-dependent ragel" with the exception of ccextractor, which fails (even without this patch) for an unrelated reason. (On AArch64 this rebuild would be an unreasonably large task, though the immediate dependents all build fine.) -- Simon South simon@simonsouth.net Simon South (1): gnu: ragel: Fix build of knot on aarch64-linux. gnu/local.mk | 1 + .../ragel-specify-char-signedness.patch | 58 +++++++++++++++++++ gnu/packages/ragel.scm | 4 +- 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ragel-specify-char-signedness.patch base-commit: 34b0aa16e77bdbb5b847267eb0f825a590e3d101 -- 2.33.0 ------------=_1640971803-32147-1--