* [Buildroot] [PATCH 1/1] package/qt5webengine-chromium: fix python3.11 build errors
@ 2023-10-25 20:52 Kadir Yilmaz
2024-06-06 9:46 ` Yann E. MORIN
2024-07-15 10:18 ` Thomas Petazzoni via buildroot
0 siblings, 2 replies; 3+ messages in thread
From: Kadir Yilmaz @ 2023-10-25 20:52 UTC (permalink / raw)
To: buildroot; +Cc: Giulio Benetti, Kadir Yilmaz, Julien Corjon
qt5webengine fails to build due to changes introduced in python3.11:
- [864/23192] ACTION //services/metrics/public/cpp:gen_ukm_builders(/ho
me/vagrant/output_raspberrypi3_qt5we/build/qt5webengine-5.15.8/src/to
olchain:target)
...
re.error: global flags not at the start of the expression at position 1
https://docs.python.org/3.11/library/re.html
(?aiLmsux)
Changed in version 3.11: This construction can only be used at the
start of the expression.
- [3742/22323] ACTION //chrome/app:chromium_strings_grit(/home/vagrant/
output_raspberrypi3_qt5we/build/qt5webengine-5.15.8/src/toolchain:tar
get)
...
ValueError: invalid mode: 'rU'
open(), io.open(), codecs.open() and fileinput.FileInput no longer
accept 'U' (“universal newline”) in the file mode. In Python 3,
“universal newline” mode is used by default whenever a file is
opened in text mode, and the 'U' flag has been deprecated since
Python 3.3. The newline parameter to these functions controls how
universal newlines work. (Contributed by Victor Stinner in bpo-37330.)
Signed-off-by: Kadir Yilmaz <kadir.c.yilmaz@gmail.com>
---
...x-build-tools-to-run-with-python3.11.patch | 72 +++++++++++++++++++
1 file changed, 72 insertions(+)
create mode 100644 package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch
diff --git a/package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch b/package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch
new file mode 100644
index 0000000000..44c8337f80
--- /dev/null
+++ b/package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch
@@ -0,0 +1,72 @@
+From 82c9b1d3f4383cd8059690bd34c9d7fa86398b78 Mon Sep 17 00:00:00 2001
+From: Kadir Yilmaz <kadir.c.yilmaz@gmail.com>
+Date: Sat, 21 Oct 2023 22:45:03 +0200
+Subject: [PATCH] Fix build tools to run with python3.11
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Upstream: N/A buildroot uses python3.11 which apparently is not yet
+supported by upstream
+
+- re error: global flags not at the start
+
+ https://docs.python.org/3/library/re.html#re-syntax
+ (?aiLmsux)
+ ....
+ Changed in version 3.11: This construction can only be used at the
+ start of the expression
+
+- ValueError: invalid mode: 'rU'
+
+ open(), io.open(), codecs.open() and fileinput.FileInput no longer
+ accept 'U' (“universal newline”) in the file mode. In Python 3,
+ “universal newline” mode is used by default whenever a file is
+ opened in text mode, and the 'U' flag has been deprecated since
+ Python 3.3. The newline parameter to these functions controls how
+ universal newlines work. (Contributed by Victor Stinner in bpo-37330.)
+
+Signed-off-by: Kadir Yilmaz <kadir.c.yilmaz@gmail.com>
+---
+ chromium/tools/grit/grit/util.py | 2 +-
+ chromium/tools/metrics/ukm/ukm_model.py | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/chromium/tools/grit/grit/util.py b/chromium/tools/grit/grit/util.py
+index 528d766ad6b..6e8cdb0ebfa 100644
+--- a/chromium/tools/grit/grit/util.py
++++ b/chromium/tools/grit/grit/util.py
+@@ -211,7 +211,7 @@ def ReadFile(filename, encoding):
+ mode = 'rb'
+ encoding = None
+ else:
+- mode = 'rU'
++ mode = 'r'
+
+ with io.open(abs(filename), mode, encoding=encoding) as f:
+ return f.read()
+diff --git a/chromium/tools/metrics/ukm/ukm_model.py b/chromium/tools/metrics/ukm/ukm_model.py
+index ec24dd57360..57decab3ccc 100644
+--- a/chromium/tools/metrics/ukm/ukm_model.py
++++ b/chromium/tools/metrics/ukm/ukm_model.py
+@@ -42,7 +42,7 @@ _INDEX_TYPE = models.ObjectNodeType(
+ _STATISTICS_TYPE = models.ObjectNodeType(
+ 'statistics',
+ attributes=[
+- ('export', str, r'^(?i)(|true|false)$'),
++ ('export', str, r'(?i)^(|true|false)$'),
+ ],
+ children=[
+ models.ChildType(_QUANTILES_TYPE.tag, _QUANTILES_TYPE, multiple=False),
+@@ -94,7 +94,7 @@ _EVENT_TYPE = models.ObjectNodeType(
+ 'event',
+ attributes=[
+ ('name', str, r'^[A-Za-z0-9.]+$'),
+- ('singular', str, r'^(?i)(|true|false)$'),
++ ('singular', str, r'(?i)^(|true|false)$'),
+ ],
+ alphabetization=[
+ (_OBSOLETE_TYPE.tag, _KEEP_ORDER),
+--
+2.25.1
+
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/qt5webengine-chromium: fix python3.11 build errors
2023-10-25 20:52 [Buildroot] [PATCH 1/1] package/qt5webengine-chromium: fix python3.11 build errors Kadir Yilmaz
@ 2024-06-06 9:46 ` Yann E. MORIN
2024-07-15 10:18 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2024-06-06 9:46 UTC (permalink / raw)
To: Kadir Yilmaz; +Cc: Giulio Benetti, James Hilliard, buildroot
Kadir, All,
Thank you for your patch; sorry to chime in so late...
+James, who added the package in the first place
On 2023-10-25 22:52 +0200, Kadir Yilmaz spake thusly:
> qt5webengine fails to build due to changes introduced in python3.11:
[--SNIP--]
> diff --git a/package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch b/package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch
> new file mode 100644
> index 0000000000..44c8337f80
> --- /dev/null
> +++ b/package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch
> @@ -0,0 +1,72 @@
> +From 82c9b1d3f4383cd8059690bd34c9d7fa86398b78 Mon Sep 17 00:00:00 2001
> +From: Kadir Yilmaz <kadir.c.yilmaz@gmail.com>
> +Date: Sat, 21 Oct 2023 22:45:03 +0200
> +Subject: [PATCH] Fix build tools to run with python3.11
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +Upstream: N/A buildroot uses python3.11 which apparently is not yet
> +supported by upstream
Even then, the documentation for python since 3.6 [0] and until 3.10 [1]
also states:
(?aiLmsux)
[...] Flags should be used first in the expression string.
So, in python 3.11 they just are now enforcing the rule, while
previously the construct was (silently?) accepted.
You should still try and send that patch upstream.
[0] https://docs.python.org/3.6/library/re.html
[1] https://docs.python.org/3.10/library/re.html
Regards,
Yann E. MORIN.
> +- re error: global flags not at the start
> +
> + https://docs.python.org/3/library/re.html#re-syntax
> + (?aiLmsux)
> + ....
> + Changed in version 3.11: This construction can only be used at the
> + start of the expression
> +
> +- ValueError: invalid mode: 'rU'
> +
> + open(), io.open(), codecs.open() and fileinput.FileInput no longer
> + accept 'U' (“universal newline”) in the file mode. In Python 3,
> + “universal newline” mode is used by default whenever a file is
> + opened in text mode, and the 'U' flag has been deprecated since
> + Python 3.3. The newline parameter to these functions controls how
> + universal newlines work. (Contributed by Victor Stinner in bpo-37330.)
> +
> +Signed-off-by: Kadir Yilmaz <kadir.c.yilmaz@gmail.com>
> +---
> + chromium/tools/grit/grit/util.py | 2 +-
> + chromium/tools/metrics/ukm/ukm_model.py | 4 ++--
> + 2 files changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/chromium/tools/grit/grit/util.py b/chromium/tools/grit/grit/util.py
> +index 528d766ad6b..6e8cdb0ebfa 100644
> +--- a/chromium/tools/grit/grit/util.py
> ++++ b/chromium/tools/grit/grit/util.py
> +@@ -211,7 +211,7 @@ def ReadFile(filename, encoding):
> + mode = 'rb'
> + encoding = None
> + else:
> +- mode = 'rU'
> ++ mode = 'r'
> +
> + with io.open(abs(filename), mode, encoding=encoding) as f:
> + return f.read()
> +diff --git a/chromium/tools/metrics/ukm/ukm_model.py b/chromium/tools/metrics/ukm/ukm_model.py
> +index ec24dd57360..57decab3ccc 100644
> +--- a/chromium/tools/metrics/ukm/ukm_model.py
> ++++ b/chromium/tools/metrics/ukm/ukm_model.py
> +@@ -42,7 +42,7 @@ _INDEX_TYPE = models.ObjectNodeType(
> + _STATISTICS_TYPE = models.ObjectNodeType(
> + 'statistics',
> + attributes=[
> +- ('export', str, r'^(?i)(|true|false)$'),
> ++ ('export', str, r'(?i)^(|true|false)$'),
> + ],
> + children=[
> + models.ChildType(_QUANTILES_TYPE.tag, _QUANTILES_TYPE, multiple=False),
> +@@ -94,7 +94,7 @@ _EVENT_TYPE = models.ObjectNodeType(
> + 'event',
> + attributes=[
> + ('name', str, r'^[A-Za-z0-9.]+$'),
> +- ('singular', str, r'^(?i)(|true|false)$'),
> ++ ('singular', str, r'(?i)^(|true|false)$'),
> + ],
> + alphabetization=[
> + (_OBSOLETE_TYPE.tag, _KEEP_ORDER),
> +--
> +2.25.1
> +
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/qt5webengine-chromium: fix python3.11 build errors
2023-10-25 20:52 [Buildroot] [PATCH 1/1] package/qt5webengine-chromium: fix python3.11 build errors Kadir Yilmaz
2024-06-06 9:46 ` Yann E. MORIN
@ 2024-07-15 10:18 ` Thomas Petazzoni via buildroot
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-07-15 10:18 UTC (permalink / raw)
To: Kadir Yilmaz; +Cc: Giulio Benetti, Julien Corjon, buildroot
Hello Kadir,
On Wed, 25 Oct 2023 22:52:33 +0200
Kadir Yilmaz <kadir.c.yilmaz@gmail.com> wrote:
> qt5webengine fails to build due to changes introduced in python3.11:
>
> - [864/23192] ACTION //services/metrics/public/cpp:gen_ukm_builders(/ho
> me/vagrant/output_raspberrypi3_qt5we/build/qt5webengine-5.15.8/src/to
> olchain:target)
> ...
> re.error: global flags not at the start of the expression at position 1
>
> https://docs.python.org/3.11/library/re.html
> (?aiLmsux)
> Changed in version 3.11: This construction can only be used at the
> start of the expression.
>
> - [3742/22323] ACTION //chrome/app:chromium_strings_grit(/home/vagrant/
> output_raspberrypi3_qt5we/build/qt5webengine-5.15.8/src/toolchain:tar
> get)
> ...
> ValueError: invalid mode: 'rU'
>
> open(), io.open(), codecs.open() and fileinput.FileInput no longer
> accept 'U' (“universal newline”) in the file mode. In Python 3,
> “universal newline” mode is used by default whenever a file is
> opened in text mode, and the 'U' flag has been deprecated since
> Python 3.3. The newline parameter to these functions controls how
> universal newlines work. (Contributed by Victor Stinner in bpo-37330.)
>
> Signed-off-by: Kadir Yilmaz <kadir.c.yilmaz@gmail.com>
> ---
> ...x-build-tools-to-run-with-python3.11.patch | 72 +++++++++++++++++++
> 1 file changed, 72 insertions(+)
> create mode 100644 package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch
So I did not really apply your patch as-is, because instead I
backported fixes from Chromium upstream instead. As said in another
patch, I just pushed 13 commits that fix a number of things in
qt5webengine, and that allow a successful build of this configuration:
BR2_aarch64=y
BR2_ARM_FPU_VFPV3D16=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_MESA3D=y
BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
BR2_PACKAGE_MESA3D_OPENGL_EGL=y
BR2_PACKAGE_MESA3D_OPENGL_ES=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5WEBENGINE=y
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-07-15 10:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-25 20:52 [Buildroot] [PATCH 1/1] package/qt5webengine-chromium: fix python3.11 build errors Kadir Yilmaz
2024-06-06 9:46 ` Yann E. MORIN
2024-07-15 10:18 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox