#1144991 astrometry.net: FTBFS with swig 4.5.0

Package:
src:astrometry.net
Source:
src:astrometry.net
Submitter:
Rafael Laboissière
Date:
2026-08-29 09:53:02 UTC
Severity:
normal
Tags:
#1144991#5
Date:
2026-08-21 08:12:58 UTC
From:
To:
Dear Maintainer,

The astrometry.net package FTBFS with swig 4.5.0, which is currently in unstable. An excerpt of the build log is shown below.

This is due to the removal of the Python 2 compatibility macros in version 4.5.0. According to the SWIG authors, these macros were retained in the generated code (pyhead.swg) solely for user typemaps. Any typemap using these macros must be updated to call the Python 3 C API directly.

Best,

Rafael Laboissière

##### Build log excerpt

util_wrap.c: In function ‘broadcast_2to2i’:
util_wrap.c:5402:19: error: implicit declaration of function ‘PyInt_FromLong’; did you mean ‘PyLong_FromLong’? [-Wimplicit-function-declaration]
 5402 |             pok = PyInt_FromLong(i);
      |                   ^~~~~~~~~~~~~~
      |                   PyLong_FromLong
util_wrap.c:5402:17: error: assignment to ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
 5402 |             pok = PyInt_FromLong(i);
      |                 ^
util_wrap.c: In function ‘_wrap_quadfile_get_stars’:
util_wrap.c:10981:21: error: initialization of ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
10981 |       PyObject *o = PyInt_FromLong(arg3[i]);
      |                     ^~~~~~~~~~~~~~
util_wrap.c: In function ‘_wrap_healpix_get_neighbours’:
util_wrap.c:15496:21: error: initialization of ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
15496 |       PyObject *o = PyInt_FromLong(arg2[i]);
      |                     ^~~~~~~~~~~~~~
util_wrap.c: In function ‘_wrap_healpix_rangesearch_xyz’:
util_wrap.c:15969:21: error: initialization of ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
15969 |       PyObject *o = PyInt_FromLong(il_get(result, i));
      |                     ^~~~~~~~~~~~~~
util_wrap.c: In function ‘_wrap_healpix_rangesearch_xyz_approx’:
util_wrap.c:16021:21: error: initialization of ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
16021 |       PyObject *o = PyInt_FromLong(il_get(result, i));
      |                     ^~~~~~~~~~~~~~
util_wrap.c: In function ‘_wrap_healpix_rangesearch_radec_approx’:
util_wrap.c:16081:21: error: initialization of ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
16081 |       PyObject *o = PyInt_FromLong(il_get(result, i));
      |                     ^~~~~~~~~~~~~~
util_wrap.c: In function ‘_wrap_healpix_rangesearch_radec’:
util_wrap.c:16141:21: error: initialization of ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
16141 |       PyObject *o = PyInt_FromLong(il_get(result, i));
      |                     ^~~~~~~~~~~~~~
util_wrap.c: In function ‘_wrap_healpix_region_search’:
util_wrap.c:16226:21: error: initialization of ‘PyObject *’ {aka ‘struct _object *’} from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
16226 |       PyObject *o = PyInt_FromLong(il_get(result, i));
      |                     ^~~~~~~~~~~~~~
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
make[3]: *** [Makefile:171: _util.cpython-314-x86_64-linux-gnu.so] Error 1
make[3]: Leaving directory '/home/rafael/automate/swig-4.5.0/tmp/astrometry.net-0.98+dfsg/util'
make[2]: *** [Makefile:148: pyutil] Error 2

#1144991#10
Date:
2026-08-21 08:25:31 UTC
From:
To:
I proposed a patch for fixing the issue as a merge request at Salsa:
https://salsa.debian.org/debian-astro-team/astrometry.net/-/merge_requests/2

Best,

Rafael Laboissière

#1144991#17
Date:
2026-08-29 09:51:13 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
astrometry.net, 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 1144991@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ole Streicher <olebole@debian.org> (supplier of updated astrometry.net 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: Sat, 29 Aug 2026 11:11:27 +0200
Source: astrometry.net
Architecture: source
Version: 0.98+dfsg-2
Distribution: unstable
Urgency: medium
Maintainer: Debian Astronomy Team <debian-astro-maintainers@lists.alioth.debian.org>
Changed-By: Ole Streicher <olebole@debian.org>
Closes: 1144991
Changes:
 astrometry.net (0.98+dfsg-2) unstable; urgency=medium
 .
   [ Alexandre Detiste ]
   * Recommends: python3-exifread instead of transitional python3-exif
 .
   [ Rafael Laboissière ]
   * Add patch for fixing FTBFS with swig 4.5.0 (Closes: #1144991)
 .
   [ Ole Streicher ]
   * Push Standards-Version to 4.7.4, dh-compat to 14, no changes required
Checksums-Sha1:
 31ae6c2ae1d2f7126f6fe07df926a6ef44345103 2540 astrometry.net_0.98+dfsg-2.dsc
 addc0a313d95242bcc3420c090a5db08eee1384f 46372 astrometry.net_0.98+dfsg-2.debian.tar.xz
Checksums-Sha256:
 82b47ed48936bb5f3cf41873a65dfd6cc29ff0e318b55a320cd33a5eb3de4709 2540 astrometry.net_0.98+dfsg-2.dsc
 6b05524300fab735bd9aa8b0bef3e9d3ca9bd20bd2892dc8abca1e32fc4c261f 46372 astrometry.net_0.98+dfsg-2.debian.tar.xz
Files:
 a4f17797c341b6dc1aac01743c77ef82 2540 science optional astrometry.net_0.98+dfsg-2.dsc
 85c28798ceac5cd18c8147b47f992bf8 46372 science optional astrometry.net_0.98+dfsg-2.debian.tar.xz
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE7/BpV0Ra2/h0L3qtmk9WvbkOGL0FAmqSpZcACgkQmk9WvbkO
GL00Qg/+MgywPj8fPl/WPWLSviDAA7DJ4XPNV+G87toZgspflrfbtpss0MMHW473
9Xkxww8HkyFjPUG2DuJzX0Z14pgGMIZARHqu9DlNzOccOfVhkDZOw/fhlQlvVwaI
ce0paT2q2JxA/7wAa1+rNUjt7yb8m0j/AfS2IInh0u8dbtv/mnQvo/eGURQ8ZhmS
T7VdML2GMyAJAKYP7P0vuwc/nv+c6irB1cgvMWQndbV72lrkmQvhQaGeL66mrR1/
xkgWNUvFr8WMmpWRzG7ANf7FFITdi1nvWp3U0q9bCoZl/AVFvhsxrobqzj/fCfcc
bAOfdwsqji5zkrtC7CeiNpzNCsuzBDZSTSnEs/WxrAgV/Xwa3P5vfdxsGkm7TGzz
D+Py5zLLSUJi4FpeioTh6EkbYjG7Ab/vCezJALzKKsh7iHwjpkocezVv6CRHbP7A
PCVwhwV02zZBWyp2OV/CUUprS0bxr/bjyf4Oyli6xPWkLEj2fYSp0we4xmk77s/9
NvKIWm/xSDDRAdzFDt6KyyUn8fbF/pU2ccvb3zyZtguf1LMbyY96/dkx6TsWuCvV
PfSAOn2XwnV/6ThvDEkFmM49fro08mU/xus6Rgog5YAW8SJ3xNhuU+08jzx/0iUe
y8vutQ37ym5xYGpBcB1z0Sd0mlh/uNQmuOK8/gAJd3h5cYeBfU0=
=x3GR
-----END PGP SIGNATURE-----