Skip to contentSkip to conversation

package/qt5/qt5webengine: fix build with Bison 3.7

PATCH New Thomas Petazzoni 3 participants 3 messages Sep 16, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/qt5/qt5webengine: fix build with Bison 3.7

Add patch from upstream that fixes build with Bison 3.7.

There are no autobuilder failures for this issue, but the following defconfig:

BR2_arm=y
BR2_cortex_a8=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_NONE=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_SYSTEM_BIN_SH_NONE=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5WEBENGINE=y
BR2_PACKAGE_RPI_USERLAND=y

Failed with:

/home/thomas/buildroot/buildroot/output/build/qt5webengine-5.15.0/src/core/release/gen/third_party/blink/renderer/core/xpath_grammar.cc:124:10: fatal error: xpath_grammar.hh: No such file or directory
124 | #include "xpath_grammar.hh"

      |          ^~~~~~~~~~~~~~~~~~

compilation terminated.

With this patch applied, it builds fine.

---
 .../qt5/qt5webengine/0002-fix-bison-3.7.patch | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 package/qt5/qt5webengine/0002-fix-bison-3.7.patch
package/qt5/qt5webengine/0002-fix-bison-3.7.patch new file +55 -0
new file mode 100644
index 0000000000..575fe27b1b
@@ -0,0 +1,55 @@
+From 1a53f5995697f5ac6fd501dbdc0ee39c9488ee66 Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <[email protected]>
+Date: Fri, 14 Aug 2020 16:38:48 +0200
+Subject: Fix bison 3.7
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Do a replace run inspired by newer versions of the script.
+
+Fixes: QTBUG-86018
+Change-Id: Ib1dc771e22a662aff0fae842d135ad58fad08bc1
+Reviewed-by: Michael Br?ning <[email protected]>
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ .../blink/renderer/build/scripts/rule_bison.py        | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/chromium/third_party/blink/renderer/build/scripts/rule_bison.py b/chromium/third_party/blink/renderer/build/scripts/rule_bison.py
+index f75e25fd23f..7e0767e951a 100755
+--- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py
++++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py
+@@ -45,6 +45,19 @@ from utilities import abs
+ 
+ from blinkbuild.name_style_converter import NameStyleConverter
+ 
++def modify_file(path, prefix_lines, suffix_lines, replace_list=[]):
++    prefix_lines = map(lambda s: s + '\n', prefix_lines)
++    suffix_lines = map(lambda s: s + '\n', suffix_lines)
++    with open(path, 'r') as f:
++        old_lines = f.readlines()
++    for i in range(len(old_lines)):
++        for src, dest in replace_list:
++            old_lines[i] = old_lines[i].replace(src, dest)
++    new_lines = prefix_lines + old_lines + suffix_lines
++    with open(path, 'w') as f:
++        f.writelines(new_lines)
++
++
+ assert len(sys.argv) == 4 or len(sys.argv) == 5
+ 
+ inputFile = abs(sys.argv[1])
+@@ -115,3 +128,9 @@ print >>outputHFile, '#define %s' % headerGuard
+ print >>outputHFile, outputHContents
+ print >>outputHFile, '#endif  // %s' % headerGuard
+ outputHFile.close()
++
++common_replace_list = [(inputRoot + '.hh',
++                        inputRoot + '.h')]
++modify_file(
++    outputCpp, [], [],
++    replace_list=common_replace_list)
+-- 
+cgit v1.2.1
+
Signature · 1 line
2.26.2
#1 lore raw

PATCH 1/1 package/qt5/qt5webengine: fix build with Bison 3.7

Hello Thomas,

Quoted 39 lines · Thomas Petazzoni

Add patch from upstream that fixes build with Bison 3.7.

There are no autobuilder failures for this issue, but the following defconfig:

BR2_arm=y
BR2_cortex_a8=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_NONE=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_SYSTEM_BIN_SH_NONE=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5WEBENGINE=y
BR2_PACKAGE_RPI_USERLAND=y

Failed with:

/home/thomas/buildroot/buildroot/output/build/qt5webengine-5.15.0/src/core/release/gen/third_party/blink/renderer/core/xpath_grammar.cc:124:10: fatal error: xpath_grammar.hh: No such file or directory
124 | #include "xpath_grammar.hh"

      |          ^~~~~~~~~~~~~~~~~~

compilation terminated.

With this patch applied, it builds fine.

---
 .../qt5/qt5webengine/0002-fix-bison-3.7.patch | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 package/qt5/qt5webengine/0002-fix-bison-3.7.patch
package/qt5/qt5webengine/0002-fix-bison-3.7.patch new file +3 -0
new file mode 100644
index 0000000000..575fe27b1b
@@ -0,0 +1,55 @@
+From 1a53f5995697f5ac6fd501dbdc0ee39c9488ee66 Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <[email protected]>
+Date: Fri, 14 Aug 2020 16:38:48 +0200

package/qt5/qt5webengine/0002-fix-bison-3.7.patch line 13

Quoted 10 lines
package/qt5/qt5webengine/0002-fix-bison-3.7.patch new file +10 -0
+Subject: Fix bison 3.7
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Do a replace run inspired by newer versions of the script.
+
+Fixes: QTBUG-86018
+Change-Id: Ib1dc771e22a662aff0fae842d135ad58fad08bc1
+Reviewed-by: Michael Br?ning <[email protected]>

