--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: gcc-python-plugin FTBFS with python3.8
- From: Steve Langasek <steve.langasek@canonical.com>
- Date: Thu, 20 Feb 2020 22:09:26 -0800
- Message-id: <158226536644.13267.14487649467151124597.reportbug@homer.dodds.net>
Package: gcc-python-plugin
Version: 0.17-5
Severity: serious
Tags: patch
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu focal ubuntu-patch
Hi Matthias,
gcc-python-plugin ftbfs with python3.8. Attached is the patch I've uploaded
to Ubuntu for this build failure.
Cheers,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
slangasek@ubuntu.com vorlon@debian.org
diff -Nru gcc-python-plugin-0.17/debian/patches/python3.8-compat.patch gcc-python-plugin-0.17/debian/patches/python3.8-compat.patch
--- gcc-python-plugin-0.17/debian/patches/python3.8-compat.patch 1969-12-31 16:00:00.000000000 -0800
+++ gcc-python-plugin-0.17/debian/patches/python3.8-compat.patch 2020-02-20 21:44:49.000000000 -0800
@@ -0,0 +1,40 @@
+Description: fix compatibility with Python 3.8
+ Python 3.8 changes the type of an element of the PyTypeObject struct
+ (https://www.python.org/dev/peps/pep-0590/) leading to compiler errors.
+Author: Steve Langasek <steve.langasek@ubuntu.com>
+Last-Update: 2020-02-20
+Forwarded: no
+
+Index: gcc-python-plugin-0.17/gcc-python-wrapper.c
+===================================================================
+--- gcc-python-plugin-0.17.orig/gcc-python-wrapper.c
++++ gcc-python-plugin-0.17/gcc-python-wrapper.c
+@@ -137,7 +137,11 @@
+ sizeof(PyGccWrapperTypeObject), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ NULL, /* tp_dealloc */
++#if PY_VERSION_HEX >= 0x03080000
++ 0, /* tp_vectorcall_offset */
++#else
+ NULL, /* tp_print */
++#endif
+ NULL, /* tp_getattr */
+ NULL, /* tp_setattr */
+ #if PY_MAJOR_VERSION < 3
+Index: gcc-python-plugin-0.17/cpybuilder.py
+===================================================================
+--- gcc-python-plugin-0.17.orig/cpybuilder.py
++++ gcc-python-plugin-0.17/cpybuilder.py
+@@ -254,7 +254,11 @@
+ result += ' sizeof(%(struct_name)s), /*tp_basicsize*/\n' % self.__dict__
+ result += ' 0, /*tp_itemsize*/\n'
+ result += self.c_ptr_field('tp_dealloc')
+- result += self.c_ptr_field('tp_print')
++ result += '#if PY_VERSION_HEX >= 0x03080000\n' % self.__dict__
++ result += ' 0, /*tp_vectorcall_offset*/\n' % self.__dict__
++ result += '#else\n' % self.__dict__
++ result += ' NULL, /*tp_print*/\n' % self.__dict__
++ result += '#endif\n' % self.__dict__
+ result += self.c_ptr_field('tp_getattr')
+ result += self.c_ptr_field('tp_setattr')
+ result += '#if PY_MAJOR_VERSION < 3\n' % self.__dict__
diff -Nru gcc-python-plugin-0.17/debian/patches/series gcc-python-plugin-0.17/debian/patches/series
--- gcc-python-plugin-0.17/debian/patches/series 2020-02-20 05:15:45.000000000 -0800
+++ gcc-python-plugin-0.17/debian/patches/series 2020-02-20 21:43:59.000000000 -0800
@@ -4,3 +4,4 @@
gcc-8-fix.diff
werror.diff
gcc-10.diff
+python3.8-compat.patch
--- End Message ---
--- Begin Message ---
Source: gcc-python-plugin
Source-Version: 0.17-6
Done: Matthias Klose <doko@debian.org>
We believe that the bug you reported is fixed in the latest version of
gcc-python-plugin, 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 951752@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Matthias Klose <doko@debian.org> (supplier of updated gcc-python-plugin 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)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Sun, 05 Apr 2020 15:40:16 +0200
Source: gcc-python-plugin
Architecture: source
Version: 0.17-6
Distribution: unstable
Urgency: medium
Maintainer: Debian GCC Maintainers <debian-gcc@lists.debian.org>
Changed-By: Matthias Klose <doko@debian.org>
Closes: 951752
Changes:
gcc-python-plugin (0.17-6) unstable; urgency=medium
.
* debian/patches/python3.8-compat.patch: fix compatibility with
Python 3.8 (Steve Langasek). Closes: #951752.
Checksums-Sha1:
4108b3942df5d012dc1d3ccdbb1aa71aea414f15 2202 gcc-python-plugin_0.17-6.dsc
335fac30d4f1391dc8762fc6b29f2304a9aae56f 21380 gcc-python-plugin_0.17-6.debian.tar.xz
2b021360c41fcb118b0523fdda30cdde9bcd3d57 5628 gcc-python-plugin_0.17-6_source.buildinfo
Checksums-Sha256:
b0a7a3c3b35dc913c7e737939eb32310de4eee1a96cb8b714b7ebcf28d9e2e2e 2202 gcc-python-plugin_0.17-6.dsc
157b620f79184ddaed6a992fcac234c3230d4785a5bef8cb6d9a91bae3275cdc 21380 gcc-python-plugin_0.17-6.debian.tar.xz
5e9324083103763638bc39e311d943c34430e2dfabfd574bcb0f9373baf07eca 5628 gcc-python-plugin_0.17-6_source.buildinfo
Files:
f102a1f3a96549cf8c03617cd837b8b7 2202 devel optional gcc-python-plugin_0.17-6.dsc
5d57b76f938a78eb2063bf9ba76430fd 21380 devel optional gcc-python-plugin_0.17-6.debian.tar.xz
16d33d9a2d848d95714cfda8f9b59943 5628 devel optional gcc-python-plugin_0.17-6_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJEBAEBCAAuFiEE1WVxuIqLuvFAv2PWvX6qYHePpvUFAl6J4QkQHGRva29AZGVi
aWFuLm9yZwAKCRC9fqpgd4+m9e5TD/4wbrX161obaYsiVyvITE8BCyHtPXyKDH1u
cPmoYuSaKUqTvdldHlk2xyo/SD71tWH59PNQz+OJBTS646yrUFDEeSLsYLsiLOOv
f1EhR+0cDOtOblCyy8YlRvy1GN1NwYwgMNaw9dY5hnHQLIufrlWE/9SnkMaCIRHH
gk8ZfRT6hUPuU1LimgPjII/qHLVvJidt3QasvcZwDotQf8R5vigOuUoixxUJUlUv
8wostXcOV1FYuWV8r2cElAxX0HlmrnsS3zd7Yznq/JmAVE8dcvTMP6SRhV333J7h
XTMoj1NiBuaBM1TcbHrzmagTxevJWBRPIpV518SCv9kNMbTFG5JlxyPEjFOKO5LE
yfSxYHOO1r/uon6EtznPDKMAlrp1aJbF7Ou+sc+X5lkoMmwdHZrbvoUagETVI8J3
iHTA5UCcqeawuIyO+2KWAqwYuF4lwMY69ueNA80EES8BjN/j7Mnan5mW88ZHxJxm
HNIeuHyEc7JJmEb8h0YaaQt4l21kftnx2ozoTQ1JupLbYKHniZVnjIMU0dXnytS4
28ry6B/0fS0i8WVO54gwUGtnaZKwiw6zlFL3E6XKMs7mWHVwfMaqtDoFypVFSqkS
UFyQpMPnuJxM0UFb2yNpRoOmAaIdXDRzK2X7VtS9bB5iHATZw3E2DwbFM1TYCneo
Q+1i/ZWh5A==
=Yl0X
-----END PGP SIGNATURE-----
--- End Message ---