Bug 1895315 - Cython generates Python 3.10 incompatible code: undefined symbol: _PyGen_Send [patch exists]
Summary: Cython generates Python 3.10 incompatible code: undefined symbol: _PyGen_Send...
Keywords:
Status: POST
Alias: None
Product: Fedora
Classification: Fedora
Component: Cython
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Tomáš Hrnčiar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
 
Reported: 2020-11-06 10:26 UTC by Tomáš Hrnčiar
Modified: 2021-02-16 09:29 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github cython cython issues 3876 0 None closed Cannot install Cython on Py3.10a1 2021-02-16 09:24:43 UTC

Description Tomáš Hrnčiar 2020-11-06 10:26:08 UTC
numpy fails to build with Python 3.10.0a2.

Traceback (most recent call last):
  File "/builddir/build/BUILD/numpy-1.19.4/runtests.py", line 493, in <module>
    main(argv=sys.argv[1:])
  File "/builddir/build/BUILD/numpy-1.19.4/runtests.py", line 283, in main
    __import__(PROJECT_MODULE)
  File "/builddir/build/BUILD/numpy-1.19.4/build/testenv/lib64/python3.10/site-packages/numpy/__init__.py", line 151, in <module>
    from . import random
  File "/builddir/build/BUILD/numpy-1.19.4/build/testenv/lib64/python3.10/site-packages/numpy/random/__init__.py", line 179, in <module>
    from . import _pickle
  File "/builddir/build/BUILD/numpy-1.19.4/build/testenv/lib64/python3.10/site-packages/numpy/random/_pickle.py", line 1, in <module>
    from .mtrand import RandomState
  File "mtrand.pyx", line 1, in init numpy.random.mtrand
  File "bit_generator.pyx", line 1, in init numpy.random.bit_generator
ImportError: /builddir/build/BUILD/numpy-1.19.4/build/testenv/lib64/python3.10/site-packages/numpy/random/_common.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send
error: Bad exit status from /var/tmp/rpm-tmp.lDvHNt (%check)

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01745698-numpy/

For all our attempts to build numpy with Python 3.10, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/package/numpy/

Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.10:
https://copr.fedorainfracloud.org/coprs/g/python/python3.10/

Let us know here if you have any questions.

Python 3.10 will be included in Fedora 35. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.10.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon.
We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Miro Hrončok 2020-11-06 10:28:47 UTC
This seem to be related to https://github.com/cython/cython/issues/3876

Comment 2 Miro Hrončok 2020-11-09 12:38:31 UTC
With this patch https://github.com/cython/cython/pull/3877 numpy builds fine.

Upstream has decided to solve this differently, but until that happens, we'll use the patch in our Copr.

Comment 3 Petr Viktorin 2021-01-19 10:12:13 UTC
There's a new fix upstream: https://github.com/cython/cython/pull/3921

Comment 4 Ben Cotton 2021-02-09 16:11:50 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 5 Tomáš Hrnčiar 2021-02-16 09:29:10 UTC
(In reply to Petr Viktorin from comment #3)
> There's a new fix upstream: https://github.com/cython/cython/pull/3921

The upstream fix seems to be working. We are building Cython in Python 3.10 COPR from this PR: https://src.fedoraproject.org/rpms/Cython/pull-request/26


Note You need to log in before you can comment on or make changes to this bug.