GNU bug report logs - #51241
[PATCH 0/1] gnu: ragel: Fix build of knot on aarch64-linux.

Previous Next

Package: guix-patches;

Reported by: Simon South <simon <at> simonsouth.net>

Date: Sat, 16 Oct 2021 17:05:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#51241: closed ([PATCH 0/1] gnu: ragel: Fix build of knot on
 aarch64-linux.)
Date: Fri, 31 Dec 2021 17:30:03 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 31 Dec 2021 18:29:50 +0100
with message-id <87fsq8ptrl.fsf <at> gnu.org>
and subject line Re: [PATCH 1/1] gnu: ragel: Fix build of knot on aarch64-linux.
has caused the debbugs.gnu.org bug report #51241,
regarding [PATCH 0/1] gnu: ragel: Fix build of knot on aarch64-linux.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
51241: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=51241
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Simon South <simon <at> simonsouth.net>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/1] gnu: ragel: Fix build of knot on aarch64-linux.
Date: Sat, 16 Oct 2021 13:04:19 -0400
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 <at> 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



[Message part 3 (message/rfc822, inline)]
From: Ludovic Courtès <ludo <at> gnu.org>
To: Simon South <simon <at> simonsouth.net>
Cc: 51241-done <at> debbugs.gnu.org
Subject: Re: [PATCH 1/1] gnu: ragel: Fix build of knot on aarch64-linux.
Date: Fri, 31 Dec 2021 18:29:50 +0100
Hi,

Simon South <simon <at> simonsouth.net> 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" 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.

Applied, thanks!

Ludo’.


This bug report was last modified 3 years and 145 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.