Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #1306898

Bug#1146035: python-fann2: FTBFS: fann2/fann2_wrap.cpp:10062:41: error: 'PyInt_AsLong' was not declared in this scope; did you mean 'PyLong_AsLong'?

From Santiago Vila <sanvila@debian.org>
Newsgroups linux.debian.bugs.dist
Subject Bug#1146035: python-fann2: FTBFS: fann2/fann2_wrap.cpp:10062:41: error: 'PyInt_AsLong' was not declared in this scope; did you mean 'PyLong_AsLong'?
Date 2026-08-29 12:40 +0200
Message-ID <NxoDD-dWPy-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Package: src:python-fann2
Version: 1:1.2.0+ds-5
Severity: serious
Tags: ftbfs forky sid

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:python-fann2, so that this is still
visible in the BTS web page for this package.

Thanks.

--------------------------------------------------------------------------------
[...]
swig -python -c++ -o fann2/fann2_wrap.cpp fann2/fann2.i
creating build/temp.linux-x86_64-cpython-314/fann2
x86_64-linux-gnu-g++ -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DSWIG_COMPILE -I./include -I../include -Iinclude -I/usr/include/python3.14 -c fann2/fann2_wrap.cpp -o build/temp.linux-x86_64-cpython-314/fann2/fann2_wrap.o
fann2/fann2_wrap.cpp: In function ‘PyObject* _wrap_neural_net_create_standard_array(PyObject*, PyObject*)’:
fann2/fann2_wrap.cpp:10062:41: error: ‘PyInt_AsLong’ was not declared in this scope; did you mean ‘PyLong_AsLong’?
10062 |         arg2->array[i] = (unsigned int) PyInt_AsLong(o);
      |                                         ^~~~~~~~~~~~
      |                                         PyLong_AsLong
fann2/fann2_wrap.cpp: In function ‘PyObject* _wrap_neural_net_create_sparse_array(PyObject*, PyObject*)’:
fann2/fann2_wrap.cpp:10135:41: error: ‘PyInt_AsLong’ was not declared in this scope; did you mean ‘PyLong_AsLong’?
10135 |         arg3->array[i] = (unsigned int) PyInt_AsLong(o);
      |                                         ^~~~~~~~~~~~
      |                                         PyLong_AsLong
fann2/fann2_wrap.cpp: In function ‘PyObject* _wrap_neural_net_create_shortcut_array(PyObject*, PyObject*)’:
fann2/fann2_wrap.cpp:10200:41: error: ‘PyInt_AsLong’ was not declared in this scope; did you mean ‘PyLong_AsLong’?
10200 |         arg2->array[i] = (unsigned int) PyInt_AsLong(o);
      |                                         ^~~~~~~~~~~~
      |                                         PyLong_AsLong
fann2/fann2_wrap.cpp: In function ‘PyObject* _wrap_neural_net_get_layer_array(PyObject*, PyObject*)’:
fann2/fann2_wrap.cpp:10557:21: error: ‘PyInt_FromLong’ was not declared in this scope; did you mean ‘PyLong_FromLong’?
10557 |       PyObject *o = PyInt_FromLong( (long) result->array[i]);
      |                     ^~~~~~~~~~~~~~
      |                     PyLong_FromLong
fann2/fann2_wrap.cpp: In function ‘PyObject* _wrap_neural_net_get_bias_array(PyObject*, PyObject*)’:
fann2/fann2_wrap.cpp:10594:21: error: ‘PyInt_FromLong’ was not declared in this scope; did you mean ‘PyLong_FromLong’?
10594 |       PyObject *o = PyInt_FromLong( (long) result->array[i]);
      |                     ^~~~~~~~~~~~~~
      |                     PyLong_FromLong
fann2/fann2_wrap.cpp: In function ‘PyObject* _wrap_neural_net_set_weight_array(PyObject*, PyObject*)’:
fann2/fann2_wrap.cpp:10672:11: error: ‘PyInt_Check’ was not declared in this scope; did you mean ‘PySet_Check’?
10672 |       if (PyInt_Check(from_neuron) && PyInt_Check(to_neuron) &&
      |           ^~~~~~~~~~~
      |           PySet_Check
fann2/fann2_wrap.cpp:10674:53: error: ‘PyInt_AsLong’ was not declared in this scope; did you mean ‘PyLong_AsLong’?
10674 |         arg2->array[i].from_neuron = (unsigned int) PyInt_AsLong(from_neuron);
      |                                                     ^~~~~~~~~~~~
      |                                                     PyLong_AsLong
error: command '/usr/bin/x86_64-linux-gnu-g++' failed with exit code 1
E: pybuild pybuild:485: build: plugin distutils failed with: exit code=1: /usr/bin/python3 setup.py build 
dh_auto_build: error: pybuild --build -i python{version} -p 3.14 --parallel=2 returned exit code 13
make: *** [debian/rules:13: binary] Error 25
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

Back to linux.debian.bugs.dist | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Bug#1146035: python-fann2: FTBFS: fann2/fann2_wrap.cpp:10062:41: error: 'PyInt_AsLong' was not declared in this scope; did you mean 'PyLong_AsLong'? Santiago Vila <sanvila@debian.org> - 2026-08-29 12:40 +0200
  Bug#1146035: Patch available at Salsa Rafael Laboissière <rafael@debian.org> - 2026-08-30 18:40 +0200

csiph-web