[PATCH] gnu: libusb-0.1: fix build failure on newer gcc

DoneSubmitted by Christopher Howard.
Details
2 participants
  • Christopher Howard
  • Jakub Kądziołka
Owner
unassigned
Severity
normal
C
C
Christopher Howard wrote on 3 May 00:47 +0200
(address . guix-patches@gnu.org)
1a3c1bf5091742ae78a5946c92a622206dcdf596.camel@librehacker.com
I need libusb-0.1 to build some older software, but libusb-0.1 buildfails due to a warning from the current GCC version. (Evidently libusb-0.1 is set to die on any warning.) The attached patch silences thewarning.
-- Christopher Howardp: +1 (907) 374-0257w: https://librehacker.comsocial: https://gnusocial.club/librehackergpg: ADDEAADE5D607C8D (keys.gnupg.net)
From 351bb7004f9bbe8d50bbc7a2e2a1cb3900551e27 Mon Sep 17 00:00:00 2001From: Christopher Howard <christopher@librehacker.com>Date: Sat, 2 May 2020 14:41:00 -0800Subject: [PATCH] gnu: libusb-0.1: fix build failure on newer gcc
Package build fails on truncation warning from current gcc. Silencesthis warning.--- gnu/packages/libusb.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Toggle diff (24 lines)diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scmindex 01c138cb4e..3bb2dcd186 100644--- a/gnu/packages/libusb.scm+++ b/gnu/packages/libusb.scm@@ -8,6 +8,7 @@ ;;; Copyright © 2017 Jonathan Brielmaier <jonathan.brielmaier@web.de> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>+;;; Copyright © 2020 Christopher Howard <christopher@librehacker.com> ;;; ;;; This file is part of GNU Guix. ;;;@@ -113,7 +114,8 @@ version of libusb to run with newer libusb.") (sha256 (base32 "0i4bacxkyr7xyqxbmb00ypkrv4swkgm0mghbzjsnw6blvvczgxip"))- (patches (search-patches "libusb-0.1-disable-tests.patch"))))))+ (patches (search-patches "libusb-0.1-disable-tests.patch"))))+ (arguments `(#:configure-flags (list "CFLAGS=-Wno-format-truncation"))))) (define-public libusb4java ;; There is no public release so we take the latest version from git.-- 2.26.2
J
J
Jakub Kądziołka wrote on 3 May 12:58 +0200
(name . Christopher Howard)(address . christopher@librehacker.com)(address . guix-patches@gnu.org)
20200503105846.fvouqze7r5qhb5nf@gravity
On Sat, May 02, 2020 at 02:47:56PM -0800, Christopher Howard wrote:
Toggle quote (5 lines)> I need libusb-0.1 to build some older software, but libusb-0.1 build> fails due to a warning from the current GCC version. (Evidently libusb-> 0.1 is set to die on any warning.) The attached patch silences the> warning.
Thanks for your patch! I'm wondering though, whether it wouldn't be moreresilient to add a -Wno-error flag instead. After all, the compiler isgoing to get upgraded sooner or later, which will introduce newwarnings, and libusb 0.1 isn't getting any upgrades...
A quick grep suggests that this wouldn't be the first package to disableWerror. Makes sense, since this mode is mostly useful to developers, andnot packagers.
What do you think?
Kind regards,Jakub Kądziołka
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl6uo+UACgkQ4xWnWEYTFWT9+Q/9HjHQs3ctKLH6EnMjWfaOyxGmCPE7TjpTr8mMG1F1eR0ONLOnSxHe88AcVItBgOUkh9On7dTvaLCP902lMn1oyvGvDADpIgf9COSr+X/U8RRHiSVACCe/4DeLLf0+1nFItKgrpGPA4K9nwhKq8AExdbokMCtxpGQfmORbtcY0p7b9VZNTUSrEdcZKEJrlvv+EiLkyzB8ovmWqDSbyPpJ/3Oj6TcXaJFaXTzQtzQUfXb1YxXxuPSf6VuRZQMA76RywZiZGRJBk+Qmka7FtP6YWlsh75Pd+DIwybrwGG4Sz/68atDNC9gOXVykCp3dSrwYqgxfpD4IaVLWNvzRxRRoVdp8dApoC89xZnvVGe0nn0Zqz47wPgqGPNiP4IH1jvdhqBRRb8kfVJIxArZD0qpwxiHE8LtNt5DCoqCYO86GKbbk+sbltZa53YBSzHbqbi+dGitNZlOZNhv2tYg+R7NyrTTspccdrtgixnskbO/BLLURq8unJeewjUUCnqDFQ2LjDxX11ifApTYZAs8KY5U3jHqVkeDQY6peTJSVDIvLZjWeekCUbC7grJ0wGUYYziXkzJBxkkEukjQuKp049UWxJsiEU5aXJzebkTN/ZdNKgbcAYKh24AgGnc4PNrxRGf/Ta1N1U+Hzaj89dsUXPP3uSMP6khFv5m2UDxG55Y2JawZk==vddo-----END PGP SIGNATURE-----

