Bug#1062048: xen: FTBFS with Python 3.12 as default

2024-01-31 Thread Maximilian Engelhardt
Control: tags -1 +fixed-upstream

Hi,

this issue has been fixed upstream by
https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=40be6307ec005539635e7b8fcef67e989dc441f6

and was backported to the upstream stable-4.17 branch in
https://xenbits.xen.org/gitweb/?p=xen.git;a=commit;h=4000522008711b1329a7cbb24612dfc355f3e46c

We will include the fix in the next upload.

signature.asc
Description: This is a digitally signed message part.


Bug#1062048: xen: FTBFS with Python 3.12 as default

2024-01-30 Thread Graham Inggs
Source: xen
Version: 4.17.2+76-ge1f9cb16e2-1
Severity: serious
Tags: ftbfs patch
User: debian-pyt...@lists.debian.org
Usertags: python3.12

Hi Maintainer

xen FTBFS with Python 3.12 as the default version (i.e. with
python3-defaults/3.12.1-1 from experimental).  I've copied what I hope
is the relevant part of the log below.

I was able to work around this by:

-PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS)
+PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS) -Wno-error=declaration-after-statement

in tools/python/Makefile and tools/pygrub/Makefile.

Regards
Graham


/usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py:66:
SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!



Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.

See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html
for details.



!!
  self.initialize_options()
In file included from /usr/include/python3.12/Python.h:44,
 from xen/lowlevel/xc/xc.c:8:
/usr/include/python3.12/object.h: In function ‘Py_SIZE’:
/usr/include/python3.12/object.h:233:5: error: ISO C90 forbids mixed
declarations and code [-Werror=declaration-after-statement]
  233 | PyVarObject *var_ob = _PyVarObject_CAST(ob);
  | ^~~
In file included from /usr/include/python3.12/Python.h:53:
/usr/include/python3.12/cpython/longintrepr.h: In function
‘_PyLong_CompactValue’:
/usr/include/python3.12/cpython/longintrepr.h:121:5: error: ISO C90
forbids mixed declarations and code
[-Werror=declaration-after-statement]
  121 | Py_ssize_t sign = 1 - (op->long_value.lv_tag & _PyLong_SIGN_MASK);
  | ^~
cc1: all warnings being treated as errors
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1