Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gevent fails to build with Cython 3.0.10 #2031

Open
stratakis opened this issue Apr 24, 2024 · 2 comments
Open

gevent fails to build with Cython 3.0.10 #2031

stratakis opened this issue Apr 24, 2024 · 2 comments

Comments

@stratakis
Copy link

Hi,

I'm currently testing on Fedora a rebase of Cython from 3.0.9 to 3.0.10 and gevent fails to compile. I've tested both 23.9.1 and 24.2.1.

Error:

src/gevent/queue.c: In function ‘__pyx_pf_6gevent_14_gevent_cqueue_12UnboundQueue_2put’:
src/gevent/queue.c:11895:83: error: passing argument 1 of ‘__pyx_vtabptr_6gevent_14_gevent_cqueue_UnboundQueue->__pyx_base.put’ from incompatible pointer type [-Wincompatible-pointer-types]
11895 |   __pyx_t_1 = __pyx_vtabptr_6gevent_14_gevent_cqueue_UnboundQueue->__pyx_base.put(__pyx_v_self, __pyx_v_item, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
      |                                                                                   ^~~~~~~~~~~~
      |                                                                                   |
      |                                                                                   struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue *
src/gevent/queue.c:11895:83: note: expected ‘struct __pyx_obj_6gevent_14_gevent_cqueue_Queue *’ but argument is of type ‘struct __pyx_obj_6gevent_14_gevent_cqueue_UnboundQueue *’
src/gevent/queue.c:11895:114: error: passing argument 4 of ‘__pyx_vtabptr_6gevent_14_gevent_cqueue_UnboundQueue->__pyx_base.put’ from incompatible pointer type [-Wincompatible-pointer-types]
11895 |   __pyx_t_1 = __pyx_vtabptr_6gevent_14_gevent_cqueue_UnboundQueue->__pyx_base.put(__pyx_v_self, __pyx_v_item, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error)
      |                                                                                                                  ^~~~~~~~~~
      |                                                                                                        
      |
      |                                                                                                                  struct __pyx_opt_args_6gevent_14_gevent_cqueue_12UnboundQueue_put *
src/gevent/queue.c:11895:114: note: expected ‘struct __pyx_opt_args_6gevent_14_gevent_cqueue_5Queue_put *’ but argument is of type ‘struct __pyx_opt_args_6gevent_14_gevent_cqueue_12UnboundQueue_put *’
src/gevent/queue.c: At top level:
src/gevent/queue.c:7636:12: warning: ‘__pyx_pw_6gevent_14_gevent_cqueue_5Queue_25__nonzero__’ defined but not used [-Wunused-function]
 7636 | static int __pyx_pw_6gevent_14_gevent_cqueue_5Queue_25__nonzero__(PyObject *__pyx_v_self) {
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Full build log attached.

builder-live.log

@hroncok
Copy link

hroncok commented Apr 25, 2024

Isn't this a Cython problem related to cython/cython#6085 ?

@stratakis
Copy link
Author

Indeed I've managed to workaround the issue by using this patch according to cython/cython#6085 (comment)

--- 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants