[PATCH core-updates-frozen] gnu: libappindicator: Fix build for GCC 10.

  • Done
  • quality assurance status badge
Details
2 participants
  • Guillaume Le Vaillant
  • Sarah Morgensen
Owner
unassigned
Submitted by
Sarah Morgensen
Severity
normal
S
S
Sarah Morgensen wrote on 5 Sep 2021 06:36
(address . guix-patches@gnu.org)
8c337fd0c6a03ad07942a4aa1388e859c9b43af1.1630815574.git.iskarian@mgsn.dev
* gnu/packages/freedesktop.scm (libappindicator): Add snippet to prevent
declaring _PyGObject_API twice.
---
I'm not entirely sure this is the correct fix (I have no expertise with
pygobject), but after reading pygobject.h it's my best guess.

(I'm not sure if adding -fcommon to CFLAGS would cause issues with
dependents not using -fcommon, since this is a library.)

I've tested this to build on x86_64.

gnu/packages/freedesktop.scm | 8 ++++++++
1 file changed, 8 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
index a7766edf04..f7972695e5 100644
--- a/gnu/packages/freedesktop.scm
+++ b/gnu/packages/freedesktop.scm
@@ -24,6 +24,7 @@
;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
;;; Copyright © 2021 pineapples <guixuser6392@protonmail.com>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@mgsn.dev>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2210,6 +2211,13 @@ useful with system integration.")
"https://launchpad.net/libappindicator/"
(version-major+minor version) "/" version
"/+download/libappindicator-" version ".tar.gz"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; Fix 'multiple definitions' error from GCC 10
+ (substitute* "bindings/python/appindicatormodule.c"
+ (("^#include <pygobject.h>" all)
+ (string-append "#define NO_IMPORT_PYGOBJECT\n" all)))))
(sha256
(base32
"17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))

base-commit: 68dd6d809398297dc2ebef522186c9b9f2566739
--
2.32.0
G
G
Guillaume Le Vaillant wrote on 5 Sep 2021 11:13
(name . Sarah Morgensen)(address . iskarian@mgsn.dev)(address . 50392-done@debbugs.gnu.org)
87fsuj2xln.fsf@kitej
Patch pushed as cdb63b192c0756e2cfbe2cf4336ea3670409df57.
Thanks.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYTSKZA8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j8flwEAnphTPkBpBNnAbKzXJgkSVWWcMzFHzkXdGvJJ
sCtNCLIA/jZAvOSgQl2z0DwPyjyg6FbSTx+vRoHgfbLtq3wn1fy3
=GRj3
-----END PGP SIGNATURE-----

Closed
?