[Xapian-tickets] [Xapian] #818: Build issue with 1.14.4 under python 3.12
Xapian
nobody at xapian.org
Fri Jul 8 03:47:12 BST 2022
#818: Build issue with 1.14.4 under python 3.12
--------------------------------------+------------------------------------
Reporter: rouilj | Owner: Richard Boulton
Type: defect | Status: closed
Priority: normal | Milestone:
Component: Xapian-bindings (Python) | Version: 1.4.14
Severity: normal | Resolution: invalid
Keywords: | Blocked By:
Blocking: | Operating System: Linux
--------------------------------------+------------------------------------
Comment (by Olly Betts):
You should be able to tell from the errors if you have the bug fix - from
the report above:
{{{
/opt/python/3.12-dev/include/python3.12/objimpl.h:134:46: error: expected
‘)’ before ‘_PyObject_New’
134 | #define PyObject_New(type, typeobj) ((type
*)_PyObject_New(typeobj))
| ~ ^~~~~~~~~~~~~
/opt/python/3.12-dev/include/python3.12/objimpl.h:138:37: note: in
expansion of macro ‘PyObject_New’
138 | #define PyObject_NEW(type, typeobj) PyObject_New((type),
(typeobj))
| ^~~~~~~~~~~~
}}}
The problem here is the `(` and `)` around `type` on line 138 - expanding
the two macros shown here on the `PyObject_NEW` invocation shown from the
Xapian code: `PyObject_NEW(SwigPyObject, SwigPyObject_type())` ->
`PyObject_New((SwigPyObject), (SwigPyObject_type()))` -> `(((SwigPyObject)
*)_PyObject_New((SwigPyObject_type())))` and that fails to compile because
the `((SwigPyObject) *)` cast is invalid C++ - it should be `(SwigPyObject
*)`.
If you still see `(type)` there in the error output you don't have the
fix.
But anyway, yes - let's leave worry about Python 3.12 compatibility until
it's nearer release.
--
Ticket URL: <https://trac.xapian.org/ticket/818#comment:8>
Xapian <https://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list