[Xapian-tickets] [Xapian] #818: Build issue with 1.14.4 under python 3.12

Xapian nobody at xapian.org
Sat Jun 25 05:59:58 BST 2022


#818: Build issue with 1.14.4 under python 3.12
---------------------------------------------+-----------------------------
        Reporter:  rouilj                    |      Owner:  Richard Boulton
            Type:  defect                    |     Status:  new
        Priority:  normal                    |  Milestone:
       Component:  Xapian-bindings (Python)  |    Version:  1.4.14
        Severity:  normal                    |   Keywords:
      Blocked By:                            |   Blocking:
Operating System:  Linux                     |
---------------------------------------------+-----------------------------
 I am trying to compile 1.4.14 bindings for use with python 3.12 in my
 CI/CD pipeline for the Roundup Issue Tracker. We use xapian for one of our
 full text search implementations.

  * OS: ubuntu 20.04
  * gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
  * binding source: https://oligarchy.co.uk/xapian/1.4.14/xapian-
 bindings-1.4.14.tar.xz
  * xapian-core/libxapian-dev from ubuntu 20.04 apt repo


 In addition to some deprecation warnings (that I think also occur when
 building under Python 3.11), we get syntax errors of the form:

 {{{
 In file included from /opt/python/3.12-dev/include/python3.12/Python.h:45,
                  from xapian_wrap.cc:22:
 xapian_wrap.cc: In function ‘PyObject* SwigPyObject_New(void*,
 swig_type_info*, int)’:
 /opt/python/3.12-dev/include/python3.12/objimpl.h:134:45: error: expected
 primary-expression before ‘)’ token
   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))
       |                                     ^~~~~~~~~~~~
 xapian_wrap.cc:2148:24: note: in expansion of macro ‘PyObject_NEW’
  2148 |   SwigPyObject *sobj = PyObject_NEW(SwigPyObject,
 SwigPyObject_type());
       |                        ^~~~~~~~~~~~
 /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))
       |                                     ^~~~~~~~~~~~
 xapian_wrap.cc:2148:24: note: in expansion of macro ‘PyObject_NEW’
  2148 |   SwigPyObject *sobj = PyObject_NEW(SwigPyObject,
 SwigPyObject_type());
       |                        ^~~~~~~~~~~~
 }}}

 The full log is visible at: https://app.travis-ci.com/github/roundup-
 tracker/roundup/jobs/574465489#L980. Before that line are the
 deprecations.

 Is this build supposed to work the same as for Python 3.10, 3.11?

 Thanks.

 -- rouilj
-- 
Ticket URL: <https://trac.xapian.org/ticket/818>
Xapian <https://xapian.org/>
Xapian


More information about the Xapian-tickets mailing list