Bug#1057442: onboard ftbfs with Python 3.12
Followup-For: Bug #1057442 X-Debbugs-Cc: tsu.y...@gmail.com Hi Bo, On Wed, 6 Dec 2023 17:31:52 +0800, Bo wrote: > I think it is okay to remove `-Wdeclaration-after-statement` option > which to support Arch linux build from code comment. FYI: I've reported #1064028 against Python3.12 to suggest fixing the cause of this (the non-C90-compliant code in Python3.12 headers). I'm intentionally not making it a blocker here, because other approaches are possible, but am mentioning it for awareness. Regards, James
Bug#1057442: onboard ftbfs with Python 3.12
Hi Boyuan, On Di 30 Jan 2024 15:28:17 CET, Boyuan Yang wrote: X-Debbugs-CC: sunwea...@debian.org tsu.y...@gmail.com gin...@debian.org Hi, On Thu, 11 Jan 2024 08:47:18 +0200 Graham Inggs wrote: There's no _cairo.cpython-312-x86_64-linux-gnu.so in python3-cairo because pycairo no longer builds extensions for all supported Python versions, see #1055488. I just fixed #1055488 via a team upload, though in a somehow ugly way. Can we proceed with the fix for package onboard? I think it is long overdue. Thanks, Boyuan Yang the problem is that onboard never ran its unit tests. It ran some 0 tests which succeeded. Reason is, it did not find its tests. I have a local version that runs all tests and nearly succeeds everywhere, but not yet everywhere. I have been working on fixing onboard on-and-off over the past weeks, but I am not fully there, yet. Mike -- DAS-NETZWERKTEAM c\o Technik- und Ökologiezentrum Eckernförde Mike Gabriel, Marienthaler Str. 17, 24340 Eckernförde mobile: +49 (1520) 1976 148 landline: +49 (4351) 850 8940 GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31 mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de pgpPCUe1e2Pm7.pgp Description: Digitale PGP-Signatur
Bug#1057442: onboard ftbfs with Python 3.12
X-Debbugs-CC: sunwea...@debian.org tsu.y...@gmail.com gin...@debian.org Hi, On Thu, 11 Jan 2024 08:47:18 +0200 Graham Inggs wrote: > There's no _cairo.cpython-312-x86_64-linux-gnu.so in python3-cairo > because pycairo no longer builds extensions for all supported Python > versions, see #1055488. I just fixed #1055488 via a team upload, though in a somehow ugly way. Can we proceed with the fix for package onboard? I think it is long overdue. Thanks, Boyuan Yang signature.asc Description: This is a digitally signed message part
Bug#1057442: onboard ftbfs with Python 3.12
There's no _cairo.cpython-312-x86_64-linux-gnu.so in python3-cairo because pycairo no longer builds extensions for all supported Python versions, see #1055488.
Bug#1057442: onboard ftbfs with Python 3.12
Hi Bo, thanks for proposing a patch... (more: see below). On Mi 06 Dez 2023 10:31:52 CET, Bo YU wrote: Source: onboard Version: 1.4.1-5 Followup-For: Bug #1057442 Tags: patch Dear Maintainer, I think it is okay to remove `-Wdeclaration-after-statement` option which to support Arch linux build from code comment. please notice here also, even if the issue is fixed, the package will be build failed again when running tests: ``` ... dh_auto_test -O--buildsystem=pybuild I: pybuild base:310: cd /<>/.pybuild/cpython3_3.12_onboard/build; python3.12 -m unittest discover -v /<>/.pybuild/cpython3_3.12_onboard/build/Onboard/utils.py:151: SyntaxWarning: invalid escape sequence '\d' """ /<>/.pybuild/cpython3_3.12_onboard/build/Onboard/utils.py:220: SyntaxWarning: invalid escape sequence '\s' pattern = re.compile('>\n\s+([^<>\s].*?)\n\s+/<>/.pybuild/cpython3_3.12_onboard/build/Onboard/utils.py:221: SyntaxWarning: invalid escape sequence '\g' pretty_xml = pattern.sub('>\g<1>/<>/.pybuild/cpython3_3.12_onboard/build/Onboard/utils.py:356: SyntaxWarning: invalid escape sequence '\:' """ /<>/.pybuild/cpython3_3.12_onboard/build/Onboard/utils.py:1542: SyntaxWarning: invalid escape sequence '\w' """(?: Onboard (unittest.loader._FailedTest.Onboard) ... ERROR == ERROR: Onboard (unittest.loader._FailedTest.Onboard) -- ImportError: Failed to import test module: Onboard Traceback (most recent call last): File "/usr/lib/python3.12/unittest/loader.py", line 427, in _find_test_path package = self._get_module_from_name(name) File "/usr/lib/python3.12/unittest/loader.py", line 337, in _get_module_from_name __import__(name) File "/<>/.pybuild/cpython3_3.12_onboard/build/Onboard/__init__.py", line 23, in from Onboard.utils import Translation File "/<>/.pybuild/cpython3_3.12_onboard/build/Onboard/utils.py", line 933, in import cairo File "/usr/lib/python3/dist-packages/cairo/__init__.py", line 1, in from ._cairo import * # noqa: F401,F403 ^ ModuleNotFoundError: No module named 'cairo._cairo' -- Ran 1 test in 0.000s FAILED (errors=1) E: pybuild pybuild:395: test: plugin distutils failed with: exit code=1: cd /<>/.pybuild/cpython3_3.12_onboard/build; python3.12 -m unittest discover -v I: pybuild base:310: cd /<>/.pybuild/cpython3_3.11_onboard/build; python3.11 -m unittest discover -v -- Ran 0 tests in 0.000s OK ``` I do think this is one issue from python-cairo even depend on the latest version[0]. But if look back its buildd log[1] these tests are also not executed correctly. I am not sure how to deal with this and if skip test explicit it willl be okay. [0]: https://tracker.debian.org/news/1483436/accepted-pycairo-1251-1-source-into-unstable/ [1]: https://buildd.debian.org/status/fetch.php?pkg=onboard&arch=amd64&ver=1.4.1-5%2Bb8&stamp=1701806362&raw=0 The underlying cause of the cairo import issue is that /usr/lib/python3/dist-packages/cairo/_cairo.cpython-312-x86_64-linux-gnu.so is not yet contained in python3-cairo. Only the _cairo.cpython-311-x86_64-linux-gnu.so build is in that package. I just pinged the #debian-python IRC channel to check how this could best be fixed (likely via a binNMU). I might assume that other packages could be affected by a missing binNMU... Waiting for IRC feedback... Mike -- mike gabriel aka sunweaver (Debian Developer) mobile: +49 (1520) 1976 148 landline: +49 (4351) 486 14 27 GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22 0782 9AF4 6B30 2577 1B31 mail: sunwea...@debian.org, http://sunweavers.net pgpFDpfVSiuDT.pgp Description: Digitale PGP-Signatur
Bug#1057442: onboard ftbfs with Python 3.12
Source: onboard Version: 1.4.1-5 Followup-For: Bug #1057442 Tags: patch Dear Maintainer, I think it is okay to remove `-Wdeclaration-after-statement` option which to support Arch linux build from code comment. please notice here also, even if the issue is fixed, the package will be build failed again when running tests: ``` ... dh_auto_test -O--buildsystem=pybuild I: pybuild base:310: cd /<>/.pybuild/cpython3_3.12_onboard/build; python3.12 -m unittest discover -v /<>/.pybuild/cpython3_3.12_onboard/build/Onboard/utils.py:151: SyntaxWarning: invalid escape sequence '\d' """ /<>/.pybuild/cpython3_3.12_onboard/build/Onboard/utils.py:220: SyntaxWarning: invalid escape sequence '\s' pattern = re.compile('>\n\s+([^<>\s].*?)\n\s+>/.pybuild/cpython3_3.12_onboard/build/Onboard/utils.py:221: SyntaxWarning: invalid escape sequence '\g' pretty_xml = pattern.sub('>\g<1>>/.pybuild/cpython3_3.12_onboard/build/Onboard/utils.py:356: SyntaxWarning: invalid escape sequence '\:' """ /<>/.pybuild/cpython3_3.12_onboard/build/Onboard/utils.py:1542: SyntaxWarning: invalid escape sequence '\w' """(?: Onboard (unittest.loader._FailedTest.Onboard) ... ERROR == ERROR: Onboard (unittest.loader._FailedTest.Onboard) -- ImportError: Failed to import test module: Onboard Traceback (most recent call last): File "/usr/lib/python3.12/unittest/loader.py", line 427, in _find_test_path package = self._get_module_from_name(name) File "/usr/lib/python3.12/unittest/loader.py", line 337, in _get_module_from_name __import__(name) File "/<>/.pybuild/cpython3_3.12_onboard/build/Onboard/__init__.py", line 23, in from Onboard.utils import Translation File "/<>/.pybuild/cpython3_3.12_onboard/build/Onboard/utils.py", line 933, in import cairo File "/usr/lib/python3/dist-packages/cairo/__init__.py", line 1, in from ._cairo import * # noqa: F401,F403 ^ ModuleNotFoundError: No module named 'cairo._cairo' -- Ran 1 test in 0.000s FAILED (errors=1) E: pybuild pybuild:395: test: plugin distutils failed with: exit code=1: cd /<>/.pybuild/cpython3_3.12_onboard/build; python3.12 -m unittest discover -v I: pybuild base:310: cd /<>/.pybuild/cpython3_3.11_onboard/build; python3.11 -m unittest discover -v -- Ran 0 tests in 0.000s OK ``` I do think this is one issue from python-cairo even depend on the latest version[0]. But if look back its buildd log[1] these tests are also not executed correctly. I am not sure how to deal with this and if skip test explicit it willl be okay. [0]: https://tracker.debian.org/news/1483436/accepted-pycairo-1251-1-source-into-unstable/ [1]: https://buildd.debian.org/status/fetch.php?pkg=onboard&arch=amd64&ver=1.4.1-5%2Bb8&stamp=1701806362&raw=0 -- Regards, -- Bo YU diff -Nru onboard-1.4.1/debian/changelog onboard-1.4.1/debian/changelog --- onboard-1.4.1/debian/changelog 2020-01-09 18:26:40.0 +0800 +++ onboard-1.4.1/debian/changelog 2023-12-06 16:57:59.0 +0800 @@ -1,3 +1,11 @@ +onboard (1.4.1-5.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix ftbfs on python3.12. (Closes: #1057442) + * Add override_dh_auto_test to skip test explicit. + + -- Bo YU Wed, 06 Dec 2023 16:57:59 +0800 + onboard (1.4.1-5) unstable; urgency=medium [ Mike Gabriel ] diff -Nru onboard-1.4.1/debian/patches/1004-fix-ftbfs-python3-12.patch onboard-1.4.1/debian/patches/1004-fix-ftbfs-python3-12.patch --- onboard-1.4.1/debian/patches/1004-fix-ftbfs-python3-12.patch 1970-01-01 07:30:00.0 +0730 +++ onboard-1.4.1/debian/patches/1004-fix-ftbfs-python3-12.patch 2023-12-06 16:57:59.0 +0800 @@ -0,0 +1,17 @@ +Description: Drop Wdeclaration-after-statement + this is for Arch linux from upstream, so not need forward it +Last-Update: 2023-12-06 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/setup.py b/setup.py +@@ -229,8 +229,7 @@ +define_macros = defines, +extra_compile_args = [ +"-Wsign-compare", +- "-Wdeclaration-after-statement", +- "-Werror=declaration-after-statement"], ++ "-Wdeclaration-after-statement"], + +**pkgconfig('gdk-3.0', 'x11', 'xi', 'xtst', 'xkbfile', +'dconf', 'libcanberra', 'hunspell', diff -Nru onboard-1.4.1/debian/patches/series onboard-1.4.1/debian/patches/series --- onboard-1.4.1/debian/patches/series 2020-01-09 18:25:08.0 +0800 +++ onboard-1.4.1/debian/patches/series 2023
Bug#1057442: onboard ftbfs with Python 3.12
Package: src:onboard Version: 1.4.1-5 Severity: serious Tags: sid trixie User: debian-pyt...@lists.debian.org Usertags: python3.12 onboard ftbfs with Python 3.12: [...] creating build creating build/temp.linux-x86_64-cpython-312 creating build/temp.linux-x86_64-cpython-312/Onboard creating build/temp.linux-x86_64-cpython-312/Onboard/osk 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=/<>=. -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); | ^~~ 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); | ^~ Onboard/osk/osk_audio.c: In function ‘osk_audio_init_canberra’: Onboard/osk/osk_audio.c:70:5: warning: ‘gdk_screen_get_number’ is deprecated [-Wdeprecated-declarations] 70 | nr = gdk_screen_get_number(screen); | ^~ In file included from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:31, from /usr/include/gtk-3.0/gdk/gdk.h:32, from /usr/include/gtk-3.0/gdk/gdkx.h:28, from Onboard/osk/osk_audio.c:23: /usr/include/gtk-3.0/gdk/gdkscreen.h:56:14: note: declared here 56 | gint gdk_screen_get_number(GdkScreen *screen); | ^ Onboard/osk/osk_audio.c: In function ‘osk_audio_play’: Onboard/osk/osk_audio.c:101:5: warning: ‘gdk_screen_get_width’ is deprecated [-Wdeprecated-declarations] 101 | sw = gdk_screen_get_width(screen); | ^~ /usr/include/gtk-3.0/gdk/gdkscreen.h:58:14: note: declared here 58 | gint gdk_screen_get_width (GdkScreen *screen); | ^~~~ Onboard/osk/osk_audio.c:102:5: warning: ‘gdk_screen_get_height’ is deprecated [-Wdeprecated-declarations] 102 | sh = gdk_screen_get_height(screen); | ^~ /usr/include/gtk-3.0/gdk/gdkscreen.h:60:14: note: declared here 60 | gint gdk_screen_get_height(GdkScreen *screen); | ^ cc1: some warnings being treated as errors error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1 E: pybuild pybuild:395: build: plugin distutils failed with: exit code=1: /usr/bin/python3.12 setup.py build I: pybuild base:310: /usr/bin/python3 setup.py build