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
Update to fc39 #1419
Update to fc39 #1419
Conversation
buildlib/pyverbs_functions.cmake
Outdated
@@ -8,7 +8,7 @@ function(build_module_from_cfiles PY_MODULE MODULE_NAME ALL_CFILES LINKER_FLAGS) | |||
string(REGEX REPLACE "\\.so$" "" SONAME "${MODULE_NAME}${CMAKE_PYTHON_SO_SUFFIX}") | |||
add_library(${SONAME} SHARED ${ALL_CFILES}) | |||
set_target_properties(${SONAME} PROPERTIES | |||
COMPILE_FLAGS "${CMAKE_C_FLAGS} -fPIC -fno-strict-aliasing -Wno-unused-function -Wno-redundant-decls -Wno-shadow -Wno-cast-function-type -Wno-implicit-fallthrough -Wno-unknown-warning -Wno-unknown-warning-option -Wno-deprecated-declarations ${NO_VAR_TRACKING_FLAGS}" | |||
COMPILE_FLAGS "${CMAKE_C_FLAGS} -fPIC -fno-strict-aliasing -Wno-unused-function -Wno-redundant-decls -Wno-shadow -Wno-cast-function-type -Wno-implicit-fallthrough -Wno-deprecated-declarations ${NO_VAR_TRACKING_FLAGS}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably going to break something else.. I guess you need to test the flags for compatability.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see the mentioned c11 warnings/notes now.
Anyway, I understand that it's not related to FC39 specifically, so I'm removing this commit from this PR.
The fedora image the cbuild creates has only cython 3.0.6, that needs to be fixed too CMake Warning (dev) at CMakeLists.txt:218 (FIND_PACKAGE): This warning is for project developers. Use -Wno-dev to suppress it. |
What should be "fixed" here? Currently, cython 3 has a (bug) that prevents us from compiling pyverbs. That's why I disabled pyverbs on any cython3 < 3.0.9 (next release)
I'll address that. FindPythonInterp and FindPythonLibs are replaced with FindPython since cmake 3.12 - should we support backward compatibility with older cmake? |
You have to make the CI pass, so either cbuild has to install a fixed cython somehow, or the rpm build should not fail when it reaches the missing pyverbs. |
Error compiling Cython file: ------------------------------------------------------------ ... """ super().__init__() self.pd = pd self.init_attr.pd = <v.ibv_pd*>pd.pd if pd_context: self.init_attr.alloc = pd_alloc ^ ------------------------------------------------------------ /home/leonro/src/rdma-core/pyverbs/pd.pyx:230:35: Cannot assign type 'void *(ibv_pd *, void *, size_t, size_t, uint64_t) except? NULL' to 'void *(*)(ibv_pd *, void *, size_t, size_t, uint64_t) noexcept'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void *(ibv_pd *, void *, size_t, size_t, uint64_t) except? NULL'. Error compiling Cython file: ------------------------------------------------------------ ... super().__init__() self.pd = pd self.init_attr.pd = <v.ibv_pd*>pd.pd if pd_context: self.init_attr.alloc = pd_alloc self.init_attr.free = pd_free ^ ------------------------------------------------------------ Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Edward Srouji <[email protected]>
Adapt to Cython 3 to get rid of such warnings: "<frozen importlib._bootstrap>:241: UserWarning: enum class rdma_port_space not importable from pyverbs.librdmacm_enums. You are probably using a cpdef enum declared in a .pxd file that does not have a .py or .pyx file. <frozen importlib._bootstrap>:241: UserWarning: enum class ibv_send_flags not importable from pyverbs.libibverbs. You are probably using a cpdef enum declared in a .pxd file that does not have a .py or .pyx file." By adding empty .pyx files with the same name as current .pxd, or by renaming relevant .pxd files where it's possible. Signed-off-by: Edward Srouji <[email protected]>
Replace Cython includes with cimports to work around a Cython 3 bug (#5860 on the Cython GitHub) that causes the following compilation errors: build/pyverbs/device.c:14743:18: error: redefinition of ‘__Pyx_Enum_enum__space_ibv_event_type_to_py’ 14743 | static PyObject *__Pyx_Enum_enum__space_ibv_event_type_to_py(enum ibv_event_type __pyx_v_c_val) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ build/pyverbs/device.c:10914:18: note: previous definition of ‘__Pyx_Enum_enum__space_ibv_event_type_to_py’ with type ‘PyObject *(enum ibv_event_type)’ {aka ‘struct _object *(enum ibv_event_type)’} 10914 | static PyObject *__Pyx_Enum_enum__space_ibv_event_type_to_py(enum ibv_event_type __pyx_v_c_val) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Edward Srouji <[email protected]>
7f06446
to
5cb9dd2
Compare
Fix the following CMake warning in recent versions: "CMake Warning (dev) at CMakeLists.txt:231 (FIND_PACKAGE): Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules are removed. Run "cmake --help-policy CMP0148" for policy details. Use the cmake_policy command to set the policy and suppress this warning. This warning is for project developers. Use -Wno-dev to suppress it." Signed-off-by: Edward Srouji <[email protected]>
Use latest Fedora release Signed-off-by: Leon Romanovsky <[email protected]>
5cb9dd2
to
20ab780
Compare
Updated PR to:
|
Prepare rdma-core for FC39