Roundup Tracker - Issues

Issue 2551338

classification
xapian doesn't build in CI for 3.13 python
Type: behavior Severity: major
Components: Test Versions:
process
Status: fixed fixed
:
: rouilj : rouilj
Priority: normal :

Created on 2024-04-20 18:42 by rouilj, last changed 2024-12-19 01:29 by rouilj.

Messages
msg7998 Author: [hidden] (rouilj) Date: 2024-04-20 18:42
Xapain builds under 3.13 are broken. The version of the xapian lib is 1.4.18,
so I am pulling the same version of the source code so it's compatible.
I can't use apt to install the python xapian extension because it puts it
in the OS's python, not in the python I am using to test.

The error is:

...
make  all-am
make[3]: Entering directory '/tmp/xapian-bindings-1.4.18/python3'
depbase=`echo xapian_wrap.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -
I/opt/hostedtoolcache/Python/3.13.0-alpha.6/x64/include/python3.13  -fno-strict-aliasing -Wall 
-Wno-unused -Wno-uninitialized -fvisibility=hidden  -g -O2 -MT xapian_wrap.lo -MD -MP -MF 
$depbase.Tpo -c -o xapian_wrap.lo xapian_wrap.cc &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/opt/hostedtoolcache/Python/3.13.0-
alpha.6/x64/include/python3.13 -fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized -
fvisibility=hidden -g -O2 -MT xapian_wrap.lo -MD -MP -MF .deps/xapian_wrap.Tpo -c 
xapian_wrap.cc  -fPIC -DPIC -o .libs/xapian_wrap.o
xapian_wrap.cc: In constructor 
'XapianSWIG_Python_Thread_Block::XapianSWIG_Python_Thread_Block()':
xapian_wrap.cc:87:13: error: 'PyEval_ThreadsInitialized' was not declared in this scope
   87 |         if (PyEval_ThreadsInitialized()) {
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~
xapian_wrap.cc: In constructor 
'XapianSWIG_Python_Thread_Allow::XapianSWIG_Python_Thread_Allow()':
xapian_wrap.cc:109:47: error: 'PyEval_ThreadsInitialized' was not declared in this scope
  109 |     XapianSWIG_Python_Thread_Allow() : status(PyEval_ThreadsInitialized()) {
      |                                               ^~~~~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:782: xapian_wrap.lo] Error 1
make[3]: Leaving directory '/tmp/xapian-bindings-1.4.18/python3'
make[2]: *** [Makefile:682: all] Error 2
make[2]: Leaving directory '/tmp/xapian-bindings-1.4.18/python3'
make[1]: *** [Makefile:521: all-recursive] Error 1
make[1]: Leaving directory '/tmp/xapian-bindings-1.4.18'
make: *** [Makefile:443: all] Error 2

xapian is disabled for now on GitHub 3.13 CI testing.

Consider forcing use of 1.4.25 (released 2024-03-07)
https://oligarchy.co.uk/xapian/1.4.25/xapian-bindings-1.4.25.tar.xz
rather than same version of installed library. IIUC all 1.4 should be compatible:
  https://trac.xapian.org/ticket/818 comment 3.
msg8039 Author: [hidden] (rouilj) Date: 2024-05-12 23:44
Same error with 3.13beta1 and 1.4.18.

If I force use of 1.4.25, I get a different error (along with a warning of mismatching
1.418 and 1.4.25 versions):

configure: WARNING: Xapian library is version 1.4.18 but the bindings are version 1.4.25 - we 
strongly recommend using matching versions.
case "$PYTHON_VERSION" in "3.14") echo skipping xapian build;; *) make && sudo make install; 
esac
+ case "$PYTHON_VERSION" in
+ make
make  all-recursive
make[1]: Entering directory '/tmp/xapian-bindings-1.4.25'
Making all in .
make[2]: Entering directory '/tmp/xapian-bindings-1.4.25'
make[2]: Leaving directory '/tmp/xapian-bindings-1.4.25'
Making all in python3
make[2]: Entering directory '/tmp/xapian-bindings-1.4.25/python3'
make  all-am
make[3]: Entering directory '/tmp/xapian-bindings-1.4.25/python3'
depbase=`echo xapian_wrap.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I..  -
I/opt/hostedtoolcache/Python/3.13.0-beta.1/x64/include/python3.13  -fno-strict-aliasing -Wall 
-
Wno-unused -Wno-uninitialized -fvisibility=hidden -fvisibility-inlines-hidden  -g -O2 -MT 
xapian_wrap.lo -MD -MP -MF $depbase.Tpo -c -o xapian_wrap.lo xapian_wrap.cc &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I/opt/hostedtoolcache/Python/3.13.0-
beta.1/x64/include/python3.13 -fno-strict-aliasing -Wall -Wno-unused -Wno-uninitialized -
fvisibility=hidden -fvisibility-inlines-hidden -g -O2 -MT xapian_wrap.lo -MD -MP -MF 
.deps/xapian_wrap.Tpo -c xapian_wrap.cc  -fPIC -DPIC -o .libs/xapian_wrap.o
xapian_wrap.cc: In function 'PyObject* PyInit__xapian()':
xapian_wrap.cc:66318:114: error: 'FLAG_NGRAMS' is not a member of 'Xapian::TermGenerator'
66318 |   SWIG_Python_SetConstant(d, "TermGenerator_FLAG_NGRAMS",SWIG_From_int(static_cast< 
int 
>(Xapian::TermGenerator::FLAG_NGRAMS)));
      |                                                                                                                  
