app-backup/rdiff-backup compiles fine for Python 3.9 and 3.10, but due to changes in Python 3.11 (see below) it fails to compile the C module on Python 3.11: running build_ext building 'rdiff_backup.C' extension creating /var/tmp/portage/app-backup/rdiff-backup-2.0.5-r1/work/rdiff-backup-2.0.5-python3_11/temp.linux-x86_64-3.11 building 'rdiff_backup._librsync' extension creating /var/tmp/portage/app-backup/rdiff-backup-2.0.5-r1/work/rdiff-backup-2.0.5-python3_11/temp.linux-x86_64-3.11 creating /var/tmp/portage/app-backup/rdiff-backup-2.0.5-r1/work/rdiff-backup-2.0.5-python3_11/temp.linux-x86_64-3.11/src x86_64-pc-linux-gnu-gcc -Wsign-compare -DNDEBUG -O2 -march=native -fomit-frame-pointer -fPIC -I/usr/include/python3.11 -c src/_librsyncmodule.c -o /var/tmp/portage/app-backup/rdiff-backup-2.0.5-r1/work/rdiff-backup-2.0.5-python3_11/temp.linux-x86_64-3.11/src/_librsyncmodule.o x86_64-pc-linux-gnu-gcc -Wsign-compare -DNDEBUG -O2 -march=native -fomit-frame-pointer -fPIC -I/usr/include/python3.11 -c src/cmodule.c -o /var/tmp/portage/app-backup/rdiff-backup-2.0.5-r1/work/rdiff-backup-2.0.5-python3_11/temp.linux-x86_64-3.11/src/cmodule.o src/_librsyncmodule.c: In function ‘PyInit__librsync’: src/_librsyncmodule.c:543:36: error: lvalue required as left operand of assignment 543 | Py_TYPE(&_librsync_SigMakerType) = &PyType_Type; | ^ src/_librsyncmodule.c:544:38: error: lvalue required as left operand of assignment 544 | Py_TYPE(&_librsync_DeltaMakerType) = &PyType_Type; | ^ I believe this is due to the changes made in Python 3.11 here: https://github.com/python/cpython/issues/83754 This was fixed for rdiff-backup version 2.2.0 (https://github.com/rdiff-backup/rdiff-backup/pull/655), but the fix is not present in 2.0.5 which is also currently in the Portage tree and was bumped to Python 3.11 about a month ago (https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7ac6fb1e306519048f7d3c8d53473052f946bce). Possible solutions: * remove version 2.0.5 from the portage tree entirely * backport the fix for 2.2.0+ as a patch to 2.0.5 * remove the Python 3.11 target from 2.0.5
Thanks for investigation, I probably forgot to test 2.0+py311 combo (2.2 version are fine). I wanted to give some time to 2.2 in ~arch as it changes quite a few things, the fix itself does not look too large so if tests go fine I will add it to current stable version
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38fd2191f8e4fe49055e5dd4aea3e4815ad114c4 commit 38fd2191f8e4fe49055e5dd4aea3e4815ad114c4 Author: Bernard Cafarelli <voyageur@gentoo.org> AuthorDate: 2023-04-02 18:29:02 +0000 Commit: Bernard Cafarelli <voyageur@gentoo.org> CommitDate: 2023-04-02 18:29:54 +0000 app-backup/rdiff-backup: backport py3.11 support to current stable 2.2 changes a few things, so will move to stable a bit later Closes: https://bugs.gentoo.org/903135 Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org> .../files/rdiff-backup-2.0.5-py311.patch | 42 ++++++++++++++++++++++ .../rdiff-backup/rdiff-backup-2.0.5-r1.ebuild | 1 + 2 files changed, 43 insertions(+)