unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Andy Tai <atai@atai.org>
To: 63526@debbugs.gnu.org, code@greghogan.com, mirai@makinata.eu
Cc: Andy Tai <atai@atai.org>
Subject: bug#63526: [PATCH v2] gnu (hubbub): Fix build
Date: Sat, 27 May 2023 00:29:04 -0700	[thread overview]
Message-ID: <8a20497755db7ee3c2ecfa9a3fc931011718036d.1685172508.git.atai@atai.org> (raw)
In-Reply-To: <CAJsg1E_iwbiQMQi-xPDwSEa55w3b1OVvv5gjegsHfgutXSFE7A@mail.gmail.com>

Fix for https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63526

* gnu/packages/web.scm (hubbub): [source](patches): Add patch to fix build.
* gnu/packages/patches/hubbub-prevent-Werror-maybe-uninitialized-build-failure-wit.patch: New file
* gnu/local.mk  (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  2 +
 ...aybe-uninitialized-build-failure-wit.patch | 40 +++++++++++++++++++
 gnu/packages/web.scm                          |  4 +-
 3 files changed, 45 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/hubbub-prevent-Werror-maybe-uninitialized-build-failure-wit.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 18e8235140..e2b42ca676 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -58,6 +58,7 @@
 # Copyright © 2022 jgart <jgart@dismail.de>
 # Copyright © 2023 Zheng Junjie <873216071@qq.com>
 # Copyright © 2023 Ivana Drazovic <iv.dra@hotmail.com>
+# Copyright © 2023 Andy Tai <atai@atai.org>
 #
 # This file is part of GNU Guix.
 #
@@ -1349,6 +1350,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/http-parser-CVE-2020-8287.patch		\
   %D%/packages/patches/htslib-for-stringtie.patch		\
   %D%/packages/patches/hubbub-sort-entities.patch		\
+  %D%/packages/patches/hubbub-prevent-Werror-maybe-uninitialized-build-failure-wit.patch \
   %D%/packages/patches/hueplusplus-mbedtls.patch		\
   %D%/packages/patches/hurd-add-without-rump-configure-option.patch \
   %D%/packages/patches/hurd-fix-types-of-read-write-and-readables-methods-2.patch \
diff --git a/gnu/packages/patches/hubbub-prevent-Werror-maybe-uninitialized-build-failure-wit.patch b/gnu/packages/patches/hubbub-prevent-Werror-maybe-uninitialized-build-failure-wit.patch
new file mode 100644
index 0000000000..6f289a770e
--- /dev/null
+++ b/gnu/packages/patches/hubbub-prevent-Werror-maybe-uninitialized-build-failure-wit.patch
@@ -0,0 +1,40 @@
+From 69d81a8a4d4c223aad67cde0fdf64d64351b9802 Mon Sep 17 00:00:00 2001
+From: Andy Tai <atai@atai.org>
+Date: Sat, 27 May 2023 00:01:34 -0700
+Subject: [PATCH] prevent -Werror=maybe-uninitialized build failure with gcc 11
+ when building tests tokeniser2 and tokeniser3
+
+---
+ test/tokeniser2.c | 2 +-
+ test/tokeniser3.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/test/tokeniser2.c b/test/tokeniser2.c
+index c8ab9c0..4caae38 100644
+--- a/test/tokeniser2.c
++++ b/test/tokeniser2.c
+@@ -438,7 +438,7 @@ hubbub_error token_handler(const hubbub_token *token, void *pw)
+ 			/* Expected token only contained part of the data
+ 			 * Calculate how much is left, then try again with
+ 			 * the next expected token */
+-			hubbub_token t;
++			hubbub_token t = { 0 };
+ 
+ 			t.type = HUBBUB_TOKEN_CHARACTER;
+ 			t.data.character.ptr += len;
+diff --git a/test/tokeniser3.c b/test/tokeniser3.c
+index e33d018..b3be901 100644
+--- a/test/tokeniser3.c
++++ b/test/tokeniser3.c
+@@ -447,7 +447,7 @@ hubbub_error token_handler(const hubbub_token *token, void *pw)
+ 			/* Expected token only contained part of the data
+ 			 * Calculate how much is left, then try again with
+ 			 * the next expected token */
+-			hubbub_token t;
++			hubbub_token t = { 0 };
+ 
+ 			t.type = HUBBUB_TOKEN_CHARACTER;
+ 			t.data.character.ptr += len;
+-- 
+2.40.1
+
diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm
index 3af4aa0b8d..387ceac058 100644
--- a/gnu/packages/web.scm
+++ b/gnu/packages/web.scm
@@ -5242,7 +5242,9 @@ (define-public hubbub
        (sha256
         (base32
          "1dimfyblmym98qa1b80c5jslv2zk8r44xbdrgrsrw1n9wr9y4yly"))
-       (patches (search-patches "hubbub-sort-entities.patch"))))
+       (patches (search-patches
+         "hubbub-sort-entities.patch"
+         "hubbub-prevent-Werror-maybe-uninitialized-build-failure-wit.patch"))))
     (build-system gnu-build-system)
     (native-inputs
      (list netsurf-buildsystem

base-commit: b96b82bcd4bc24529941ff74a91432481f1a71b5
-- 
2.40.1





      parent reply	other threads:[~2023-05-27  7:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-15 19:24 bug#63526: hubbub build failure when doing guix package -u Andy Tai
2023-05-22  6:44 ` bug#63526: [PATCH] gnu: hubbub: Disable building tests Andy Tai
2023-05-25 13:02   ` Greg Hogan
2023-05-25 13:35     ` Bruno Victal
2023-05-25 17:54       ` Andy Tai
2023-05-27  7:29 ` Andy Tai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a20497755db7ee3c2ecfa9a3fc931011718036d.1685172508.git.atai@atai.org \
    --to=atai@atai.org \
    --cc=63526@debbugs.gnu.org \
    --cc=code@greghogan.com \
    --cc=mirai@makinata.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).