Bug#1064673: pocketsphinx-python: FTBFS: ImportError: /usr/lib/python3/dist-packages/sphinxbase/_sphinxbase.cpython-311-x86_64-linux-gnu.so: undefined symbol: SWIG_Python_str_AsChar

2024-02-28 Thread Samuel Thibault
control: reassign -1 python3-sphinxbase
control: affects -1 pocketsphinx-python

Lucas Nussbaum via Pkg-a11y-devel, le dim. 25 févr. 2024 20:38:23 +0100, a 
ecrit:
> >   File "/usr/lib/python3.12/unittest/loader.py", line 137, in 
> > loadTestsFromName
> > module = __import__(module_name)
> >  ^^^
> >   File "/<>/tests/test_jsgf.py", line 32, in 
> > from pocketsphinx import Pocketsphinx, Jsgf
> >   File "/<>/pocketsphinx/__init__.py", line 35, in 
> > from sphinxbase.sphinxbase import *
> >   File "/usr/lib/python3/dist-packages/sphinxbase/sphinxbase.py", line 24, 
> > in 
> > from . import _sphinxbase
> > ImportError: 
> > /usr/lib/python3/dist-packages/sphinxbase/_sphinxbase.cpython-312-x86_64-linux-gnu.so:
> >  undefined symbol: SWIG_Python_str_AsChar

More simply,

$ python3 -c 'from sphinxbase import sphinxbase'
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3/dist-packages/sphinxbase/sphinxbase.py", line 24, in 

from . import _sphinxbase
ImportError: 
/usr/lib/python3/dist-packages/sphinxbase/_sphinxbase.cpython-311-x86_64-linux-gnu.so:
 undefined symbol: SWIG_Python_str_AsChar

and indeed, in swig's ./CHANGES.current I can see 

2023-12-20: wsfulton
#2190 Replace SWIG_Python_str_AsChar with 
SWIG_PyUnicode_AsUTF8AndSize.

