#1145122 armnn: FTBFS: src/pyarmnn/_generated/armnn_wrap.cpp:48785:26: error: 'PyString_FromString' was not declared in this scope; did you mean 'PyLong_FromString'?

Package:
src:armnn
Source:
src:armnn
Submitter:
Santiago Vila
Date:
2026-10-13 14:23:22 UTC
Severity:
normal
Tags:
#1145122#5
Date:
2026-08-22 23:25:06 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:armnn, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
/<<PKGBUILDDIR>>/build-area/python/pyarmnn/../../../include/armnn/INetwork.hpp:697:24: note: declared here
  697 |     IConnectableLayer* AddSubtractionLayer(const char* name = nullptr);
      |                        ^~~~~~~~~~~~~~~~~~~
src/pyarmnn/_generated/armnn_wrap.cpp: In function ‘PyObject* _wrap_Optimize__SWIG_0(PyObject*, Py_ssize_t, PyObject**)’:
src/pyarmnn/_generated/armnn_wrap.cpp:48785:26: error: ‘PyString_FromString’ was not declared in this scope; did you mean ‘PyLong_FromString’?
48785 |       PyObject *string = PyString_FromString(strings[i].c_str());
      |                          ^~~~~~~~~~~~~~~~~~~
      |                          PyLong_FromString
src/pyarmnn/_generated/armnn_wrap.cpp: In function ‘PyObject* _wrap_Optimize__SWIG_1(PyObject*, Py_ssize_t, PyObject**)’:
src/pyarmnn/_generated/armnn_wrap.cpp:48869:26: error: ‘PyString_FromString’ was not declared in this scope; did you mean ‘PyLong_FromString’?
48869 |       PyObject *string = PyString_FromString(strings[i].c_str());
      |                          ^~~~~~~~~~~~~~~~~~~
      |                          PyLong_FromString
