Example: In file included from /usr/include/python3.12/Python.h:44, from ../../source4/param/provision.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); | ^~~~~~~~~~~ Will open MR soon.
As this seems to be a Python bug, is there a Python PR for this?
(In reply to Ralph Böhme from comment #1) According to a CPython developer, C99 is required to build or include Python headers: https://github.com/python/cpython/issues/73401#issuecomment-1093736945 I suppose giving up “-Werror=declaration-after-statement” altogether is out of the question?
(In reply to Joseph Sutton from comment #2) > I suppose giving up “-Werror=declaration-after-statement” altogether is out > of the question? If that gets us along with latest python, we should drop that. Maybe it's time to conclude the last millenium C-feature-wise...
I've added a -Wno-error=declaration-after-statement to all the python C files we build. We can also just drop it.
This bug was referenced in samba master: f337fd995024283f6e1b3f8ec1cc2b3aeb55a2a6 9621a3d7a6949aa833425884cd22379387738cfa c290052fd28bbfa5b885119f322cb0718073e507 362b0d69b16c5bbcd0ff7dd7ba12e1ac037a6b3d 938afb8b28973b0065cc3509b70ebe3f6986de47
Created attachment 18191 [details] patch for 4.19
Comment on attachment 18191 [details] patch for 4.19 LGTM, RB+ and thanks!
Jule, please add to v4.19, thanks!
Pushed to autobuild-v4-19-test.
This bug was referenced in samba v4-19-test: 2feaa755e25a980cd00ee24612917d9f6f96f3bc ec5885982af6ad9d2b7330f199ddc29ed1678554 ec4893eea9cd7ee1490487b11789b1987eaf7534 2f5a1ac1c964ca509aa531ad3fefa151a8666ce2 b6c13c49153a4de962f14fd03537eb8afe9c8961
Closing out bug report. Thanks!
This bug was referenced in samba v4-19-stable (Release samba-4.19.3): 2feaa755e25a980cd00ee24612917d9f6f96f3bc ec5885982af6ad9d2b7330f199ddc29ed1678554 ec4893eea9cd7ee1490487b11789b1987eaf7534 2f5a1ac1c964ca509aa531ad3fefa151a8666ce2 b6c13c49153a4de962f14fd03537eb8afe9c8961
This bug was referenced in samba master: f28966c1638806a5af1fa4e451b668af638491ce 5032ab712c6e9d6562cd10b1d840d2ee052d1d16 0ba05d5bbb1788b0b8cee26748bcda0c90c48baa ec91204387bd7f5c5a8d8df8534c6ca59b491ac5
This bug was referenced in samba v4-20-test: f28966c1638806a5af1fa4e451b668af638491ce 5032ab712c6e9d6562cd10b1d840d2ee052d1d16 0ba05d5bbb1788b0b8cee26748bcda0c90c48baa ec91204387bd7f5c5a8d8df8534c6ca59b491ac5
This bug was referenced in samba v4-20-stable (Release samba-4.20.0rc1): f28966c1638806a5af1fa4e451b668af638491ce 5032ab712c6e9d6562cd10b1d840d2ee052d1d16 0ba05d5bbb1788b0b8cee26748bcda0c90c48baa ec91204387bd7f5c5a8d8df8534c6ca59b491ac5