^~~~~~~~~~~
xapian_wrap.cc:66331:99: error: 'SNIPPET_NGRAMS' is not a member of 'Xapian::MSet'
66331 |   SWIG_Python_SetConstant(d, "MSet_SNIPPET_NGRAMS",SWIG_From_int(static_cast< int >
(Xapian::MSet::SNIPPET_NGRAMS)));
      |                                                                                                   
^~~~~~~~~~~~~~
xapian_wrap.cc:66352:110: error: 'FLAG_NGRAMS' is not a member of 'Xapian::QueryParser'
66352 |   SWIG_Python_SetConstant(d, "QueryParser_FLAG_NGRAMS",SWIG_From_int(static_cast< int 
>
(Xapian::QueryParser::FLAG_NGRAMS)));
      |                                                                                                              
^~~~~~~~~~~
xapian_wrap.cc:66355:116: error: 'FLAG_NO_POSITIONS' is not a member of 'Xapian::QueryParser'
66355 |   SWIG_Python_SetConstant(d, 
"QueryParser_FLAG_NO_POSITIONS",SWIG_From_int(static_cast< 
int >(Xapian::QueryParser::FLAG_NO_POSITIONS)));
      |                                                                                                                    
^~~~~~~~~~~~~~~~~

Created a new workflow just for testing xapian build with various libraries.
msg8041 Author: [hidden] (rouilj) Date: 2024-05-14 12:44
opened upstream ticket. https://trac.xapian.org/ticket/828
msg8176 Author: [hidden] (rouilj) Date: 2024-11-11 18:57
Just tried with 24.04 ubuntu release. installed xapian version 1.4.22. It passes.

Cleaned up special casing of python 3.13 from the workflow job code.

Install xapian job is still disabled for 3.13 since ubuntu-latest is still
22.04. When that updates in a month or so, I'll re-enable the install for python 3.13.
msg8233 Author: [hidden] (rouilj) Date: 2024-12-19 01:29
Enabled xapian in changeset:   8222:54dfda1c4fe5

Then fixed workflow syntax. Empty exclude block needed to be commented out.

CI is running now, but xapian is installed and working.
History
Date User Action Args
2024-12-19 01:29:29rouiljsetkeywords: - Blocker
status: open -> fixed
resolution: fixed
messages: + msg8233
2024-11-11 18:57:35rouiljsetstatus: new -> open
assignee: rouilj
messages: + msg8176
2024-05-14 14:41:42rouiljsetpriority: normal
2024-05-14 12:44:35rouiljsetmessages: + msg8041
2024-05-12 23:44:02rouiljsetkeywords: + Blocker
messages: + msg8039
2024-04-20 18:42:47rouiljcreate