package/qt5/qt5webengine: use bundled re2

When we use Buildroot's re2 package to build qt5webengine, there is an
issue at link time as the qt5webengine mistakenly uses the abseil-cpp
headers of its built-in copy rather than the ones of our abseil-cpp
library, built as a dependency of re2. However, we build our
abseil-cpp differently than the one bundled, and that causes some
conflicts.

Since teaching Chromium's build system to not use its own abseil-cpp
headers is an adventure we'd rather not engage into, we fallback to
use the bundled re2.

Therefore, we drop in Config.in all dependencies that were inherited
from Buildroot's re2 package. This warrants a few comments:

- BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS should be dropped because
  the list of architectures supported by our Buildroot abseil-cpp
  package may be different than the set of architectures supported by
  the bundled abseil-cpp in Chromium. In addition, the list of
  architectures in BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS is also a
  very limited subset of BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS, so
  this change will not expose the build of qt5webengine to additional
  architectures.

- We're dropping BR2_TOOLCHAIN_GCC_AT_LEAST_8 because it was inherited
  from re2. The main qt5 package anyway depends on gcc >= 5.x. We will
  figure out thanks to the autobuilders exactly which gcc version is
  needed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Thomas Petazzoni
2024-07-15 11:29:29 +02:00
parent 3c998848b4
commit 33b5412b78
2 changed files with 2 additions and 9 deletions

View File

@@ -9,13 +9,11 @@ config BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS
depends on BR2_PACKAGE_QT5_JSCORE_AVAILABLE # qt5declarative
depends on !BR2_BINFMT_FLAT # qt5base-icu
depends on BR2_USE_MMU # libglib2, qt5base-dbus
depends on BR2_PACKAGE_LIBABSEIL_CPP_ARCH_SUPPORTS # re2
comment "qt5webengine needs udev /dev management and a glibc toolchain w/ gcc >= 8, host gcc >= 4.9, dynamic library, threads, wchar"
comment "qt5webengine needs udev /dev management and a glibc toolchain w/ host gcc >= 4.9, threads, wchar"
depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS
depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_USES_GLIBC || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_8 || \
!BR2_HOST_GCC_AT_LEAST_4_9 || BR2_STATIC_LIBS || \
!BR2_HOST_GCC_AT_LEAST_4_9 || \
!BR2_TOOLCHAIN_HAS_THREADS || !BR2_USE_WCHAR
comment "qt5webengine needs an OpenGL and EGL-capable backend"
@@ -25,10 +23,8 @@ comment "qt5webengine needs an OpenGL and EGL-capable backend"
config BR2_PACKAGE_QT5WEBENGINE
bool "qt5webengine"
depends on BR2_PACKAGE_QT5WEBENGINE_ARCH_SUPPORTS
depends on !BR2_STATIC_LIBS # re2
depends on BR2_TOOLCHAIN_USES_GLIBC # execinfo.h, mallinfo
depends on BR2_HOST_GCC_AT_LEAST_4_9 # qt5base-icu
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_8 # re2
depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2, libvpx, qt5base-dbus
depends on BR2_USE_WCHAR # libglib2
depends on BR2_PACKAGE_QT5_GL_AVAILABLE # qt5declarative, qt5base-eglfs
@@ -50,7 +46,6 @@ config BR2_PACKAGE_QT5WEBENGINE
select BR2_PACKAGE_LIBXSLT
select BR2_PACKAGE_MINIZIP
select BR2_PACKAGE_OPUS
select BR2_PACKAGE_RE2
select BR2_PACKAGE_SNAPPY
select BR2_PACKAGE_WEBP
select BR2_PACKAGE_WEBP_DEMUX

View File

@@ -78,7 +78,6 @@ QT5WEBENGINE_DEPENDENCIES += \
libvpx \
libxml2 \
libxslt \
re2 \
snappy \
webp
@@ -104,7 +103,6 @@ QT5WEBENGINE_CONF_OPTS += \
-feature-webengine-system-ninja \
-feature-webengine-system-nss \
-feature-webengine-system-png \
-feature-webengine-system-re2 \
-feature-webengine-system-snappy \
-feature-webengine-system-zlib