Bug#1064028: libpython3.12-dev: non-C90 headerfile code breaks -Werror=declaration-after-statement

2024-03-19 Thread James Addison
Followup-For: Bug #1064028
Control: tags -1 fixed-upstream
Control: forwarded -1 https://github.com/python/cpython/issues/116869 
https://github.com/python/cpython/pull/117011



Bug#1064028: libpython3.12-dev: non-C90 headerfile code breaks -Werror=declaration-after-statement

2024-03-15 Thread James Addison
Followup-For: Bug #1064028
X-Debbugs-Cc: d...@debian.org
Control: forwarded -1 https://github.com/python/cpython/issues/116869

It seemed worth forwarding this bugreport upstream, since it may be a quick fix
there (initially I felt that it may be worth handling in Debian initially and
then forwarding; perhaps not, though).  Alternatively we may learn that C90 is
no-longer a code style baseline for cpython, and in that case we can adjust
accordingly.



Bug#1064028: libpython3.12-dev: non-C90 headerfile code breaks -Werror=declaration-after-statement

2024-03-15 Thread James Addison
Package: libpython3.12-dev
Followup-For: Bug #1064028
X-Debbugs-Cc: d...@debian.org
Control: reopen -1
Control: found -1 3.12.1-2

Hello,

On Sun, 3 Mar 2024 10:35:42 +0100, Matthias wrote:
> That was fixed in the upstream 3.12.2 release.

The problem does not appear to be resolved; building onboard/1.4.1-5 using
the headerfiles from libpython3.12-dev/3.12.2-1 continues to fail.


  x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 
-Wall -g -fstack-protector-strong -fstack-clash-protection -Wformat 
-Werror=format-security -fcf-protection -g -fwrapv -O2 -g -O2 
-ffile-prefix-map=/root/onboard-1.4.1=. 
-specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong 
-fstack-clash-protection -Wformat -Werror=format-security -fcf-protection 
-Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DMAJOR_VERSION=0 -DMINOR_VERSION=4 
-DMICRO_VERSION=0 -I/usr/include/blkid -I/usr/include/cairo 
-I/usr/include/cloudproviders -I/usr/include/dconf -I/usr/include/freetype2 
-I/usr/include/fribidi -I/usr/include/gdk-pixbuf-2.0 
-I/usr/include/gio-unix-2.0 -I/usr/include/glib-2.0 -I/usr/include/gtk-3.0 
-I/usr/include/harfbuzz -I/usr/include/hunspell -I/usr/include/libmount 
-I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/pixman-1 
-I/usr/include/webp -I/usr/include/x86_64-linux-gnu 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/python3.12 -c 
Onboard/osk/osk_audio.c -o 
build/temp.linux-x86_64-cpython-312/Onboard/osk/osk_audio.o -Wsign-compare 
-Wdeclaration-after-statement -Werror=declaration-after-statement
  In file included from /usr/include/python3.12/Python.h:44,
   from Onboard/osk/osk_module.h:25,
   from Onboard/osk/osk_audio.c:21:
  /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);
| ^~~


Thanks,
James


Bug#1064028: libpython3.12-dev: non-C90 headerfile code breaks -Werror=declaration-after-statement

2024-02-15 Thread James Addison
Package: libpython3.12-dev
Version: 3.12.1-2
Severity: minor
Tags: upstream newcomer

Dear Maintainer,

Some of the C code contained within the headerfiles from libpython3.12-dev
appears not to be compliant with C90 standards (examples: [1][2]).

This contributed to a build failure[3] for the onboard/1.4.1-5 package that is
currently part of the python3.12-add[4] transition.

Upstream has continued to accept pull requests / patches to update their code
to remain C90 compliant over the past few years (example: [5]).

Although I'm not initially attaching a patch here, I hope to do so within the
next week, unless someone else writes one before I do.

Regards,
James

[1] - https://sources.debian.org/src/python3.12/3.12.2-1/Include/Python.h/

[2] - 
https://sources.debian.org/src/python3.12/3.12.2-1/Include/cpython/longintrepr.h/

[3] - 
https://buildd.debian.org/status/fetch.php?pkg=onboard=amd64=1.4.1-5%2Bb8=1706626636=0

[4] - https://release.debian.org/transitions/html/python3.12-add.html

[5] - https://github.com/python/cpython/pull/92783