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

Build failure: ceph (cython failure) #302224

Closed
danielbarter opened this issue Apr 7, 2024 · 6 comments
Closed

Build failure: ceph (cython failure) #302224

danielbarter opened this issue Apr 7, 2024 · 6 comments

Comments

@danielbarter
Copy link
Contributor

danielbarter commented Apr 7, 2024

Steps To Reproduce

I am seeing cython errors building ceph on staging. Running nix-build -E 'with import /path/to/nixpkgs {}; ceph.

Build log

https://gist.github.com/danielbarter/ee6dfb258427a3f9fdab64745876ee26

...
Error compiling Cython file:
------------------------------------------------------------
...
        """
        name = cstr(name, 'name')
        cdef:
            rados_ioctx_t _ioctx = convert_ioctx(ioctx)
            char *_name = name
            librbd_progress_fn_t _prog_cb = &no_op_progress_callback
                                            ^
------------------------------------------------------------

rbd.pyx:760:44: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
            rados_ioctx_t _ioctx = convert_ioctx(ioctx)
            char *_name = name
            librbd_progress_fn_t _prog_cb = &no_op_progress_callback
            void *_prog_arg = NULL
        if on_progress:
            _prog_cb = &progress_callback
                       ^
------------------------------------------------------------

rbd.pyx:763:23: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1 nogil' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
        image_id = cstr(image_id, 'image_id')
        cdef:
            rados_ioctx_t _ioctx = convert_ioctx(ioctx)
            char *_image_id = image_id
            int _force = force
            librbd_progress_fn_t _prog_cb = &no_op_progress_callback
                                            ^
------------------------------------------------------------

rbd.pyx:868:44: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
            char *_image_id = image_id
            int _force = force
            librbd_progress_fn_t _prog_cb = &no_op_progress_callback
            void *_prog_arg = NULL
        if on_progress:
            _prog_cb = &progress_callback
                       ^
------------------------------------------------------------

rbd.pyx:871:23: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1 nogil' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
        """
        image_name = cstr(image_name, 'image_name')
        cdef:
            rados_ioctx_t _ioctx = convert_ioctx(ioctx)
            char *_image_name = image_name
            librbd_progress_fn_t _prog_cb = &no_op_progress_callback
                                            ^
------------------------------------------------------------

rbd.pyx:1097:44: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
            rados_ioctx_t _ioctx = convert_ioctx(ioctx)
            char *_image_name = image_name
            librbd_progress_fn_t _prog_cb = &no_op_progress_callback
            void *_prog_arg = NULL
        if on_progress:
            _prog_cb = &progress_callback
                       ^
------------------------------------------------------------

rbd.pyx:1100:23: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1 nogil' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
        """
        image_name = cstr(image_name, 'image_name')
        cdef:
            rados_ioctx_t _ioctx = convert_ioctx(ioctx)
            char *_image_name = image_name
            librbd_progress_fn_t _prog_cb = &no_op_progress_callback
                                            ^
------------------------------------------------------------

rbd.pyx:1124:44: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
            rados_ioctx_t _ioctx = convert_ioctx(ioctx)
            char *_image_name = image_name
            librbd_progress_fn_t _prog_cb = &no_op_progress_callback
            void *_prog_arg = NULL
        if on_progress:
            _prog_cb = &progress_callback
                       ^
------------------------------------------------------------

rbd.pyx:1127:23: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1 nogil' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
        """
        image_name = cstr(image_name, 'image_name')
        cdef:
            rados_ioctx_t _ioctx = convert_ioctx(ioctx)
            char *_image_name = image_name
            librbd_progress_fn_t _prog_cb = &no_op_progress_callback
                                            ^
------------------------------------------------------------

rbd.pyx:1151:44: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
            rados_ioctx_t _ioctx = convert_ioctx(ioctx)
            char *_image_name = image_name
            librbd_progress_fn_t _prog_cb = &no_op_progress_callback
            void *_prog_arg = NULL
        if on_progress:
            _prog_cb = &progress_callback
                       ^
------------------------------------------------------------

