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 <[email protected]>
---
 .../python/python3-pygobject/semicolon.patch  | 31 +++++++++++++++++++
 .../python/python3-pygobject_3.54.5.bb        |  2 ++
 2 files changed, 33 insertions(+)
 create mode 100644 
meta/recipes-devtools/python/python3-pygobject/semicolon.patch

diff --git a/meta/recipes-devtools/python/python3-pygobject/semicolon.patch 
b/meta/recipes-devtools/python/python3-pygobject/semicolon.patch
new file mode 100644
index 0000000000..54828d7707
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-pygobject/semicolon.patch
@@ -0,0 +1,31 @@
+From d00ad09688e9dcc42020949e276741d3ae58c10d Mon Sep 17 00:00:00 2001
+From: Dan Yeaw <[email protected]>
+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 <[email protected]>
+---
+ 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
+
diff --git a/meta/recipes-devtools/python/python3-pygobject_3.54.5.bb 
b/meta/recipes-devtools/python/python3-pygobject_3.54.5.bb
index f6ed3ff5fb..8eb0f9fa6b 100644
--- a/meta/recipes-devtools/python/python3-pygobject_3.54.5.bb
+++ b/meta/recipes-devtools/python/python3-pygobject_3.54.5.bb
@@ -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}"
-- 
2.43.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#229893): 
https://lists.openembedded.org/g/openembedded-core/message/229893
Mute This Topic: https://lists.openembedded.org/mt/117417909/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to