diff mbox series

python3-gevent: fix build with Cython 3.0.10

Message ID 20240606171604.3117309-1-ross.burton@arm.com
State Accepted
Headers show
Series python3-gevent: fix build with Cython 3.0.10 | expand

Commit Message

Ross Burton June 6, 2024, 5:16 p.m. UTC
Cython 3.0.10 generates code which causes compiler errors:

src/gevent/queue.c:11894:114: error: passing argument 4 of '__pyx_vtabptr_6gevent_14_gevent_cqueue_UnboundQueue->__pyx_base.put' from incompatible pointer type [-Wincompatible-pointer-types]

From discussion upstream, removing the final decorator works around this.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../python/python3-gevent/not-final.patch        | 16 ++++++++++++++++
 .../python/python3-gevent_24.2.1.bb              |  3 ++-
 2 files changed, 18 insertions(+), 1 deletion(-)
 create mode 100644 meta-python/recipes-devtools/python/python3-gevent/not-final.patch
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-gevent/not-final.patch b/meta-python/recipes-devtools/python/python3-gevent/not-final.patch
new file mode 100644
index 0000000000..444a195da4
--- /dev/null
+++ b/meta-python/recipes-devtools/python/python3-gevent/not-final.patch
@@ -0,0 +1,16 @@ 
+gevent fails to build with Cython 3.0.10.  As per
+https://github.com/gevent/gevent/issues/2031, removing the
+cython.final decorator works around this.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@arm.com>
+
+--- a/src/gevent/_gevent_cqueue.pxd
++++ b/src/gevent/_gevent_cqueue.pxd
+@@ -75,7 +75,6 @@ cdef class ItemWaiter(Waiter):
+     cdef readonly Queue queue
+ 
+ 
+-@cython.final
+ cdef class UnboundQueue(Queue):
+     pass
diff --git a/meta-python/recipes-devtools/python/python3-gevent_24.2.1.bb b/meta-python/recipes-devtools/python/python3-gevent_24.2.1.bb
index fbdbf8ccc7..0a74f52820 100644
--- a/meta-python/recipes-devtools/python/python3-gevent_24.2.1.bb
+++ b/meta-python/recipes-devtools/python/python3-gevent_24.2.1.bb
@@ -13,7 +13,8 @@  RDEPENDS:${PN} = "python3-greenlet \
 		  python3-zopeinterface \
 		 "
 
-SRC_URI += "file://0001-_setuputils.py-Do-not-add-sys_inc_dir.patch"
+SRC_URI += "file://0001-_setuputils.py-Do-not-add-sys_inc_dir.patch \
+	        file://not-final.patch"
 
 SRC_URI[sha256sum] = "432fc76f680acf7cf188c2ee0f5d3ab73b63c1f03114c7cd8a34cebbe5aa2056"