WARNING: PyArmNN is deprecated. To use ArmNN on python, please use the tflite delegate. Expected to be removed in release 24.05.
error: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1
make[3]: *** [python/pyarmnn/CMakeFiles/pyarmnn.dir/build.make:93: python/pyarmnn/pyarmnn.wrap.timestamp] Error 1
make[3]: Leaving directory '/<<PKGBUILDDIR>>/build-area'
make[2]: *** [CMakeFiles/Makefile2:1995: python/pyarmnn/CMakeFiles/pyarmnn.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[ 79%] Building CXX object CMakeFiles/UnitTests.dir/src/armnn/test/EndToEndTest.cpp.o
/usr/bin/x86_64-linux-gnu-g++ -DARMCOMPUTECL_ENABLED -DARMNN [too-long-redacted] src/armnn/test/EndToEndTest.cpp
[ 79%] Building CXX object CMakeFiles/UnitTests.dir/src/armnn/test/ExecutionFrameTest.cpp.o
/usr/bin/x86_64-linux-gnu-g++ -DARMCOMPUTECL_ENABLED -DARMNN [too-long-redacted] mnn/test/ExecutionFrameTest.cpp
[ 79%] Building CXX object CMakeFiles/UnitTests.dir/src/armnn/test/FloatingPointConverterTest.cpp.o
[...]
--------------------------------------------------------------------------------

#1145122#10
Date:
2026-08-31 10:56:52 UTC
From:
To:
Hi,

The current issue 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. .

I submitted a patch to fix the problem as a merge request on Salsa [2]. Unfortunately, once the changes for the NMU'ed version 23.08-5.1 have been integrated into the repository, this commit will not merge cleanly into the dgit/sid default branch.

Please note that PyArmNN support was dropped upstream (commit dd630033 [3]), as of December 13, 2024. This change is included in version 25.02 [4], so upgrading the package to the latest released upstream version (26.07) should also fix the issue.

Best,

Rafael

[1] https://github.com/swig/swig/commit/79f7a2b7cb7ddc256eba09c8770133148025171d
[2] https://salsa.debian.org/deeplearning-team/armnn/-/merge_requests/3
[3] https://github.com/ARM-software/armnn/commit/dd63003310dcb0b9d7af606a0f2161eeabf6308a
[4] https://github.com/ARM-software/armnn/releases/tag/v25.02

#1145122#17
Date:
2026-08-31 10:59:58 UTC
From:
To:
Please, disregard the file attached to my previous message. It is not intended for the armnn package. (Oh, the joy of doing mass bug reports! …)

Rafael Laboissière

* Rafael Laboissière <rafael@debian.org> [2026-08-31 12:56]:

#1145122#24
Date:
2026-10-13 13:04:59 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
armnn, 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 1145122@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 armnn 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, 13 Oct 2026 14:44:47 +0200
Source: armnn
Architecture: source
Version: 23.08-5.2
Distribution: unstable
Urgency: medium
Maintainer: Francis Murtagh <francis.murtagh@arm.com>
Changed-By: Maximiliano Curia <maxy@debian.org>
Closes: 1145122
Changes:
 armnn (23.08-5.2) unstable; urgency=medium
 .
   * Non-maintainer upload.
   * Fix FTBFS with swig 4.5. (Closes: #1145122)
Checksums-Sha1:
 414d733c78ee73169d2455f1a14b223206d84dc7 3339 armnn_23.08-5.2.dsc
 11a475722cdcc37747e7e9f307bf274d5a698091 37324 armnn_23.08-5.2.debian.tar.xz
 6e2c4c6a305ddf6aeecf1bbe76c5b55a62bc330b 8849 armnn_23.08-5.2_source.buildinfo
Checksums-Sha256:
 d861c100856641dc01882f1f3d5343da17666537b4c5ca00af45e26604d1a592 3339 armnn_23.08-5.2.dsc
 90e1fb7b23118fa18d4a90b839dd1e2881fb6bdb67fad15fd397c3c5356ab47d 37324 armnn_23.08-5.2.debian.tar.xz
 6996ad9a7a7a889180be81f4af174b5d69a85cc6c39d03caf6db5aab848f533f 8849 armnn_23.08-5.2_source.buildinfo
Files:
 179db38f9dd878421431c80e6dec26e9 3339 devel optional armnn_23.08-5.2.dsc
 9d131425ab6a200f51bab7f520861d43 37324 devel optional armnn_23.08-5.2.debian.tar.xz
 bcb89c2441a6ee1cc0452c3d68d4070d 8849 devel optional armnn_23.08-5.2_source.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE+JIdOnQEyG4RNSIVxxl2mbKbIyoFAmrOKBUACgkQxxl2mbKb
IyrTrw/+Ju1tyFHzkCJZtFgV+5iqQmdqVVEqdXOHrRWXzE1s7mGyRU5DT5/TkQ7c
CFPlpRl6e9p+wbbBSrPZoCryk170GwSYx+lXuJ7cEXAUfbmJeZM5mTUaEh//KSHV
yJcu7af2Caj9Li7DOWuO/2A+tfqph4G4MxzMJYOG0DvGiIVTX7zHahaC25r59vW1
5E2TyQ6btt2xwFnYgHH+UDL4OHD2pLPY5HLWL/ilqkOONzAc37BXeS3GcLQsKSjg
PYSzXSppeKtHk8rXHtE3qGF9PM0ozLU8tztiSA9KEzBFK6Fb621u0hbiaRu7PIRQ
eF68ryYIgjjlZGGW8K/PBD4WZgsCHgbC8hbrVd0l4cTgrO/uq9uCyvtO6VXmk8OV
gZqq9b3WIqu4DUKVvCOtxmdojNhrDjAdaBu8x+hap+IfRNdJdwGQLW0+LPjqmeck
3p2WnQPu97fWWqAKwaOh5fYw3NM5nsjFykPtCcIOWDPeoV5MorehoyNFI/hz0sBz
llXioKglqU9Fdqe3WzrZwHADe2AIeecVFHDARQXgQ3OqPt4jq5YqXJg56q28Jy9G
IwVWxHX9qH4gzj3GxLLZXeMgMwl8z1fpe6p/MSPZVdjXEGSMeROxCC5Xn6s0VqiW
pyCj0hKU5NLK51JQW4J/GAgiv6lxvzfvUVXamRbFVp9pVS0J+mg=
=3Vq0
-----END PGP SIGNATURE-----