[Debian-astro-maintainers] Bug#1122028: python-casacore: FTBFS with Python 3.14
Stuart Prescott
stuart at debian.org
Mon Dec 15 04:34:07 GMT 2025
Control: tags -1 + patch
As observed, we need both libcasa-python3-9 and python3-casacore to
build against a consistent combination of libpython and libboost-python
and for them to load that combination at runtime for this to work.
I've prototyped something that achieves these goals and autopkgtests
pass for both Python 3.13 and 3.14 with this packaging. While it's a
works-on-my-machine solution, I'm not sure if it makes sense to upload
to Debian and would appreciate comments.
https://salsa.debian.org/stuart/casacore
https://salsa.debian.org/stuart/python-casacore
The packaging changes for casacore build the libcasa-python3-9 package
with each available interpreter, creating files:
./usr/lib/x86_64-linux-gnu/libcasa_python3.cpython-313-x86_64-linux-gnu.so.9
./usr/lib/x86_64-linux-gnu/libcasa_python3.cpython-314-x86_64-linux-gnu.so.9
./usr/lib/x86_64-linux-gnu/libcasa_python3.so.9
./usr/lib/x86_64-linux-gnu/libcasa_python313.so.9 ->
libcasa_python3.cpython-313-x86_64-linux-gnu.so.9
./usr/lib/x86_64-linux-gnu/libcasa_python314.so.9 ->
libcasa_python3.cpython-314-x86_64-linux-gnu.so.9
that is, Debian-specific soname libraries libcasa_pythonXY; they also
have their more familiar Python abi tag in the filenames there so that
any searches with apt-file to locate packages shipping Python modules
will pick them up. I've left libcasa_python3.so.9 with the upstream
soname for compatibility - it is linked against whatever the default
interpreter was at build time, so it's of limited compatibility for the
same reasons as this bug exists. There are no users in Debian other than
python-casacore (below); I'm not sure if this is a library where there
would be other users in the wild.
The libcasa-python3-9 package then gets dependencies...
Depends: libboost-python1.83.0 (>= 1.83.0), libboost-python1.83.0-py313,
libboost-python1.83.0-py314, ..., libpython3.13 (>= 3.13.0~rc3),
libpython3.14 (>= 3.14.1)
... meaning that the transition tracker (via ben) will track this
package for both boost and python transitions as needed.
The follow-up changes for python-casacore ensure that it links against
the appropriate version of the library at build time. Correctly tagged
libraries are generated for each .so:
./usr/lib/python3/dist-packages/casacore/_tConvert.cpython-313-x86_64-linux-gnu.so
./usr/lib/python3/dist-packages/casacore/_tConvert.cpython-314-x86_64-linux-gnu.so
[... etc ...]
These libraries don't directly link against libpython3, so the versioned
dependencies that are generated are against python3 itself (this is
unchanged from the current dependency generation).
Depends: ..., python3 (<< 3.15), python3 (>= 3.13~), ...
All this is achieved by adding a Debian-specific soname into casacore,
which isn't delightful. At the same time, it only needs to be supported
for the lifespan of a Python interpreter in Debian (i.e. ~ 1 year), so
this isn't a "forever" promise on the soname.
As an alternative to messing about with sonames, we could leave the
sonames unchanged but locate libcasa-python3-9's libraries in
python-version-specific paths, and fiddle with rpath settings in
python-casacore to get it to load the right one at runtime. I'm not sure
whether that is better or worse magic.
--
Stuart Prescott http://www.nanonanonano.net/ stuart at nanonanonano.net
Debian Developer http://www.debian.org/ stuart at debian.org
GPG fingerprint 90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
More information about the Debian-astro-maintainers
mailing list