#1076206 pybj: fails to build extension but build still succeeds

Package:
src:pybj
Source:
src:pybj
Submitter:
Graham Inggs
Date:
2026-10-05 15:51:03 UTC
Severity:
normal
Tags:
#1076206#5
Date:
2024-07-12 14:21:41 UTC
From:
To:
Hi Maintainer

pybj fails to build its extension, but the build still succeeds.
Noticed in the recent rebuild for Python 3.12 only [1].  I've copied
what I hope is the relevant part of the log below.

Regards
Graham


[1] https://buildd.debian.org/status/fetch.php?pkg=pybj&arch=amd64&ver=0.2.6-2%2Bb1&stamp=1720780666&raw=0


running build
running build_py
running build_ext
building '_bjdata' extension
x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g
-O2 -Wall -g -O2 -Werror=implicit-function-declaration
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong
-fstack-clash-protection -Wformat -Werror=format-security
-fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
-I/usr/include/python3.12 -c src/_bjdata.c -o
build/temp.linux-x86_64-cpython-312/src/_bjdata.o -std=c99
-DUSE__BJDATA
x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g
-O2 -Wall -g -O2 -Werror=implicit-function-declaration
-ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong
-fstack-clash-protection -Wformat -Werror=format-security
-fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC
-I/usr/include/python3.12 -c src/decoder.c -o
build/temp.linux-x86_64-cpython-312/src/decoder.o -std=c99
-DUSE__BJDATA
src/decoder.c:20:10: fatal error: numpy/arrayobject.h: No such file or directory
   20 | #include <numpy/arrayobject.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
/<<PKGBUILDDIR>>/setup.py:64: UserWarning: Extension module _bjdata:
The output above this warning shows how the compilation failed.
  warnings.warn("Extension module %s: The output above this warning
shows how the compilation failed."
command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
running install_lib

#1076206#10
Date:
2026-09-09 21:06:22 UTC
From:
To:
user debian-python@lists.debian.org
usertags 1076206 python3.15
tags 1076206 patch
thanks

Hi!

While rebuilding the python related packages against the Python 3.15rc2
version I ran into this failure [1].

In order to solve it, I have:
- Dropped the broken numpy dependency
- Updated debian/control to rely on dh-sequence-numpy3 instead of
   setting the abi manually
- Backported upstream commit a46355a0: fix pip ext compilation error,
   [2] to add include_dirs=[numpy.get_include()] and import numpy in
   setup.py.
- Added patch to replace deprecated PyArray_* constants with NPY_*.
- Updated the recursion patch "C extension does not use Python recursion
   limit in Python 3.12+"

I've applied these fixes in the sandbox [3] to verify that it builds
successfully and that the extension is present in the result. These
fixes should be applied in Debian to get the package back to a healthy
state.

Happy hacking,

[1]: https://debusine.debian.net/debian/r-python-python3.15/artifact/TODO/
[2]: https://github.com/NeuroJSON/pybj/commit/a46355a0b0df0bec1817b04368a5a573358645ef
[3]: https://debusine.debian.net/debian/r-python-python3.15/

#1076206#17
Date:
2026-10-05 15:48:55 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
pybj, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1076206@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Maximiliano Curia <maxy@debian.org> (supplier of updated pybj package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 05 Oct 2026 17:31:48 +0200
Source: pybj
Architecture: source
Version: 0.2.6-3
Distribution: unstable
Urgency: medium
Maintainer: Debian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Changed-By: Maximiliano Curia <maxy@debian.org>
Closes: 1076204 1076206
Changes:
 pybj (0.2.6-3) unstable; urgency=medium
 .
   * Team upload (Closes: #1076206).
   * Update packaging to rely on dh-sequence-numpy3
   * Add patch backporting upstream commit a46355a0:
     0002-fix-pip-ext-compilation-error.patch
   * Add patch to replace deprecated PyArray_* constants with NPY_*.
     0003-numpy2-support.patch (Closes: #1076204)
   * Update the recursion patch as C extensions do not use the recursion limit
     for Py 3.12+.
Checksums-Sha1:
 272500007b907343ba9ea3f34f0bb8f949cfc0e7 2025 pybj_0.2.6-3.dsc
 66fa03e1807e66c5832b8bfab7dc234b38fc6cd5 5436 pybj_0.2.6-3.debian.tar.xz
 b0a00d9e50e51d5b01acc9f9998be0e809783e7b 8221 pybj_0.2.6-3_source.buildinfo
Checksums-Sha256:
 4d5d680f9cf33e75fff421bd62d0e2f38075c4cacb1515422829c69a08d4ff1b 2025 pybj_0.2.6-3.dsc
 7560f161f4781490afa9c71f0a3ed5fb9341c7e5e9b6546dc9848e8716bd9bbf 5436 pybj_0.2.6-3.debian.tar.xz
 7ccd1f2739eccf37c79eb7b0ce0504a6fd8a0d273ffa2216a58a89f7e45e753f 8221 pybj_0.2.6-3_source.buildinfo
Files:
 f23dfe9194ef9b236b83e03fb02cddf1 2025 python optional pybj_0.2.6-3.dsc
 ab6949f9b11686897c9c14cdbadd558f 5436 python optional pybj_0.2.6-3.debian.tar.xz
 eb5df7c60ca99edbae349d2e88abe1f6 8221 python optional pybj_0.2.6-3_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE+JIdOnQEyG4RNSIVxxl2mbKbIyoFAmrDwyMACgkQxxl2mbKb
Iyo3wxAAkW4LI7UDCNHlWVvjburWZ6QTtUdxZfc+7SV3aNGU1lAF5b1symPBXX7G
2TqjGrdP8VmcIPQRAQJyGnG2Ib0gYhHDzbkQaDMkFLKpleyQnmA7fS4QjSBCI8Gq
fGzu+DG9upVIMKbdbvfb841UGfDaT/Hazd1SgihY3hoOjD7D6OJeqBOg6PzfmOLL
mllSPeQ+RTqb1IwpnqF855ItxRS7VRtnzYr67ydF+p3OBdYbLcNk4URz2b9uffAy
w19PNn3Ta/3mgNVcNFZctfhAMANYxf4IveGYWdo25DjsvdUlNNXXt7j0gt4ZEnJg
WqtFTss+JyLj71WI1CAYzNFscBTL8XOddcjNe6iSGoe1jpRI8EHs5KKpUQ3Uy9yZ
lorclJf/F2xZXP9fkodN3zdJxByuISY0yDKGR7j+CKAeac8FlZIIJTmzDpzea721
w7h5cKBq3i9tFjluLu/RSGHD3sTfpR1KI75+yXfIO6korgf9cU9YoiiGh+0jMVXx
g7JAFWPggcVhH04F5KdilBt1Tx7V3JdITMo7SgIWKtT79wWpsqs7xJaxraiQZKbg
GOFrwUXFaZyy2w7rUAQFxGX/9VPmfW1YvLRIKNQyXMbnMsL02EidNz6DZLjx6mYW
btODy9SWpM7SZNcSDF8HYtkgQQ3Oyv6FIVWG4juo5BuvtJYfMZQ=
=6OuU
-----END PGP SIGNATURE-----