Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 913204 - dev-python/zeroconf-0.87.0 with cython-0.29.36: src/zeroconf/_handlers/record_manager.py:72:42: Compiler crash in AnalyseDeclarationsTransform
Summary: dev-python/zeroconf-0.87.0 with cython-0.29.36: src/zeroconf/_handlers/record...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-29 08:44 UTC by Bernd Feige
Modified: 2023-08-29 11:20 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Feige 2023-08-29 08:44:29 UTC
cython-3 update is blocked by several packages here (numpy, scikit-learn).
At least with cython-0.29.36, dev-python/zeroconf-0.86.0 conpiles fine while 0.87.0 fails:

gpep517 build-wheel --backend poetry.core.masonry.api --output-fd 3 --wheel-dir /var/tmp/portage/dev-python/zeroconf-0.87.0/work/zeroconf-0.87.0-python3_11/wheel
2023-08-29 10:34:02,541 gpep517 INFO Building wheel via backend poetry.core.masonry.api
2023-08-29 10:34:02,653 poetry.core.masonry.builders.wheel INFO Building wheel
fatal: not a git repository (or any of the parent directories): .git
2023-08-29 10:34:02,674 poetry.core.masonry.builders.sdist WARNING A setup.py file already exists. Using it.

Error compiling Cython file:
------------------------------------------------------------
...
        for listener in self.listeners:
            listener.async_update_records_complete()
        if notify:
            self.zc.async_notify_all()

    def async_updates_from_response(self, msg: DNSIncoming) -> None:
                                         ^
------------------------------------------------------------

src/zeroconf/_handlers/record_manager.py:72:42: Compiler crash in AnalyseDeclarationsTransform

File 'ModuleNode.py', line 124, in analyse_declarations: ModuleNode(record_manager.py:1:0,
    doc = ' Multicast DNS Service Discovery for Python, v0.14-wmcbrine\n    Copyright 2003 Paul Scott-Murphy, 2014 William McBrine\n\n    This module provides a framework for the use of DNS Service Discovery\n    using IP multicast.\n\n    This library is free software; you can redistribute it and/or\n    modify it under the terms of the GNU Lesser General Public\n    License as published by the Free Software Foundation; either\n    version 2.1 of the License, or (at your option) any later version.\n\n    This library is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n    Lesser General Public License for more details.\n\n    You should have received a copy of the GNU Lesser General Public\n    License along with this library; if not, write to the Free Software\n    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301\n    USA\n',
    full_module_name = 'zeroconf._handlers.record_manager')
File 'Nodes.py', line 431, in analyse_declarations: StatListNode(record_manager.py:23:0)
File 'Nodes.py', line 4817, in analyse_declarations: CClassDefNode(record_manager.py:37:0,
    class_name = 'RecordManager',
    doc = 'Process records into the cache and notify listeners.',
    visibility = 'private')
File 'Nodes.py', line 431, in analyse_declarations: StatListNode(record_manager.py:38:4)
File 'Nodes.py', line 2359, in analyse_declarations: CFuncDefNode(record_manager.py:72:4,
    doc = 'Deal with incoming response packets.  All answers\n        are held in the cache, and listeners are notified.\n\n        This function must be run in the event loop as it is not\n        threadsafe.\n        ',
    is_c_class_method = 1,
    modifiers = [...]/0,
    overridable = 1,
    visibility = 'private')
File 'Nodes.py', line 681, in analyse: CFuncDeclaratorNode(record_manager.py:72:4,
    calling_convention = '')
File 'Nodes.py', line 909, in analyse: CArgDeclNode(record_manager.py:72:42,
    is_generic = 1,
    outer_attrs = [...]/2)

Compiler crash traceback from this point on:
  File "/usr/lib/python3.11/site-packages/Cython/Compiler/Nodes.py", line 909, in analyse
    if self.annotation and env and env.directives['annotation_typing'] and self.base_type.name is None:
                                                                           ^^^^^^^^^^^^^^^^^^^
AttributeError: 'CAnalysedBaseTypeNode' object has no attribute 'name'
Compiling src/zeroconf/_dns.py because it changed.
Compiling src/zeroconf/_cache.py because it changed.
Compiling src/zeroconf/_history.py because it changed.
Compiling src/zeroconf/_listener.py because it changed.
Compiling src/zeroconf/_protocol/incoming.py because it changed.
Compiling src/zeroconf/_protocol/outgoing.py because it changed.
Compiling src/zeroconf/_handlers/record_manager.py because it changed.
Compiling src/zeroconf/_services/registry.py because it changed.
[1/8] Cythonizing src/zeroconf/_cache.py
[2/8] Cythonizing src/zeroconf/_dns.py
[3/8] Cythonizing src/zeroconf/_handlers/record_manager.py
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/zeroconf-0.87.0/work/zeroconf-0.87.0/setup.py", line 41, in <module>
    build(setup_kwargs)
  File "/var/tmp/portage/dev-python/zeroconf-0.87.0/work/zeroconf-0.87.0/build_ext.py", line 24, in build
    ext_modules=cythonize(
                ^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1120, in cythonize
    cythonize_one(*args)
  File "/usr/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1243, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: src/zeroconf/_handlers/record_manager.py
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.11/gpep517", line 4, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 425, in main
    return func(args)
           ^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 215, in build_wheel
    print(build_wheel_impl(args, args.wheel_dir), file=out)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/gpep517/__main__.py", line 207, in build_wheel_impl
    wheel_name = backend.build_wheel(str(wheel_dir), args.config_json)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/poetry/core/masonry/api.py", line 57, in build_wheel
    return WheelBuilder.make_in(
           ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/poetry/core/masonry/builders/wheel.py", line 87, in make_in
    wb.build(target_dir=directory)
  File "/usr/lib/python3.11/site-packages/poetry/core/masonry/builders/wheel.py", line 120, in build
    self._build(zip_file)
  File "/usr/lib/python3.11/site-packages/poetry/core/masonry/builders/wheel.py", line 181, in _build
    self._run_build_command(setup)
  File "/usr/lib/python3.11/site-packages/poetry/core/masonry/builders/wheel.py", line 219, in _run_build_command
    subprocess.check_call(
  File "/usr/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3.11', '/var/tmp/portage/dev-python/zeroconf-0.87.0/work/zeroconf-0.87.0/setup.py', 'build', '-b', '/var/tmp/portage/dev-python/zeroconf-0.87.0/work/zeroconf-0.87.0/build']' returned non-zero exit status 1.
 [31;01m*[0m ERROR: dev-python/zeroconf-0.87.0::gentoo failed (compile phase):
 [31;01m*[0m   Wheel build failed


Reproducible: Always
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2023-08-29 10:48:39 UTC
Unfortunately, that seems to be a regular problem here as upstream tests only with Cython-3.  The previous time it happened, the next release was fixed, so there's some hope, though.  For the time being, I'm afraid you'd have to either stay with the older version or switch Cython versions as you go.
Comment 2 Larry the Git Cow gentoo-dev 2023-08-29 11:20:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75531730c12dca32d9ad16ca080d852bb453403f

commit 75531730c12dca32d9ad16ca080d852bb453403f
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2023-08-29 10:48:57 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2023-08-29 11:20:10 +0000

    dev-python/zeroconf: Require >=dev-python/cython-3 in 0.87.0
    
    Closes: https://bugs.gentoo.org/913204
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 dev-python/zeroconf/zeroconf-0.87.0.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)