#1145498 kicad: FTBFS: /<<PKGBUILDDIR>>/debian/build/pcbnew/pcbnew_wrap.cxx:5599:38: error: 'PyInt_FromLong' was not declared in this scope; did you mean 'PyLong_FromLong'?

Package:
src:kicad
Source:
src:kicad
Submitter:
Santiago Vila
Date:
2026-09-01 19:55:03 UTC
Severity:
normal
Tags:
#1145498#5
Date:
2026-08-25 12:42:30 UTC
From:
To:
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:kicad, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
In file included from /usr/include/python3.14/Python.h:64,
                 from /<<PKGBUILDDIR>>/debian/build/pcbnew/pcbnew_wrap.cxx:207:
/<<PKGBUILDDIR>>/debian/build/pcbnew/pcbnew_wrap.cxx: In function ‘PyObject* wxRect_Get(wxRect*)’:
/<<PKGBUILDDIR>>/debian/build/pcbnew/pcbnew_wrap.cxx:5599:38: error: ‘PyInt_FromLong’ was not declared in this scope; did you mean ‘PyLong_FromLong’?
 5599 |             PyTuple_SET_ITEM(res, 0, PyInt_FromLong(self->x));
      |                                      ^~~~~~~~~~~~~~
/usr/include/python3.14/pyport.h:37:38: note: in definition of macro ‘_Py_CAST’
   37 | #define _Py_CAST(type, expr) ((type)(expr))
      |                                      ^~~~
/usr/include/python3.14/cpython/tupleobject.h:40:51: note: in expansion of macro ‘_PyObject_CAST’
   40 |     PyTuple_SET_ITEM(_PyObject_CAST(op), (index), _PyObject_CAST(value))
      |                                                   ^~~~~~~~~~~~~~
/<<PKGBUILDDIR>>/debian/build/pcbnew/pcbnew_wrap.cxx:5599:13: note: in expansion of macro ‘PyTuple_SET_ITEM’
 5599 |             PyTuple_SET_ITEM(res, 0, PyInt_FromLong(self->x));
      |             ^~~~~~~~~~~~~~~~

#1145498#10
Date:
2026-08-28 12:16:06 UTC
From:
To:
Hi,

The current bug is due to 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.

Please note that the kicad uptream authors removed the Python bindings in commit 65a442b1 [2]. This is planned for version 11 of kicad, which is currently in development. [3]

I have submitted a patch to fix the bug in the form of a merge request to the package repository at Salsa [4]. You might want to merge the commit in the meantime to resolve the FTBFS issue for version 10.x of KiCAD.

Best,

Rafael Labossisère

[1] https://github.com/swig/swig/commit/79f7a2b7cb7ddc256eba09c8770133148025171d
[2] https://gitlab.com/kicad/code/kicad/-/commit/65a442b1d2bf153be7979de8926ab71fd095f4bd
[3] https://gitlab.com/kicad/code/kicad/-/work_items/9078
[4] https://salsa.debian.org/electronics-team/KiCad/kicad/-/merge_requests/6

