[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1000213: gcc-python-plugin: Don't use -Werror=deprecated-declarations



Package: gcc-python-plugin
Version: 0.17-6
Severity: serious
Tags: patch
Justification: ftbfs
User: ubuntu-devel@lists.ubuntu.com
Usertags: origin-ubuntu jammy ubuntu-patch

Hello,

The gcc-python-plugin package currently fails to build because the source
uses functions that are deprecated in python3.9:

  gcc-python.c:791:24: error: ‘void PyEval_InitThreads()’ is deprecated [-Werror=deprecated-declarations]

Since there is no upstream fix for this deprecation warning, it doesn't seem
worth failing the build on, so I've prepared the attached patch to fix it. 
As a side effect, it fixes the fact that gcc-python-plugin was not
previously using the cflags from dpkg-buildflags for the build, which seems
kind of important!

I've uploaded this patch to Ubuntu.  Please consider including it in Debian
as well.

Thanks,
-- 
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/rules gcc-python-plugin-0.17/debian/rules
--- gcc-python-plugin-0.17/debian/rules	2020-02-20 05:15:45.000000000 -0800
+++ gcc-python-plugin-0.17/debian/rules	2021-11-19 11:24:09.000000000 -0800
@@ -14,6 +14,7 @@
 INTERP	= python3 python3-dbg # python python-dbg
 
 export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+export CFLAGS := $(shell env DEB_CFLAGS_MAINT_APPEND=-Wno-error=deprecated-declarations dpkg-buildflags --get CFLAGS)
 
 build-arch: $(INTERP:%=build-stamp-%)
 build-indep: doc-stamp

Reply to: