Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qt6: enable clang builds #21843

Merged
merged 9 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions recipes/qt/6.x.x/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,46 @@ patches:
- "base_path": "qtwebengine"
"patch_description": "Workaround for too long .rps file name"
"patch_file": "patches/c72097e_6.6.0.diff"
ericLemanissier marked this conversation as resolved.
Show resolved Hide resolved
"patch_type": "bugfix"
"patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172"
- "base_path": "qtbase"
"patch_description": "Fix build error with lambda on GCC 9.2"
"patch_file": "patches/32fa63f.patch"
"patch_type": "bugfix"
"patch_source": "https://bugreports.qt.io/browse/QTBUG-112920"
"6.6.0":
- "base_path": "qtwebengine"
"patch_description": "Workaround for too long .rps file name"
"patch_file": "patches/c72097e_6.6.0.diff"
"patch_type": "bugfix"
"patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172"
- "base_path": "qtbase"
"patch_description": "Fix build error with lambda on GCC 9.2"
"patch_file": "patches/32fa63f.patch"
"patch_type": "bugfix"
"patch_source": "https://bugreports.qt.io/browse/QTBUG-112920"
"6.5.3":
- "base_path": "qtwebengine"
"patch_description": "Workaround for too long .rps file name"
"patch_file": "patches/c72097e.diff"
"patch_type": "bugfix"
"patch_source": "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172"
- "base_path": "qtbase"
"patch_description": "Fix build error with lambda on GCC 9.2"
"patch_file": "patches/32fa63f_6.5.0.patch"
"patch_type": "bugfix"
"patch_source": "https://bugreports.qt.io/browse/QTBUG-112920"
"6.4.2":
- base_path: "qtbase/cmake"
patch_description: "Fix pri helpers"
patch_file: "patches/qt6-pri-helpers-fix.diff"
patch_type: "bugfix"
patch_source: "https://bugreports.qt.io/browse/QTBUG-95569"
- patch_file: "patches/c72097e.diff"
base_path: "qtwebengine"
patch_description: "Workaround for too long .rps file name"
patch_type: "bugfix"
patch_source: "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172"
- patch_file: "patches/d13958d.diff"
base_path: "qtbase"
patch_description: "Fix PCRE2 detection"
Expand All @@ -91,9 +116,13 @@ patches:
- base_path: "qtbase/cmake"
patch_description: "Fix pri helpers"
patch_file: "patches/qt6-pri-helpers-fix.diff"
patch_type: "bugfix"
patch_source: "https://bugreports.qt.io/browse/QTBUG-95569"
- patch_file: "patches/c72097e.diff"
base_path: "qtwebengine"
patch_description: "Workaround for too long .rps file name"
patch_type: "bugfix"
patch_source: "https://codereview.qt-project.org/c/yocto/meta-qt5/+/192172"
- patch_file: "patches/d13958d.diff"
base_path: "qtbase"
patch_description: "Fix PCRE2 detection"
Expand Down
14 changes: 4 additions & 10 deletions recipes/qt/6.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,18 +247,12 @@ def validate(self):
elif Version(self.settings.compiler.version) < minimum_version:
raise ConanInvalidConfiguration("C++17 support required, which your compiler does not support.")

if Version(self.version) >= "6.5.0" and self.settings.compiler == "gcc" and Version(self.settings.compiler.version) == "9":
raise ConanInvalidConfiguration("qt 6.5.0 cannot be built with gcc 9, cf QTBUG-112920")

if Version(self.version) >= "6.4.0" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "12":
raise ConanInvalidConfiguration("apple-clang >= 12 required by qt >= 6.4.0")

if Version(self.version) >= "6.6.1" and self.settings.compiler == "apple-clang" and Version(self.settings.compiler.version) < "13.1":
raise ConanInvalidConfiguration("apple-clang >= 13.1 is required by qt >= 6.6.1 cf QTBUG-119490")

if self.settings.compiler == "clang" and "libstdc++" in str(self.settings.compiler.libcxx):
raise ConanInvalidConfiguration("Qt needs recent libstdc++, with charconv. please switch to gcc, or to libc++")

if self.settings.os == "Macos" and self.dependencies["double-conversion"].options.shared:
raise ConanInvalidConfiguration("Test recipe fails because of Macos' SIP. Contributions are welcome.")

