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 bugzilla.redhat.com.
Bug 1896411 - libsolv fails with Python 3.10: _solv.so: undefined symbol: PyObject_AsReadBuffer
Summary: libsolv fails with Python 3.10: _solv.so: undefined symbol: PyObject_AsReadBu...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: libsolv
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
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:
Environment:
Last Closed: 2020-12-08 10:20:40 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openSUSE libsolv issues 410 0 None closed libsolv fails with Python 3.10: _solv.so: 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/cli.py", line 8, in <module>
    from . import _fetchrepodata, _repodata
  File "/builddir/build/BUILD/fedmod-0.6.3/_fedmod/_fetchrepodata.py", line 17, in <module>
    from lxml import etree
ImportError: /usr/lib64/python3.10/site-packages/lxml/etree.cpython-310-x86_64-linux-gnu.so: undefined symbol: _PyGen_Send

This seem to be related to https://github.com/cython/cython/issues/3876.
It might be fixed with this patch https://github.com/cython/cython/pull/3877 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:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.10/fedora-rawhide-x86_64/01756929-fedmod/

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

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-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/cli.py", line 8, in <module>
    from . import _fetchrepodata, _repodata
  File "/builddir/build/BUILD/fedmod-0.6.3/_fedmod/_repodata.py", line 7, in <module>
    import solv
  File "/usr/lib64/python3.10/site-packages/solv.py", line 15, in <module>
    import _solv
ImportError: /usr/lib64/python3.10/site-packages/_solv.so: undefined symbol: PyObject_AsReadBuffer

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

https://docs.python.org/3.10/whatsnew/3.10.html#id4

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

https://bugs.python.org/issue41103

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: https://github.com/openSUSE/libsolv/issues/410

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.