So this needs fixing (just rebuilding sphinxbase doesn't work). I can
see in
https://codesearch.debian.net/search?q=SWIG_Python_str_AsChar=1
that a lot of packages might be affected by this incompatibility...

Samuel



Bug#1064673: pocketsphinx-python: FTBFS: ImportError: /usr/lib/python3/dist-packages/sphinxbase/_sphinxbase.cpython-311-x86_64-linux-gnu.so: undefined symbol: SWIG_Python_str_AsChar

2024-02-25 Thread Lucas Nussbaum
Source: pocketsphinx-python
Version: 1:0.1.15-3
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@debian.org
Usertags: ftbfs-20240224 ftbfs-trixie

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
>  debian/rules binary
> dh binary --buildsystem=pybuild
>dh_update_autotools_config -O--buildsystem=pybuild
>dh_autoreconf -O--buildsystem=pybuild
>dh_auto_configure -O--buildsystem=pybuild
> I: pybuild base:305: python3.12 setup.py config 
> running config
> I: pybuild base:305: python3.11 setup.py config 
> running config
>dh_auto_build -O--buildsystem=pybuild
> I: pybuild base:305: /usr/bin/python3.12 setup.py build 
> running build
> running build_ext
> building 'pocketsphinx._pocketsphinx' extension
> swigging deps/pocketsphinx/swig/pocketsphinx.i to 
> deps/pocketsphinx/swig/pocketsphinx_wrap.c
> swig -python -modern -threads -I/usr/include/sphinxbase 
> -I/usr/share/sphinxbase/swig -Ideps/sphinxbase/include/android 
> -I/usr/include/pocketsphinx -I/usr/share/pocketsphinx/swig 
> -Ideps/sphinxbase/swig -outdir pocketsphinx -o 
> deps/pocketsphinx/swig/pocketsphinx_wrap.c 
> deps/pocketsphinx/swig/pocketsphinx.i
> Deprecated command line option: -modern. Ignored, this option is now always 
> on.
> creating build
> creating build/temp.linux-x86_64-cpython-312
> creating build/temp.linux-x86_64-cpython-312/deps
> creating build/temp.linux-x86_64-cpython-312/deps/pocketsphinx
> creating build/temp.linux-x86_64-cpython-312/deps/pocketsphinx/swig
> x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 
> -Wall -g -fstack-protector-strong -fstack-clash-protection -Wformat 
> -Werror=format-security -fcf-protection -g -fwrapv -O2 -g -O2 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection 
> -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DSPHINXBASE_EXPORTS 
> -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -I/usr/include/sphinxbase 
> -I/usr/share/sphinxbase/swig -Ideps/sphinxbase/include/android 
> -I/usr/include/pocketsphinx -I/usr/share/pocketsphinx/swig 
> -I/usr/include/python3.12 -c deps/pocketsphinx/swig/pocketsphinx_wrap.c -o 
> build/temp.linux-x86_64-cpython-312/deps/pocketsphinx/swig/pocketsphinx_wrap.o
>  -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses 
> -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result 
> -Wno-sign-compare -Wno-misleading-indentation
> creating 
> /<>/.pybuild/cpython3_3.12_pocketsphinx/build/pocketsphinx
> x86_64-linux-gnu-gcc -shared -Wl,-O1 -Wl,-Bsymbolic-functions -g -fwrapv -O2 
> -Wl,-z,relro -g -O2 -ffile-prefix-map=/<>=. 
> -fstack-protector-strong -fstack-clash-protection -Wformat 
> -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 
> build/temp.linux-x86_64-cpython-312/deps/pocketsphinx/swig/pocketsphinx_wrap.o
>  -L/usr/lib/x86_64-linux-gnu -o 
> /<>/.pybuild/cpython3_3.12_pocketsphinx/build/pocketsphinx/_pocketsphinx.cpython-312-x86_64-linux-gnu.so
>  -lpocketsphinx
> copying 
> /<>/.pybuild/cpython3_3.12_pocketsphinx/build/pocketsphinx/_pocketsphinx.cpython-312-x86_64-linux-gnu.so
>  -> pocketsphinx
> running build_py
> copying pocketsphinx/__init__.py -> 
> /<>/.pybuild/cpython3_3.12_pocketsphinx/build/pocketsphinx
> copying pocketsphinx/pocketsphinx.py -> 
> /<>/.pybuild/cpython3_3.12_pocketsphinx/build/pocketsphinx
> running egg_info
> creating pocketsphinx.egg-info
> writing pocketsphinx.egg-info/PKG-INFO
> writing dependency_links to pocketsphinx.egg-info/dependency_links.txt
> writing top-level names to pocketsphinx.egg-info/top_level.txt
> writing manifest file 'pocketsphinx.egg-info/SOURCES.txt'
> reading manifest file 'pocketsphinx.egg-info/SOURCES.txt'
> reading manifest template 'MANIFEST.in'
> warning: no files found matching '*.h' under directory 
> 'deps/sphinxbase/include'
> no previously-included directories found matching 
> 'deps/sphinxbase/include/wince'
> warning: no files found matching '*.c' under directory 
> 'deps/sphinxbase/src/libsphinxad'
> warning: no files found matching '*.c' under directory 
> 'deps/sphinxbase/src/libsphinxbase'
> warning: no files found matching '*.h' under directory 
> 'deps/sphinxbase/src/libsphinxbase'
> warning: no files found matching '*.h' under directory 
> 'deps/pocketsphinx/include'
> warning: no files found matching '*.c' under directory 
> 'deps/pocketsphinx/src/libpocketsphinx'
> warning: no files found matching '*.h' under directory 
> 'deps/pocketsphinx/src/libpocketsphinx'
> warning: no directories found matching 'pocketsphinx/model'
> warning: no directories found matching 'pocketsphinx/data'
> adding license file 'LICENSE'
> writing manifest file 'pocketsphinx.egg-info/SOURCES.txt'
> I: pybuild base:305: /usr/bin/python3 setup.py build 
> running build
> running build_ext
> building 'pocketsphinx._pocketsphinx' extension
> swigging