GNU bug report logs - #48788
[PATCH] gnu: libaio: Fix build with newer GCC versions.

Previous Next

Package: guix-patches;

Reported by: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>

Date: Wed, 2 Jun 2021 10:02:01 UTC

Severity: normal

Tags: patch

Done: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48788 in the body.
You can then email your comments to 48788 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#48788; Package guix-patches. (Wed, 02 Jun 2021 10:02:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jonathan Brielmaier <jonathan.brielmaier <at> web.de>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 02 Jun 2021 10:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
To: guix-patches <at> gnu.org
Cc: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
Subject: [PATCH] gnu: libaio: Fix build with newer GCC versions.
Date: Wed,  2 Jun 2021 12:01:07 +0200
* gnu/packages/patches/libaio-fix-build.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/linux.scm (libaio): Use the patch.
---
 gnu/local.mk                                |  1 +
 gnu/packages/linux.scm                      |  1 +
 gnu/packages/patches/libaio-fix-build.patch | 46 +++++++++++++++++++++
 3 files changed, 48 insertions(+)
 create mode 100644 gnu/packages/patches/libaio-fix-build.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index d5a832146e..1e8dab8989 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1251,6 +1251,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/jfsutils-include-systypes.patch		\
   %D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch	\
   %D%/packages/patches/kdbusaddons-kinit-file-name.patch	\
+  %D%/packages/patches/libaio-fix-build.patch	\
   %D%/packages/patches/libblockdev-glib-compat.patch		\
   %D%/packages/patches/libffi-3.3-powerpc-fixes.patch		\
   %D%/packages/patches/libffi-float128-powerpc64le.patch	\
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index cf020a153b..427335c8d5 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4861,6 +4861,7 @@ Linux Device Mapper multipathing driver:
               (uri (list
                     (string-append "https://releases.pagure.org/libaio/"
                                    name "-" version ".tar.gz")))
+              (patches (search-patches "libaio-fix-build.patch"))
               (sha256
                (base32
                 "14mlqdapjqq1dhpkdgy5z83mvsaz36fcxca7a4z6hinmr7r6415b"))))
diff --git a/gnu/packages/patches/libaio-fix-build.patch b/gnu/packages/patches/libaio-fix-build.patch
new file mode 100644
index 0000000000..68b69a5fb2
--- /dev/null
+++ b/gnu/packages/patches/libaio-fix-build.patch
@@ -0,0 +1,46 @@
+From b9e17f6afdc4d0e81b1598aecea7b80d0c54b13a Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem <at> hadrons.org>
+Date: Jul 29 2019 16:26:10 +0000
+Subject: harness: Use destination strncpy() expression for sizeof() argument
+
+
+Even though this is the same size, as the sizeof() is derived from the
+source expression, recent gcc versions will emit a warning, which is
+turned into an error by -Werror:
+
+  error: argument to ‘sizeof’ in ‘strncpy’ call is the same expression
+    as the source; did you mean to use the size of the destination?
+    [-Werror=sizeof-pointer-memaccess]
+
+Signed-off-by: Guillem Jover <guillem <at> hadrons.org>
+Signed-off-by: Jeff Moyer <jmoyer <at> redhat.com>
+
+---
+
+diff --git a/harness/cases/19.t b/harness/cases/19.t
+index 4989510..5c3e0d6 100644
+--- a/harness/cases/19.t
++++ b/harness/cases/19.t
+@@ -41,7 +41,7 @@ open_temp_file(void)
+ 	int fd;
+ 	char template[sizeof(TEMPLATE)];
+
+-	strncpy(template, TEMPLATE, sizeof(TEMPLATE));
++	strncpy(template, TEMPLATE, sizeof(template));
+ 	fd = mkostemp(template, O_DIRECT);
+ 	if (fd < 0) {
+ 		perror("mkstemp");
+diff --git a/harness/cases/21.t b/harness/cases/21.t
+index 441eaa8..fe33a9d 100644
+--- a/harness/cases/21.t
++++ b/harness/cases/21.t
+@@ -43,7 +43,7 @@ open_temp_file()
+ 	int fd;
+ 	char temp_file[sizeof(TEMPLATE)];
+
+-	strncpy(temp_file, TEMPLATE, sizeof(TEMPLATE));
++	strncpy(temp_file, TEMPLATE, sizeof(temp_file));
+ 	fd = mkstemp(temp_file);
+ 	if (fd < 0) {
+ 		perror("mkstemp");
+
--
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#48788; Package guix-patches. (Wed, 02 Jun 2021 10:05:01 GMT) Full text and rfc822 format available.

Message #8 received at 48788 <at> debbugs.gnu.org (full text, mbox):

From: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
To: 48788 <at> debbugs.gnu.org
Subject: [PATCH] gnu: libaio: Fix build with newer GCC versions.
Date: Wed, 2 Jun 2021 12:04:52 +0200
This should go to core-updates as libaio is failing there due to a newer
GCC version.




Reply sent to Jonathan Brielmaier <jonathan.brielmaier <at> web.de>:
You have taken responsibility. (Thu, 08 Jul 2021 20:58:01 GMT) Full text and rfc822 format available.

Notification sent to Jonathan Brielmaier <jonathan.brielmaier <at> web.de>:
bug acknowledged by developer. (Thu, 08 Jul 2021 20:58:02 GMT) Full text and rfc822 format available.

Message #13 received at 48788-done <at> debbugs.gnu.org (full text, mbox):

From: Jonathan Brielmaier <jonathan.brielmaier <at> web.de>
To: 48788-done <at> debbugs.gnu.org
Subject: [PATCH] gnu: libaio: Fix build with newer GCC versions.
Date: Thu, 8 Jul 2021 22:57:42 +0200
Not required anymore. libaio builds fine one core-updates now without
this patch.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 06 Aug 2021 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 261 days ago.

Previous Next


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