From 33b5412b7869bba90ffc63fa00da763a64c981a8 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 15 Jul 2024 11:29:29 +0200 Subject: [PATCH] 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 --- package/qt5/qt5webengine/Config.in | 9 ++------- package/qt5/qt5webengine/qt5webengine.mk | 2 -- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/package/qt5/qt5webengine/Config.in b/package/qt5/qt5webengine/Config.in index 57cbe301f0..28786bd2c8 100644 --- a/package/qt5/qt5webengine/Config.in +++ b/package/qt5/qt5webengine/Config.in @@ -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 diff --git a/package/qt5/qt5webengine/qt5webengine.mk b/package/qt5/qt5webengine/qt5webengine.mk index bccd460aa7..529a83df6c 100644 --- a/package/qt5/qt5webengine/qt5webengine.mk +++ b/package/qt5/qt5webengine/qt5webengine.mk @@ -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