#1145861 xraylib: FTBFS: python/xraylib_wrap.c:3599:46: error: implicit declaration of function 'PyInt_FromLong'; did you mean 'PyLong_FromLong'? [-Wimplicit-function-declaration] #1145861
- Package:
- src:xraylib
- Source:
- src:xraylib
- Submitter:
- Santiago Vila
- Date:
- 2026-08-31 13:53:04 UTC
- Severity:
- normal
- Tags:
Dear maintainer: During a rebuild of all packages in unstable, this package failed to build. Below you will find the last part of the build log (probably the most relevant part, but not necessarily). If required, the full build log is available here: https://people.debian.org/~sanvila/build-logs/202608/ About the archive rebuild: The build was made on virtual machines from AWS, using sbuild and a reduced chroot with only build-essential packages. If you cannot reproduce the bug please contact me privately, as I am willing to provide ssh access to a virtual machine where the bug is fully reproducible. If this is really a bug in one of the build-depends, please use reassign and add an affects on src:xraylib, so that this is still visible in the BTS web page for this package. Thanks. -------------------------------------------------------------------------------- [...] python/xraylib_wrap.c: In function ‘_wrap_CompoundParser’: python/xraylib_wrap.c:3599:46: error: implicit declaration of function ‘PyInt_FromLong’; did you mean ‘PyLong_FromLong’? [-Wimplicit-function-declaration] 3599 | PyDict_SetItemString(dict, "nElements",PyInt_FromLong((long) cd->nElements)); | ^~~~~~~~~~~~~~ | PyLong_FromLong python/xraylib_wrap.c:3599:46: error: passing argument 3 of ‘PyDict_SetItemString’ makes pointer from integer without a cast [-Wint-conversion] 3599 | PyDict_SetItemString(dict, "nElements",PyInt_FromLong((long) cd->nElements)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | int
This issue is caused by the removal of the Python 2 compatibility macros in version 4.5.0 of SWIG. [1] According to the SWIG authors, these macros were retained in the generated code (pyhead.swg) solely for user typemaps. All typemap using these macros are updated to call the Python 3 C API directly. I submitted a patch for fixing the issue as a merge request at Salsa [2]. It was taken from the upstream Git repository (commit 09dcb897 [3]). This commit is included in the newest upstream release 4.3.0, so it should also be possible to get rid of the FTBFS bug by upgrading the Debian package. Best, Rafael Laboissière [1] https://github.com/swig/swig/commit/79f7a2b7cb7ddc256eba09c8770133148025171d [2] https://salsa.debian.org/science-team/xraylib/-/merge_requests/3 [3] https://github.com/tschoonj/xraylib/commit/09dcb8970232b61ce04dd51f21e1d3aa5cd9447d
We believe that the bug you reported is fixed in the latest version of
xraylib, 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 1145861@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Andreas Tille <tille@debian.org> (supplier of updated xraylib 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, 31 Aug 2026 15:27:31 +0200
Source: xraylib
Architecture: source
Version: 4.3.0+dfsg-1
Distribution: unstable
Urgency: medium
Maintainer: Debian PaN Maintainers <debian-pan-maintainers@alioth-lists.debian.net>
Changed-By: Andreas Tille <tille@debian.org>
Closes: 1145861
Changes:
xraylib (4.3.0+dfsg-1) unstable; urgency=medium
.
* Team upload.
* New upstream version
Closes: #1145861
* Simplify d/watch
* Build-Depends: pybuild-plugin-pyproject
* Set upstream metadata fields: Bug-Submit.
* debputy lint --auto-fix (routine-update)
* Build-Depends: gfortran
Checksums-Sha1:
c598bb8394134a853f559574e9e5be1217c3247d 2423 xraylib_4.3.0+dfsg-1.dsc
c6c227efa0028b05ada5946e30ae7e5aa9c34b41 6216316 xraylib_4.3.0+dfsg.orig.tar.xz
f6791e941882d85528478043448b94a214c3bc0a 7260 xraylib_4.3.0+dfsg-1.debian.tar.xz
50433f972d7333f4814f51122a7ec83e5da15ac8 8776 xraylib_4.3.0+dfsg-1_amd64.buildinfo
Checksums-Sha256:
e697976b0772b95f25df41b6762926af3ca48196be567999bcef78b231335b01 2423 xraylib_4.3.0+dfsg-1.dsc
7b541dddb157cc1506e7e23b39df7b668944b8cdfbc6f30b33aa82c6138077ae 6216316 xraylib_4.3.0+dfsg.orig.tar.xz
05f954339e34272593f371745ae20fd42dbf0e30d97c47ea25446c01c5e9cde0 7260 xraylib_4.3.0+dfsg-1.debian.tar.xz
ef576ea75356ed5defbb8a9f9ced723cda44602fa7f15795aa11b823f9ca918d 8776 xraylib_4.3.0+dfsg-1_amd64.buildinfo
Files:
549fbefc9564b14e1d6586a5e7cb742e 2423 libs optional xraylib_4.3.0+dfsg-1.dsc
13a69703abc4e1e8b915100e1c67aad2 6216316 libs optional xraylib_4.3.0+dfsg.orig.tar.xz
b0bb1738bd9efc6f1d3f7830a2309186 7260 libs optional xraylib_4.3.0+dfsg-1.debian.tar.xz
500395a0fd3259d13616ee25c44673e5 8776 libs optional xraylib_4.3.0+dfsg-1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJFBAEBCgAvFiEE8fAHMgoDVUHwpmPKV4oElNHGRtEFAmqVgokRHHRpbGxlQGRl
Ymlhbi5vcmcACgkQV4oElNHGRtG9Ww/9Fkqx3KxC5uoGMKX/HpcR+AVju6DkZAre
Nj8TT+hXfOuSwd5Wl3Wrp4z3BfLFNEYPbz0Vedsr1NijnWDZjALICYnx1E9qqtQF
26D+OBNCYAr/2eshBd9SFl8tL79Fx/pdryJa1pLBkxvVNTmDgIc82HmrszuZpwMk
Oe7U62yYMxRzxeZLNX4r1AtSGpeoo72ur7VZGKwIOJ6dGEO1PboL7k8ArcfXshBU
36dygAwSbT2GWagMu81+nr8rreu64+xBuywGaPEL+qO5db2ewnYoG/j53T/fsQ9R
/59iupjG+/XTf2GysmpS4ld19jCuFJrdk7n8v44QUW4d6pPhkfjGukSz2br4GAVT
8GF9ehSbooJaFlLmc2JBX44pBHaNn6i+MmNbk8Jus7yWn3L2m99reuYR+ENZWYJM
TGjSRoCBlKXQVvIdI/xtpfAB0gdpUfpexmQEUIW5nZV6T3BtDw48JHMxGChGzp5j
NQITOoWAg5sfhzFrICYgApZ8FFLvN+IPNp0yoRqXI5SNDXW8iNjrlQzfe/yyhVNe
RiTP/cnVgImdw2NKKt0qsKYG8jnDm+hxHwemENM8d3Gk6bZsCzXMmx8U5wTo18HB
WCOitUIRFhgTy4XtQBmwRDY9hWuIuHKroKJ6Q/YeGgP9bHbtSeXTLtmgScTx2B7Z
gAZVM/1fUVs=
=9hnE
-----END PGP SIGNATURE-----