#1145498#17
Date:
2026-09-01 19:52:39 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
kicad, 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 1145498@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Carsten Schoenert <c.schoenert@t-online.de> (supplier of updated kicad 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: Tue, 01 Sep 2026 20:56:12 +0200
Source: kicad
Architecture: source
Version: 10.0.6+dfsg-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Electronics Team <pkg-electronics-devel@alioth-lists.debian.net>
Changed-By: Carsten Schoenert <c.schoenert@t-online.de>
Closes: 1145498
Changes:
 kicad (10.0.6+dfsg-1) unstable; urgency=medium
 .
   * [be5fbe3] New upstream version 10.0.6+dfsg
     (Closes: #1145498)
   * [d16932b] d/kicad.lintian-overrides: Remove not needed override
Checksums-Sha1:
 8ca4e5daa796c12f901d35405233504b3409a6d2 4411 kicad_10.0.6+dfsg-1.dsc
 c0fb3d8d4a6a3c33f53be0734f1448805e76473e 96882188 kicad_10.0.6+dfsg.orig-doc.tar.xz
 a584d2a03f7615bb64e82e3b5fd1c9b03f1aa571 166740756 kicad_10.0.6+dfsg.orig.tar.xz
 8885ffebed4c2f144ba8c5bcd43dc0e2d241c569 69600 kicad_10.0.6+dfsg-1.debian.tar.xz
 aadd39ca66380e11190b35b40f7de6d84de5d0a9 41697 kicad_10.0.6+dfsg-1_amd64.buildinfo
Checksums-Sha256:
 d35fc2f9b80770f0b6cf065d0f89820492ac330eb5865cdf97db46e4090befd6 4411 kicad_10.0.6+dfsg-1.dsc
 f046de0303bd424094a0c619962d6c1baa04b7bdf820fee92d948fddbd4e4b56 96882188 kicad_10.0.6+dfsg.orig-doc.tar.xz
 d36194b01735f9fa381d20326b5ca49e3bd18aa3128d3689faa6a5754426758e 166740756 kicad_10.0.6+dfsg.orig.tar.xz
 ff04cd58b5db8dd19a592d5d741965771dc8410af407a5c57c5fd02f71079aa5 69600 kicad_10.0.6+dfsg-1.debian.tar.xz
 af1f901db7031354e2f00a02a7afc4dea5866ffbe653a8c2c3bf6aad151debfa 41697 kicad_10.0.6+dfsg-1_amd64.buildinfo
Files:
 a6d2ba4b851a538046ff89e738d73c56 4411 electronics optional kicad_10.0.6+dfsg-1.dsc
 af5ea8fdac74b0a3d533bee724272974 96882188 electronics optional kicad_10.0.6+dfsg.orig-doc.tar.xz
 fa0e699c4c7ffb83635665e2feb0808d 166740756 electronics optional kicad_10.0.6+dfsg.orig.tar.xz
 930820c503263d6f59b80ec0ae95246d 69600 electronics optional kicad_10.0.6+dfsg-1.debian.tar.xz
 407e014166ae102d67a5ffed606a13b1 41697 electronics optional kicad_10.0.6+dfsg-1_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEtw38bxNP7PwBHmKqgwFgFCUdHbAFAmqXJf0ACgkQgwFgFCUd
HbCEuA/8DtsB8mscHFRUXRXrh5Dy02zE1nSigex5bbvplMobbDJq6IZiEMQST5Ju
PG3k/YIF1GpkG0ZeCILgwa15ESf+9Kz3s3mqIZtTSF7fNxsis8/f2AvoskftStUV
PHkfu0w9tyMNYiZTfmysozeuudbs7xCzh2JzhTQ2ODyKN+mbWEGcqTRSa9ntCpw4
itUz71YypIS0KnZAWixQ72HYdCOKef4VB5hvae4RtZTHIkGx8Dc1DHHOOZNMwf+U
7EBtLAK7mBcP5nY56LFmAumEAMRjTozciXSYXjWI/eND6NeUhSa+0wUxdID9Ybhr
Bl8s8prab1OA67AwrHEGrPpLUMvN+PQYfWFaX3+oUfzzEcs2kaP7/RrSwM3cc/dO
jFv4JjSSzcMK2u7wSVnpkgFnaZE2gt6h6MWRB2ShWso5zkvcJCeRSqnT3RchvQYR
2onicoTc8+IuWnAO+q/EeDJAd+JTMHl52R/DpkPb+i784JfSKaXOGkdO5bqC66eJ
s4BRzhvvwNoVib7TCZWJ1zY3xnQT9hcxSCy2968FINKPomRglLipkIoflgxAorCE
HTySqYvqaHImxi4sGQpsXMay/UrspzLlV417TcEUrNYqODVAjQzq4C1ohJxLOYNr
+GFA+yFZt10PyRNl0JSAZgDiMPec4Fie6UcMRkIJDp7kf1nmiAM=
=Dipp
-----END PGP SIGNATURE-----