Expand Down Expand Up @@ -321,11 +315,11 @@ def requirements(self):
if self.options.with_pcre2:
self.requires("pcre2/10.42")
if self.options.get_safe("with_vulkan"):
self.requires("vulkan-loader/1.3.239.0")
self.requires("vulkan-loader/1.3.268.0")
if is_apple_os(self):
self.requires("moltenvk/1.2.2")
if self.options.with_glib:
self.requires("glib/2.78.1")
self.requires("glib/2.78.3")
if self.options.with_doubleconversion and not self.options.multiconfiguration:
self.requires("double-conversion/3.3.0")
if self.options.get_safe("with_freetype", False) and not self.options.multiconfiguration:
Expand Down Expand Up @@ -380,7 +374,7 @@ def requirements(self):
if self.options.get_safe("with_pulseaudio", False):
self.requires("pulseaudio/14.2")
if self.options.with_dbus:
self.requires("dbus/1.15.6")
self.requires("dbus/1.15.8")
if self.settings.os in ['Linux', 'FreeBSD'] and self.options.with_gssapi:
self.requires("krb5/1.18.3") # conan-io/conan-center-index#4102
if self.options.get_safe("with_md4c", False):
Expand All @@ -390,7 +384,7 @@ def build_requirements(self):
self.tool_requires("cmake/[>=3.21.1 <4]")
self.tool_requires("ninja/1.11.1")
if not self.conf.get("tools.gnu:pkg_config", check_type=str):
self.tool_requires("pkgconf/2.0.3")
self.tool_requires("pkgconf/2.1.0")
if self.settings.os == "Windows":
self.tool_requires('strawberryperl/5.32.1.1')

Expand Down
28 changes: 28 additions & 0 deletions recipes/qt/6.x.x/patches/32fa63f.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From b404930e122013e76ba8fe165f3432288c051438 Mon Sep 17 00:00:00 2001
From: shjiu <shanheng.jiu@qt.io>
Date: Fri, 17 Nov 2023 09:41:31 +0900
Subject: [PATCH] Fix build error with lambda on GCC 9.2

This patch is specific to the return type of updatePtrSimd function as boolean to avoid the bug of GCC 9.2.

Fixes: QTBUG-112920
Pick-to: 6.7 6.6 6.5
Change-Id: I21cb1f6dda34448b2290ab72ec280b6b2a3732c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
---
src/corelib/text/qstring.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index 2dc415584f3..d9e89f8e5bb 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -471,7 +471,7 @@ static bool simdTestMask(const char *&ptr, const char *end, quint32 maskval)
if constexpr (UseSse4_1) {
# ifndef Q_OS_QNX // compiler fails in the code below
__m128i mask;
- auto updatePtrSimd = [&](__m128i data) {
+ auto updatePtrSimd = [&](__m128i data) -> bool {
__m128i masked = _mm_and_si128(mask, data);
__m128i comparison = _mm_cmpeq_epi16(masked, _mm_setzero_si128());
uint result = _mm_movemask_epi8(comparison);
28 changes: 28 additions & 0 deletions recipes/qt/6.x.x/patches/32fa63f_6.5.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From b404930e122013e76ba8fe165f3432288c051438 Mon Sep 17 00:00:00 2001
From: shjiu <shanheng.jiu@qt.io>
Date: Fri, 17 Nov 2023 09:41:31 +0900
Subject: [PATCH] Fix build error with lambda on GCC 9.2

This patch is specific to the return type of updatePtrSimd function as boolean to avoid the bug of GCC 9.2.

Fixes: QTBUG-112920
Pick-to: 6.7 6.6 6.5
Change-Id: I21cb1f6dda34448b2290ab72ec280b6b2a3732c9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
---
src/corelib/text/qstring.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index 2dc415584f3..d9e89f8e5bb 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -461,7 +461,7 @@ static bool simdTestMask(const char *&ptr, const char *end, quint32 maskval)
if constexpr (UseSse4_1) {
# ifndef Q_OS_QNX // compiler fails in the code below
__m128i mask;
- auto updatePtrSimd = [&](__m128i data) {
+ auto updatePtrSimd = [&](__m128i data) -> bool {
__m128i masked = _mm_and_si128(mask, data);
__m128i comparison = _mm_cmpeq_epi16(masked, _mm_setzero_si128());
uint result = _mm_movemask_epi8(comparison);