C
C
Christopher Howard wrote on 3 May 18:13 +0200
(name . Jakub Kądziołka)(address . kuba@kadziolka.net)(address . guix-patches@gnu.org)
ab5e62e0da536c777dbb2856400620808b3de963.camel@librehacker.com
Sounds good to me. Can you make the edit to the patch?
-- Christopher Howardp: +1 (907) 374-0257w: https://librehacker.comsocial: https://gnusocial.club/librehackergpg: ADDEAADE5D607C8D (keys.gnupg.net)
On Sun, 2020-05-03 at 12:58 +0200, Jakub Kądziołka wrote:
Toggle quote (25 lines)> On Sat, May 02, 2020 at 02:47:56PM -0800, Christopher Howard wrote:> > I need libusb-0.1 to build some older software, but libusb-0.1> > build> > fails due to a warning from the current GCC version. (Evidently> > libusb-> > 0.1 is set to die on any warning.) The attached patch silences the> > warning.> > Thanks for your patch! I'm wondering though, whether it wouldn't be> more> resilient to add a -Wno-error flag instead. After all, the compiler> is> going to get upgraded sooner or later, which will introduce new> warnings, and libusb 0.1 isn't getting any upgrades...> > A quick grep suggests that this wouldn't be the first package to> disable> Werror. Makes sense, since this mode is mostly useful to developers,> and> not packagers.> > What do you think?> > Kind regards,> Jakub Kądziołka
J
J
Jakub Kądziołka wrote on 3 May 22:56 +0200
(name . Christopher Howard)(address . christopher@librehacker.com)(address . 41033-done@debbugs.gnu.org)
20200503205659.yee5vejdbqoic2c3@gravity
On Sun, May 03, 2020 at 08:13:32AM -0800, Christopher Howard wrote:
Toggle quote (2 lines)> Sounds good to me. Can you make the edit to the patch?
Sure! I pushed the modified patch:
commit 96e399ee30251a0767a45b2bde3f052b25c62714 (HEAD -> master, upstream/master)Author: Christopher Howard <christopher@librehacker.com>Date: Sat May 2 14:41:00 2020 -0800
gnu: libusb-0.1: fix build failure on newer gcc
* gnu/packages/libusb.scm (libusb-0.1): Disable -Werror.
Signed-off-by: Jakub Kądziołka <kuba@kadziolka.net>
Cheers!
-----BEGIN PGP SIGNATURE-----
iQIzBAABCAAdFiEE5Xa/ss9usT31cTO54xWnWEYTFWQFAl6vMBcACgkQ4xWnWEYTFWQRMA/9EIyjFBDApsKuaNieoMUYVh40J4rZKmsf8eFQxHtGiPMrvveoJ+lC8jOsWFjJewl3MVcsLwIhLFJXVapRLJhmORyxe57V2vhsk17oQkuS0inPee18K8rRYz4lwAdL7vxfuILTwlpgqIgLxM29MqU/9NqXEMC+P6/gplJIJ450xtgiUTfi6Mqg5XsmwXm5M073xU2rI2fQxjv3G9QKo4MCSoJ9UrQhbqt28UbclWUGXPw/+X5CA9gLUq6JjPjKG3r0M1nzY8FpKcIwjgdPhoi3vzSCbwCztXyFUzvWly9sUKOAsGy4rwczt0M1wPxm0jBQBSGDBVUji2nJHnBAmzxOkoRWah02c95zmGEbr2T8KtZK2wCvLRnnvAXuoo2OKEO/wkWUUFXIZn40wmN5QFbmPbb1E72xx5Oj8moJ6Dl7nwpukGiOQeGnw5xukNQhqb3n0dsbL4GP1UsEiC6t5X6fuAsWwWxTErJqy5kUqGptsIW2J3PMJWjsVx6Dk767VLsMZ1c7OegxqSjQbAy/4lfqW1Eh7Hj+1Ewcs41R5+iZe753B71aDG8rVYthuLS8j8R1IDQTBKV0cV6RG1uQlf/8anSA3s0KSPy2yTmKx2mE2lhhpB/KNMnFZu5UvNXNUx/Y/d51N8jtIxwNw0rFit1gyoTzXrkebIcx95Wzrpf6OmA==VBpW-----END PGP SIGNATURE-----

Closed
?