python-matplotlib fails to build with Python 3.9.0a3. Traceback (most recent call last): File "<string>", line 7, in <module> File "/builddir/build/BUILDROOT/python-matplotlib-3.1.2-1.fc32.1.x86_64/usr/lib64/python3.9/site-packages/matplotlib/pyplot.py", line 2349, in <module> switch_backend(rcParams["backend"]) File "/builddir/build/BUILDROOT/python-matplotlib-3.1.2-1.fc32.1.x86_64/usr/lib64/python3.9/site-packages/matplotlib/pyplot.py", line 221, in switch_backend backend_mod = importlib.import_module(backend_name) File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "/builddir/build/BUILDROOT/python-matplotlib-3.1.2-1.fc32.1.x86_64/usr/lib64/python3.9/site-packages/matplotlib/backends/backend_wx.py", line 31, in <module> import wx File "/usr/lib64/python3.9/site-packages/wx/__init__.py", line 17, in <module> from wx.core import * File "/usr/lib64/python3.9/site-packages/wx/core.py", line 12, in <module> from ._core import * ImportError: /usr/lib64/python3.9/site-packages/wx/_core.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE9_M_createERmm, version WXU_3.0 Maintainer of wxpython4 cc'ed. For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.9/fedora-rawhide-x86_64/01232699-python-matplotlib/ For all our attempts to build python-matplotlib with Python 3.9, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/package/python-matplotlib/ 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.9: https://copr.fedorainfracloud.org/coprs/g/python/python3.9/ Let us know here if you have any questions. Python 3.9 will be included in Fedora 33. To make that update smoother, we're building Fedora packages with early pre-releases of Python 3.9. 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.
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/5I5GFVO7KHEALPQ432RDS5FCTQHD5DXT/ This is not strictly related to Python 3.9: $ rpm -q python3-wxpython4 python3-wxpython4-4.0.7-4.fc32.x86_64 $ python3 Python 3.8.1 (default, Jan 30 2020, 00:00:00) [GCC 10.0.1 20200126 (Red Hat 10.0.1-0.6)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import wx Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.8/site-packages/wx/__init__.py", line 17, in <module> from wx.core import * File "/usr/lib64/python3.8/site-packages/wx/core.py", line 12, in <module> from ._core import * ImportError: /usr/lib64/python3.8/site-packages/wx/_core.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE9_M_createERmm, version WXU_3.0 $ python3 Python 3.9.0a3 (default, Feb 4 2020, 00:00:00) [GCC 10.0.1 20200130 (Red Hat 10.0.1-0.7)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import wx Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.9/site-packages/wx/__init__.py", line 17, in <module> from wx.core import * File "/usr/lib64/python3.9/site-packages/wx/core.py", line 12, in <module> from ._core import * ImportError: /usr/lib64/python3.9/site-packages/wx/_core.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE9_M_createERmm, version WXU_3.0
I just ran into this with an up-to-date rawhide vm. rawhide# python Python 3.8.1 (default, Jan 30 2020, 00:00:00) [GCC 10.0.1 20200126 (Red Hat 10.0.1-0.6)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import wx Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.8/site-packages/wx/__init__.py", line 17, in <module> from wx.core import * File "/usr/lib64/python3.8/site-packages/wx/core.py", line 12, in <module> from ._core import * ImportError: /usr/lib64/python3.8/site-packages/wx/_core.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE9_M_createERmm, version WXU_3.0 >>> I then rebuilt python3-3.8.1-2.fc32.src.rpm and python-wxpython4-4.0.7-4.fc32.src.rpm using mock, and reinstalled the binary packages into my rawhide vm. At that point, I was able to import wx without error. The only thing I notice that is different, is that the rebuild used a slightly newer version of GCC 10 (and perhaps other packages). It might be good to rebuild the official packages on koji. Here is the result after rebuilding: rawhide# python Python 3.8.1 (default, Jan 30 2020, 00:00:00) [GCC 10.0.1 20200130 (Red Hat 10.0.1-0.7)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import wx >>>
I am rebuilding both packages in Koji as scratch builds and will try if rebuilding only one of them fixes the problem or if both need to be rebuilt.
$ mock -r fedora-rawhide-x86_64 init ... $ mock -r fedora-rawhide-x86_64 --enablerepo=local install python3-wxpython4 ... Installed: python3-3.8.1-2.fc32.x86_64 python3-wxpython4-4.0.7-4.fc32.x86_64 $ mock -r fedora-rawhide-x86_64 shell ... <mock-chroot> sh-5.0# python3 Python 3.8.1 (default, Jan 30 2020, 00:00:00) [GCC 10.0.1 20200126 (Red Hat 10.0.1-0.6)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import wx Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.8/site-packages/wx/__init__.py", line 17, in <module> from wx.core import * File "/usr/lib64/python3.8/site-packages/wx/core.py", line 12, in <module> from ._core import * ImportError: /usr/lib64/python3.8/site-packages/wx/_core.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEE9_M_createERmm, version WXU_3.0 $ mock -r fedora-rawhide-x86_64 remove python3-wxpython4 ... $ mock -r fedora-rawhide-x86_64 --enablerepo=local install https://kojipkgs.fedoraproject.org//work/tasks/2911/41452911/python3-wxpython4-4.0.7-4.fc32.x86_64.rpm ... $ mock -r fedora-rawhide-x86_64 shell ... <mock-chroot> sh-5.0# python3 Python 3.8.1 (default, Jan 30 2020, 00:00:00) [GCC 10.0.1 20200126 (Red Hat 10.0.1-0.6)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import wx >>> Will rebuild wxpython.
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=41453363
$ rpm -q python3 python3-3.8.1-2.fc32.x86_64 $ rpm -q python3-wxpython4 python3-wxpython4-4.0.7-5.fc32.x86_64 $ python3 Python 3.8.1 (default, Jan 30 2020, 00:00:00) [GCC 10.0.1 20200126 (Red Hat 10.0.1-0.6)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import wx >>>
Thanks Miro for taking care of this!
Any time.