← All tasks
pythonEzibenroc/PyRoaringBitMap #93Repaired task

Build error with cython 3

envgap__Ezibenroc__PyRoaringBitMap-93

01 / FAILURE SIGNATURE

Captured in a clean container

error: subprocess-exited-with-error

02 / ENVIRONMENT RECIPE

Base commit
89c361ab0961cd3b51249dde4fce95937ec10bdd
Manifest
setup.py
Reproduce
python3 -m pip install .
Run under trace
python3 -c " import importlib, importlib.metadata as md mods = set() for dist in md.distributions(): if 'file:///work' not in (dist.read_text('direct_url.json') or ''): continue top = (dist.read_text('top_level.txt') or '').split() if not top: top = [str(f).split('/')[0].removesuffix('.py') for f in (dist.files or []) if str(f).endswith('.py') and not str(f).startswith(('..', '_'))] mods.update(t for t in top if t.isidentifier() and not t.startswith('_')) assert mods, 'the project itself is not installed' for name in sorted(mods): importlib.import_module(name) print('imported', sorted(mods)) "
Reference environment fix used for admission
diff --git a/setup.py b/setup.py
index 1506e43..fcea37e 100755
--- a/setup.py
+++ b/setup.py
@@ -72,7 +72,7 @@ setup(
     version=VERSION,
     description='Fast and lightweight set for unsigned 32 bits integers.',
     long_description=long_description,
-    setup_requires=['cython'],
+    setup_requires=['cython<3.0.0'],
     url='https://github.com/Ezibenroc/PyRoaringBitMap',
     author='Tom Cornebize',
     author_email='tom.cornebize@gmail.com',

03 / ORIGINAL ISSUE TEXT

Ezibenroc/PyRoaringBitMap #93 · read the original issue
Building pyroaring with the cython 3.0.0 results in the following error logs:



```

$ sh -c -e 'python -P -mbuild --no-isolation --wheel --outdir /buildstream-build/dist .

'

* Getting build dependencies for wheel...

* Building wheel...

running bdist_wheel

running build

running build_ext



Error compiling Cython file:

------------------------------------------------------------

...

        self.__check_compatibility(other)

        cdef croaring.roaring_bitmap_t *r = func(self._c_bitmap, other._c_bitmap)

        return self.from_ptr(r)



    def __or__(self, other):

        return (<AbstractBitMap>self).binary_op(<AbstractBitMap?>other, croaring.roaring_bitmap_or)

                                                                                ^

------------------------------------------------------------



pyroaring/abstract_bitmap.pxi:447:80: Cannot assign type 'roaring_bitmap_t *(const roaring_bitmap_t *, const roaring_bitmap_t *) noexcept' to 'roaring_bitmap_t *(const roaring_bitmap_t *, const roaring_bitmap_t *) except *'



Error compiling Cython file:

------------------------------------------------------------

...



    def __or__(self, other):

        return (<AbstractBitMap>self).binary_op(<AbstractBitMap?>other, croaring.roaring_bitmap_or)



    def __and__(self, other):

        return (<AbstractBitMap>self).binary_op(<AbstractBitMap?>other, croaring.roaring_bitmap_and)

                                                                                ^

------------------------------------------------------------



pyroaring/abstract_bitmap.pxi:450:80: Cannot assign type 'roaring_bitmap_t *(const roaring_bitmap_t *, const roaring_bitmap_t *) noexcept' to 'roaring_bitmap_t *(const roaring_bitmap_t *, const roaring_bitmap_t *) except *'



Error compiling Cython file:

------------------------------------------------------------

...



    def __and__(self, other):

        return (<AbstractBitMap>self).binary_op(<AbstractBitMap?>other, croaring.roaring_bitmap_and)



    def __xor__(self, other):

        return (<AbstractBitMap>self).binary_op(<AbstractBitMap?>other, croaring.roaring_bitmap_xor)

                                                                                ^

------------------------------------------------------------



pyroaring/abstract_bitmap.pxi:453:80: Cannot assign type 'roaring_bitmap_t *(const roaring_bitmap_t *, const roaring_bitmap_t *) noexcept' to 'roaring_bitmap_t *(const roaring_bitmap_t *, const roaring_bitmap_t *) except *'



Error compiling Cython file:

------------------------------------------------------------

...



    def __xor__(self, other):

        return (<AbstractBitMap>self).binary_op(<AbstractBitMap?>other, croaring.roaring_bitmap_xor)



    def __sub__(self, other):

        return (<AbstractBitMap>self).binary_op(<AbstractBitMap?>other, croaring.roaring_bitmap_andnot)

                                                                                ^

------------------------------------------------------------



pyroaring/abstract_bitmap.pxi:456:80: Cannot assign type 'roaring_bitmap_t *(const roaring_bitmap_t *, const roaring_bitmap_t *) noexcept' to 'roaring_bitmap_t *(const roaring_bitmap_t *, const roaring_bitmap_t *) except *'



Error compiling Cython file:

------------------------------------------------------------

...

        self.__check_compatibility(other)

        func(self._c_bitmap, other._c_bitmap)

        return self



    def __ior__(self, other):

        return (<BitMap>self).binary_iop(<AbstractBitMap?>other, croaring.roaring_bitmap_or_inplace)

                                                                         ^

------------------------------------------------------------



pyroaring/bitmap.pxi:115:73: Cannot assign type 'void (roaring_bitmap_t *, const roaring_bitmap_t *) noexcept' to 'void (roaring_bitmap_t *, const roaring_bitmap_t *) except *'



Error compiling Cython file:

------------------------------------------------------------

...



    def __ior__(self, other):

        return (<BitMap>self).binary_iop(<AbstractBitMap?>other, croaring.roaring_bitmap_or_inplace)



    def __iand__(self, other):

        return (<BitMap>self).binary_iop(<AbstractBitMap?>other, croaring.roaring_bitmap_and_inplace)

                                                                         ^

------------------------------------------------------------



pyroaring/bitmap.pxi:118:73: Cannot assign type 'void (roaring_bitmap_t *, const roaring_bitmap_t *) noexcept' to 'void (roaring_bitmap_t *, const roaring_bitmap_t *) except *'



Error compiling Cython file:

------------------------------------------------------------

...



    def __iand__(self, other):

        return (<BitMap>self).binary_iop(<AbstractBitMap?>other, croaring.roaring_bitmap_and_inplace)



    def __ixor__(self, other):

        return (<BitMap>self).binary_iop(<AbstractBitMap?>other, croaring.roaring_bitmap_xor_inplace)

                                                                         ^

------------------------------------------------------------



pyroaring/bitmap.pxi:121:73: Cannot assign type 'void (roaring_bitmap_t *, const roaring_bitmap_t *) noexcept' to 'void (roaring_bitmap_t *, const roaring_bitmap_t *) except *'



Error compiling Cython file:

------------------------------------------------------------

...



    def __ixor__(self, other):

        return (<BitMap>self).binary_iop(<AbstractBitMap?>other, croaring.roaring_bitmap_xor_inplace)



    def __isub__(self, other):

        return (<BitMap>self).binary_iop(<AbstractBitMap?>other, croaring.roaring_bitmap_andnot_inplace)

                                                                         ^

------------------------------------------------------------



pyroaring/bitmap.pxi:124:73: Cannot assign type 'void (roaring_bitmap_t *, const roaring_bitmap_t *) noexcept' to 'void (roaring_bitmap_t *, const roaring_bitmap_t *) except *'

Compiling pyroaring/pyroaring.pyx because it changed.

[1/1] Cythonizing pyroaring/pyroaring.pyx

Traceback (most recent call last):

  File "/usr/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>

    main()

  File "/usr/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in main

    json_out['return_val'] = hook(**hook_input['kwargs'])

                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel

    return _build_backend().build_wheel(wheel_directory, config_settings,

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/setuptools/build_meta.py", line 416, in build_wheel

    return self._build_with_temp_dir(['bdist_wheel'], '.whl',

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/setuptools/build_meta.py", line 401, in _build_with_temp_dir

    self.run_setup()

  File "/usr/lib/python3.11/site-packages/setuptools/build_meta.py", line 488, in run_setup

    self).run_setup(setup_script=setup_script)

          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup

    exec(code, locals())

  File "<string>", line 69, in <module>

  File "/usr/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup

    return distutils.core.setup(**attrs)

           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup

    return run_commands(dist)

           ^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands

    dist.run_commands()

  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands

    self.run_command(cmd)

  File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command

    super().run_command(command)

  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command

    cmd_obj.run()

  File "/usr/lib/python3.11/site-packages/wheel/bdist_wheel.py", line 343, in run

    self.run_command("build")

  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command

    self.distribution.run_command(command)

  File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command

    super().run_command(command)

  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command

    cmd_obj.run()

  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/build.py", line 131, in run

    self.run_command(cmd_name)

  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 318, in run_command

    self.distribution.run_command(command)

  File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 1234, in run_command

    super().run_command(command)

  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 988, in run_command

    cmd_obj.run()

  File "/usr/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 84, in run

    _build_ext.run(self)

  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 345, in run

    self.build_extensions()

  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 467, in build_extensions

    self._build_extensions_serial()

  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/build_ext.py", line 493, in _build_extensions_serial

    self.build_extension(ext)

  File "/usr/lib/python3.11/site-packages/setuptools/command/build_ext.py", line 246, in build_extension

    _build_ext.build_extension(self, ext)

  File "/usr/lib/python3.11/site-packages/Cython/Distutils/build_ext.py", line 122, in build_extension

    new_ext = cythonize(

              ^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize

    cythonize_one(*args)

  File "/usr/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one

    raise CompileError(None, pyx_file)

Cython.Compiler.Errors.CompileError: pyroaring/pyroaring.pyx



ERROR Backend subprocess exited when trying to invoke build_wheel

```
Continue on GitHub ↗

04 / LABELS

Labels checked by running the task · needs human review

misspecification
Label rules and the text that matched
[
  {
    "category": "misspecification",
    "rule": "diff.changes_existing_manifest_line",
    "source": "manifest_diff:setup.py",
    "excerpt": "-    setup_requires=['cython'],\n+    setup_requires=['cython<3.0.0'],"
  }
]

Mined from a merged pull request linked to the issue whose changed files are all environment files.

The base commit is the pull request's base, not the dated default-branch commit; the registry is pinned to the merge date so the pull request's own pins resolve.

Default commands from envgap default-recipe synthesizer v1; gold_files are the pull request's environment diff.

Preparation uses current registries. Historical package availability is not enforced here; execution metadata records this limitation separately from the oracle's date-bounding policy.