]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
python3-pygobject: fix compile error with old GCC
authorRoss Burton <ross.burton@arm.com>
Fri, 23 Jan 2026 14:02:28 +0000 (14:02 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 29 Jan 2026 10:08:55 +0000 (10:08 +0000)
If the build is done with GCC 10 (eg a native build on Debian 11) then
the build fails:

  gi/pygi-resulttuple.c:337:1: error: label at end of compound statement

Backport a patch from upstream to add a missing semicolon.

[ YOCTO #16147 ]

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
meta/recipes-devtools/python/python3-pygobject/semicolon.patch [new file with mode: 0644]
meta/recipes-devtools/python/python3-pygobject_3.54.5.bb

diff --git a/meta/recipes-devtools/python/python3-pygobject/semicolon.patch b/meta/recipes-devtools/python/python3-pygobject/semicolon.patch
new file mode 100644 (file)
index 0000000..54828d7
--- /dev/null
@@ -0,0 +1,31 @@
+From d00ad09688e9dcc42020949e276741d3ae58c10d Mon Sep 17 00:00:00 2001
+From: Dan Yeaw <dan@yeaw.me>
+Date: Mon, 13 Oct 2025 21:45:22 -0400
+Subject: [PATCH] Fix syntax error for missing ;
+
+This fixes a compile error with older GCC, for example GCC 10 on Debian 11:
+
+  gi/pygi-resulttuple.c:337:1: error: label at end of compound statement
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+---
+ gi/pygi-resulttuple.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/gi/pygi-resulttuple.c b/gi/pygi-resulttuple.c
+index 8b793e4d0..4d892e94d 100644
+--- a/gi/pygi-resulttuple.c
++++ b/gi/pygi-resulttuple.c
+@@ -335,7 +335,7 @@ resulttuple_dealloc (PyObject *self)
+     Py_TYPE (self)->tp_free (self);
+ done:
+-    CPy_TRASHCAN_END (self)
++    CPy_TRASHCAN_END (self);
+ }
+ #endif
+-- 
+GitLab
+
index f6ed3ff5fbc8b0426ae603004fc12faf7d12500b..8eb0f9fa6b3f4feb2fc251e351c57edcf4c3e181 100644 (file)
@@ -19,6 +19,8 @@ DEPENDS += "python3 glib-2.0"
 GNOME_COMPRESS_TYPE = "gz"
 GNOMEBN = "pygobject"
 
+SRC_URI += "file://semicolon.patch"
+
 SRC_URI[archive.sha256sum] = "b6656f6348f5245606cf15ea48c384c7f05156c75ead206c1b246c80a22fb585"
 
 S = "${UNPACKDIR}/${GNOMEBN}-${PV}"