[Upstream: https://code.qt.io/cgit/qt/qtwebengine-chromium.git/commit/?h=80-based&id=1a53f5995697f5ac6fd501dbdc0ee39c9488ee66]

Regards,
Peter

Quoted 42 lines
package/qt5/qt5webengine/0002-fix-bison-3.7.patch new file +42 -0
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ .../blink/renderer/build/scripts/rule_bison.py        | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/chromium/third_party/blink/renderer/build/scripts/rule_bison.py b/chromium/third_party/blink/renderer/build/scripts/rule_bison.py
+index f75e25fd23f..7e0767e951a 100755
+--- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py
++++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py
+@@ -45,6 +45,19 @@ from utilities import abs
+ 
+ from blinkbuild.name_style_converter import NameStyleConverter
+ 
++def modify_file(path, prefix_lines, suffix_lines, replace_list=[]):
++    prefix_lines = map(lambda s: s + '\n', prefix_lines)
++    suffix_lines = map(lambda s: s + '\n', suffix_lines)
++    with open(path, 'r') as f:
++        old_lines = f.readlines()
++    for i in range(len(old_lines)):
++        for src, dest in replace_list:
++            old_lines[i] = old_lines[i].replace(src, dest)
++    new_lines = prefix_lines + old_lines + suffix_lines
++    with open(path, 'w') as f:
++        f.writelines(new_lines)
++
++
+ assert len(sys.argv) == 4 or len(sys.argv) == 5
+ 
+ inputFile = abs(sys.argv[1])
+@@ -115,3 +128,9 @@ print >>outputHFile, '#define %s' % headerGuard
+ print >>outputHFile, outputHContents
+ print >>outputHFile, '#endif  // %s' % headerGuard
+ outputHFile.close()
++
++common_replace_list = [(inputRoot + '.hh',
++                        inputRoot + '.h')]
++modify_file(
++    outputCpp, [], [],
++    replace_list=common_replace_list)
+-- 
+cgit v1.2.1
+
#2 lore raw

PATCH 1/1 package/qt5/qt5webengine: fix build with Bison 3.7

In reply to Thomas Petazzoni

Thomas, All,

On 2020-09-16 14:13 +0200, Thomas Petazzoni spake thusly:

Quoted 17 lines

Add patch from upstream that fixes build with Bison 3.7.

There are no autobuilder failures for this issue, but the following defconfig:

BR2_arm=y
BR2_cortex_a8=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_NONE=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_SYSTEM_BIN_SH_NONE=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5WEBENGINE=y
BR2_PACKAGE_RPI_USERLAND=y

Failed with:

Quoted 8 lines

/home/thomas/buildroot/buildroot/output/build/qt5webengine-5.15.0/src/core/release/gen/third_party/blink/renderer/core/xpath_grammar.cc:124:10: fatal error: xpath_grammar.hh: No such file or directory
124 | #include "xpath_grammar.hh"

      |          ^~~~~~~~~~~~~~~~~~

compilation terminated.

With this patch applied, it builds fine.

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 73 lines
---
 .../qt5/qt5webengine/0002-fix-bison-3.7.patch | 55 +++++++++++++++++++
 1 file changed, 55 insertions(+)
 create mode 100644 package/qt5/qt5webengine/0002-fix-bison-3.7.patch
package/qt5/qt5webengine/0002-fix-bison-3.7.patch new file +55 -0
new file mode 100644
index 0000000000..575fe27b1b
@@ -0,0 +1,55 @@
+From 1a53f5995697f5ac6fd501dbdc0ee39c9488ee66 Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <[email protected]>
+Date: Fri, 14 Aug 2020 16:38:48 +0200
+Subject: Fix bison 3.7
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Do a replace run inspired by newer versions of the script.
+
+Fixes: QTBUG-86018
+Change-Id: Ib1dc771e22a662aff0fae842d135ad58fad08bc1
+Reviewed-by: Michael Br?ning <[email protected]>
+Signed-off-by: Thomas Petazzoni <[email protected]>
+---
+ .../blink/renderer/build/scripts/rule_bison.py        | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/chromium/third_party/blink/renderer/build/scripts/rule_bison.py b/chromium/third_party/blink/renderer/build/scripts/rule_bison.py
+index f75e25fd23f..7e0767e951a 100755
+--- a/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py
++++ b/src/3rdparty/chromium/third_party/blink/renderer/build/scripts/rule_bison.py
+@@ -45,6 +45,19 @@ from utilities import abs
+ 
+ from blinkbuild.name_style_converter import NameStyleConverter
+ 
++def modify_file(path, prefix_lines, suffix_lines, replace_list=[]):
++    prefix_lines = map(lambda s: s + '\n', prefix_lines)
++    suffix_lines = map(lambda s: s + '\n', suffix_lines)
++    with open(path, 'r') as f:
++        old_lines = f.readlines()
++    for i in range(len(old_lines)):
++        for src, dest in replace_list:
++            old_lines[i] = old_lines[i].replace(src, dest)
++    new_lines = prefix_lines + old_lines + suffix_lines
++    with open(path, 'w') as f:
++        f.writelines(new_lines)
++
++
+ assert len(sys.argv) == 4 or len(sys.argv) == 5
+ 
+ inputFile = abs(sys.argv[1])
+@@ -115,3 +128,9 @@ print >>outputHFile, '#define %s' % headerGuard
+ print >>outputHFile, outputHContents
+ print >>outputHFile, '#endif  // %s' % headerGuard
+ outputHFile.close()
++
++common_replace_list = [(inputRoot + '.hh',
++                        inputRoot + '.h')]
++modify_file(
++    outputCpp, [], [],
++    replace_list=common_replace_list)
+-- 
+cgit v1.2.1
+
Signature · 6 lines
2.26.2

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'