Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1896411 - libsolv fails with Python 3.10: undefined symbol: PyObject_AsReadBuffer
Summary: libsolv fails with Python 3.10: undefined symbol: PyObject_AsReadBu...
Alias: None
Product: Fedora
Classification: Fedora
Component: libsolv
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
Depends On:
Blocks: PYTHON3.10
TreeView+ depends on / blocked
Reported: 2020-11-10 13:56 UTC by Tomáš Hrnčiar
Modified: 2021-01-08 15:11 UTC (History)
12 users (show)

Fixed In Version: libsolv-0.7.15-3.eln108
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-12-08 10:20:40 UTC
Type: Bug

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openSUSE libsolv issues 410 0 None closed libsolv fails with Python 3.10: undefined symbol: PyObject_AsReadBuffer 2020-12-08 09:28:21 UTC

Description Tomáš Hrnčiar 2020-11-10 13:56:44 UTC
fedmod fails to build with Python 3.10.0a2.

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/builddir/build/BUILD/fedmod-0.6.3/_fedmod/", line 8, in <module>
    from . import _fetchrepodata, _repodata
  File "/builddir/build/BUILD/fedmod-0.6.3/_fedmod/", line 17, in <module>
    from lxml import etree
ImportError: /usr/lib64/python3.10/site-packages/lxml/ undefined symbol: _PyGen_Send

This seem to be related to
It might be fixed with this patch that works for numpy. Upstream has decided to solve this differently, but until that happens, we are using this patch in our Copr (for other packages).

For the build logs, see:

For all our attempts to build fedmod with Python 3.10, see:

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:

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-10 14:27:48 UTC
We might just need to rebuild lxml with patched cython, than make sure the old lxml is not in our copr any more and than rebuild fedmod.

Comment 2 Miro Hrončok 2020-11-10 14:33:21 UTC
That solves the first problem, but goes to:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/builddir/build/BUILD/fedmod-0.6.3/_fedmod/", line 8, in <module>
    from . import _fetchrepodata, _repodata
  File "/builddir/build/BUILD/fedmod-0.6.3/_fedmod/", line 7, in <module>
    import solv
  File "/usr/lib64/python3.10/site-packages/", line 15, in <module>
    import _solv
ImportError: /usr/lib64/python3.10/site-packages/ undefined symbol: PyObject_AsReadBuffer

Comment 3 Miro Hrončok 2020-11-10 14:37:10 UTC
This is a problem in libsolv.

PyObject_AsCharBuffer(), PyObject_AsReadBuffer(), PyObject_CheckReadBuffer(), and PyObject_AsWriteBuffer() are removed. Please migrate to new buffer protocol; PyObject_GetBuffer() and PyBuffer_Release().

libsolv itself builds fine, so the Python binding is most likely not tested in %check.

Comment 4 Miro Hrončok 2020-11-16 10:27:59 UTC
I've reported this to libsolv upstream:

Comment 6 Fedora Update System 2021-01-08 15:11:03 UTC
FEDORA-2021-28834317a6 has been pushed to the Fedora ELN stable repository.
If problem still persists, please make note of it in this bug report.

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