From 12abba8bed181682e559c4f801c5df0d0c1cc953 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 26 Jul 2023 14:42:58 -0400 Subject: [PATCH] Pin Cython < 3 until fixed upstream Cython 3 has broke compatibility with some code that previously built successfully, in this case: ``` /builddir/build/BUILD/rdma-core-46.0/redhat-linux-build/pyverbs/device.c:14510:18: error: redefinition of '__Pyx_Enum_ibv_event_type_to_py' 14510 | static PyObject *__Pyx_Enum_ibv_event_type_to_py(enum ibv_event_type __pyx_v_c_val) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /builddir/build/BUILD/rdma-core-46.0/redhat-linux-build/pyverbs/device.c:10701:18: note: previous definition of '__Pyx_Enum_ibv_event_type_to_py' with type 'PyObject *(enum ibv_event_type)' {aka 'struct _object *(enum ibv_event_type)'} 10701 | static PyObject *__Pyx_Enum_ibv_event_type_to_py(enum ibv_event_type __pyx_v_c_val) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` --- rdma-core.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rdma-core.spec b/rdma-core.spec index 5350203..3a5f482 100644 --- a/rdma-core.spec +++ b/rdma-core.spec @@ -36,7 +36,9 @@ BuildRequires: systemd-devel %endif %if %{with_pyverbs} BuildRequires: python3-devel -BuildRequires: python3-Cython +# FTBFS with Cython 3 +# pyverbs/device.c: error: redefinition of '__Pyx_Enum_ibv_event_type_to_py' +BuildRequires: python3dist(cython) < 3 %else %if 0%{?rhel} >= 8 || 0%{?fedora} >= 30 BuildRequires: python3