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.
This seem to be related to https://github.com/cython/cython/issues/3876
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.
There's a new fix upstream: https://github.com/cython/cython/pull/3921
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.
(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
This particular problem been fixed. We have a new one: https://github.com/cython/cython/issues/4025