Since the "tp_print" slot of PyTypeObject has been removed since python 3.9 (and till python 3.9 was silently ignored), we get an error when compiling =media-gfx/zbar-0.23.1: python/enum.c: In function 'enumitem_print': python/enum.c:84:31: error: 'PyTypeObject' {aka 'struct _typeobject'} has no member named 'tp_print' 84 | return(self->name->ob_type->tp_print(self->name, fp, flags)); | ^~ python/enum.c: At top level: python/enum.c:118:6: error: 'PyTypeObject' {aka 'struct _typeobject'} has no member named 'tp_print' 118 | .tp_print = (printfunc)enumitem_print, | ^~~~~~~~ python/enum.c:118:23: warning: initialization of 'PyObject * (*)(PyObject *, PyObject *)' {aka 'struct _object * (*)(struct _object *, struct _object *)'} from 'long int' makes pointer from integer without a cast [-Wint-conversion] 118 | .tp_print = (printfunc)enumitem_print, | ^ python/enum.c:118:23: note: (near initialization for 'zbarEnumItem_Type.tp_getattro') python/enum.c: In function 'enumitem_print': python/enum.c:85:1: warning: control reaches end of non-void function [-Wreturn-type] 85 | } | ^ Upstream has patched the problem: https://github.com/mchehab/zbar/issues/92 I am uploading the patch, so someone could upload it to portage tree for the upcominning defaulting of python 3.9 (or use it in his local portage patch tree in /etc/portage/patches/media-gfx/zbar-0.23.1/ ) Thanks Reproducible: Always
Created attachment 706479 [details, diff] python3_fix.patch The upstream patch. Tested and works with python 3.9
Hm, was 3.9 added to ebuild without testing or did this use to work? I'll block py3.9 tracker given this doesn't look actually ported.
Created attachment 706506 [details] build.log + emerge --info.txt
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7efabb81f9bbfc7ea149285949a27400ea6db736 commit 7efabb81f9bbfc7ea149285949a27400ea6db736 Author: Marek Szuba <marecki@gentoo.org> AuthorDate: 2021-06-04 11:21:30 +0000 Commit: Marek Szuba <marecki@gentoo.org> CommitDate: 2021-06-04 11:23:44 +0000 media-gfx/zbar: fix python3_9 compilation failure Backported upstream fix. Tested against python3_8 and python3_9, compiles fine against both. Reported-by: PhobosK <phobosk@fastmail.fm> Closes: https://bugs.gentoo.org/788703 Signed-off-by: Marek Szuba <marecki@gentoo.org> .../zbar/files/zbar-0.23.1_python_tp_print.patch | 55 ++++++++++++++++++++++ media-gfx/zbar/zbar-0.23.1.ebuild | 1 + 2 files changed, 56 insertions(+)