rbd.pyx:1154:23: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1 nogil' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
        cdef:
            rbd_completion_t completion
            PyObject* p_completion_obj= <PyObject*>completion_obj

        with nogil:
            ret = rbd_aio_create_completion(p_completion_obj, __aio_complete_cb,
                                                              ^
------------------------------------------------------------

rbd.pyx:2929:62: Cannot assign type 'void (rbd_completion_t, void *) except * nogil' to 'rbd_callback_t' (alias of 'void (*)(rbd_completion_t, void *) noexcept nogil'). Exception values are incompatible. Suggest adding 'noexcept' to the type of '__aio_complete_cb'.

Error compiling Cython file:
------------------------------------------------------------
...
        if not allow_shrink and old_size > size:
            raise InvalidArgument("error allow_shrink is False but old_size > new_size")
        cdef:
            uint64_t _size = size
            bint _allow_shrink = allow_shrink
            librbd_progress_fn_t prog_cb = &no_op_progress_callback
                                           ^
------------------------------------------------------------

rbd.pyx:3009:43: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
        """
        name = cstr(name, 'name')
        cdef:
            char *_name = name
            uint32_t _flags = flags
            librbd_progress_fn_t prog_cb = &no_op_progress_callback
                                           ^
------------------------------------------------------------

rbd.pyx:3517:43: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...

        name = cstr(name, 'name')
        cdef:
            char *_name = name
            uint32_t _flags = flags
            librbd_progress_fn_t prog_cb = &no_op_progress_callback
                                           ^
------------------------------------------------------------

rbd.pyx:3576:43: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
        Flatten clone image (copy all blocks from parent to child)
        :param on_progress: optional progress callback function
        :type on_progress: callback function
        """
        cdef:
            librbd_progress_fn_t _prog_cb = &no_op_progress_callback
                                            ^
------------------------------------------------------------

rbd.pyx:4091:44: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
        """
        cdef:
            librbd_progress_fn_t _prog_cb = &no_op_progress_callback
            void *_prog_arg = NULL
        if on_progress:
            _prog_cb = &progress_callback
                       ^
------------------------------------------------------------

rbd.pyx:4094:23: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1 nogil' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.

Error compiling Cython file:
------------------------------------------------------------
...
    @requires_not_closed
    def rebuild_object_map(self):
        """
        Rebuild the object map for the image HEAD or currently set snapshot
        """
        cdef librbd_progress_fn_t prog_cb = &no_op_progress_callback
                                            ^
------------------------------------------------------------

rbd.pyx:4118:44: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1' to 'librbd_progress_fn_t' (alias of 'int (*)(uint64_t, uint64_t, void *) noexcept'). Exception values are incompatible. Suggest adding 'noexcept' to the type of the value being assigned.
Traceback (most recent call last):
  File "/build/ceph-18.2.1/src/pybind/rbd/setup.py", line 192, in <module>
    ext_modules=cythonize(
  File "/nix/store/c55ks8c5p3qpvqy9azc5h05hij6d3fcf-python3-3.10.14-env/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
    cythonize_one(*args)
  File "/nix/store/c55ks8c5p3qpvqy9azc5h05hij6d3fcf-python3-3.10.14-env/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: rbd.pyx
make[2]: *** [src/pybind/rbd/CMakeFiles/cython_rbd.dir/build.make:74: lib/cython_modules/lib.3/rbd.cpython-310-x86_64-linux-gnu.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:5126: src/pybind/rbd/CMakeFiles/cython_rbd.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
...

Notify maintainers

@johanot @krav

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.82, NixOS, 23.11 (Tapir), 23.11.20240326.4473351`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/store/b2hxgkvh0jrkxfv312xcrmrr3qyz50c1-source`

Add a 👍 reaction to issues you find important.

@danielbarter
Copy link
Contributor Author

Relevent warning before:

warning: c_rbd.pxd:596:48: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
warning: ../rados/rados.pxd:7:0: The 'IF' statement is deprecated and will be removed in a future Cython version. Consider using runtime conditions or C macros instead. See https://github.com/cython/cython/issues/4310

so seems like this may be an upstream cython compatiblity issue

@danielbarter danielbarter changed the title Build failure: ceph Build failure: ceph (cython failure) Apr 7, 2024
@danielbarter
Copy link
Contributor Author

danielbarter commented Apr 7, 2024

last hydra build: https://cache.nixos.org/log/14ld094d4rq3y17zb74xi5i5j3wx0p64-ceph-18.2.1.drv

Comparing to my gist, the last successful hyra build seems to be getting cython 0.2.9, but my build is getting cython 3.0

@danielbarter
Copy link
Contributor Author

fix here: #302358

@dotlambda
Copy link
Member

This doesn't sound like https://tracker.ceph.com/issues/63591. Please open an upstream issue.

@danielbarter
Copy link
Contributor Author

@dotlambda: I am getting a 404 when I try and create an account on their issue tracker. Does anyone reading have an existing account?

@danielbarter
Copy link
Contributor Author

Closing since fix was merged into staging-next

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

No branches or pull requests

2 participants