#1884 closed defect (fixed)
Compiling error with Python 3.7.0-rc1
Reported by: | Antonio | Owned by: | Antoine Martin |
---|---|---|---|
Priority: | major | Milestone: | 2.4 |
Component: | packaging | Version: | 2.3.x |
Keywords: | fedora, python-3.7.0 | Cc: |
Description
Hi all.
On Fedora 29 (devel branch), Python-3.7.0-rc1,
GCC-8.1.1.
Recompiling xpra-2.3.1 i'm obtaining this error:
gcc -pthread -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -Ixpra/buffers -I/usr/include/python3.7m -c xpra/buffers/buffers.c -o build/temp.linux-x86_64-3.7/xpra/buffers/buffers.o -O3 -Wall -Werror -fPIC -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection xpra/buffers/buffers.c: In function ‘_object_as_buffer’: xpra/buffers/buffers.c:43:5: error: ‘PyObject_AsReadBuffer’ is deprecated [-Werror=deprecated-declarations] return PyObject_AsReadBuffer(obj, buffer, buffer_len); ^~~~~~ In file included from /usr/include/python3.7m/Python.h:128, from xpra/buffers/buffers.c:8: /usr/include/python3.7m/abstract.h:489:17: note: declared here PyAPI_FUNC(int) PyObject_AsReadBuffer(PyObject *obj, ^~~~~~~~~~~~~~~~~~~~~ xpra/buffers/buffers.c: In function ‘_object_as_write_buffer’: xpra/buffers/buffers.c:56:5: error: ‘PyObject_AsWriteBuffer’ is deprecated [-Werror=deprecated-declarations] return PyObject_AsWriteBuffer(obj, buffer, buffer_len); ^~~~~~ In file included from /usr/include/python3.7m/Python.h:128, from xpra/buffers/buffers.c:8: /usr/include/python3.7m/abstract.h:500:17: note: declared here PyAPI_FUNC(int) PyObject_AsWriteBuffer(PyObject *obj, ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors error: command 'gcc' failed with exit status 1
Can you fix it please?
Full build log:
https://koji.fedoraproject.org/koji/getfile?taskID=27753977&volume=DEFAULT&name=build.log
Change History (5)
comment:1 Changed 3 years ago by
Milestone: | → 2.4 |
---|---|
Status: | new → assigned |
comment:2 Changed 3 years ago by
FYI: building with --without-strict should workaround this problem.
Workaround confirmed.
comment:3 Changed 3 years ago by
Milestone: | 2.4 → 3.1 |
---|---|
Priority: | blocker → major |
No rush to fix this, it might be easier to replace this code when we remove python2 support.
Here's what python 3.6 does to provide this function:
int PyObject_AsReadBuffer(PyObject *obj, const void **buffer, Py_ssize_t *buffer_len) { Py_buffer view; if (obj == NULL || buffer == NULL || buffer_len == NULL) { null_error(); return -1; } if (PyObject_GetBuffer(obj, &view, PyBUF_SIMPLE) != 0) return -1; *buffer = view.buf; *buffer_len = view.len; PyBuffer_Release(&view); return 0; }
comment:4 Changed 3 years ago by
Milestone: | 3.1 → 2.4 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
comment:5 Changed 6 weeks ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1884
Note: See
TracTickets for help on using
tickets.
FYI: building with
--without-strict
should workaround this problem.