Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

Fails to build with Python 3.10: undefined symbol: PyObject_AsWriteBuffer #13

Closed
audreytoskin opened this issue Nov 14, 2020 · 3 comments
Assignees
Labels

Comments

@audreytoskin
Copy link

I package python-djvulibre for the Linux distribution Fedora. There we're planning a future release, Fedora 35, which will ship with the upcoming release of Python 3.10, and we're testing packages early to try to make the transition as smooth as possible. And for those tests, python-djvulibre fails to build against Python 3.10.0a.

...That is of course still a prerelease, so it's not a serious problem yet, but something to keep in mind for upcoming development...

From the upstream changelog here -- https://docs.python.org/3.10/whatsnew/changelog.html#id16 --

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

@jwilk jwilk added the bug label Feb 16, 2021
@jwilk jwilk changed the title python-djvulibre fails to build with early test releases of Python 3.10 Fails to build with Python 3.10: undefined symbol: PyObject_AsWriteBuffer Feb 16, 2021
@jwilk jwilk self-assigned this Feb 27, 2021
@jwilk
Copy link
Member

jwilk commented Mar 1, 2021

Downstream bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1897558

jwilk added a commit that referenced this issue Mar 1, 2021
Fixes:

    .../decode.c: In function ‘__pyx_f_4djvu_6decode_allocate_image_memory’:
    .../decode.c:25018:5: warning: ‘PyObject_AsWriteBuffer’ is deprecated [-Wdeprecated-declarations]

or, with Python 3.10:

    ImportError: .../djvu/decode.cpython-310-i386-linux-gnu.so: undefined symbol: PyObject_AsWriteBuffer

#13
@jwilk
Copy link
Member

jwilk commented Mar 1, 2021

Fixed in 3a61d30.

If all goes well, I'll make a new release in a few days.

@jwilk
Copy link
Member

jwilk commented Mar 4, 2021

Fixed in 0.8.6.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants