From 42130b288237a6bc9879b54a4d33816ea036ed71 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 24 Sep 2023 14:24:19 +0200 Subject: [PATCH 01/11] fix qmake build with apple-clang 15 --- recipes/qt/5.x.x/conandata.yml | 20 ++++++++++++++ ...qmake-default-libdirs-apple-clang-15.patch | 26 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 recipes/qt/5.x.x/patches/fix-qmake-default-libdirs-apple-clang-15.patch diff --git a/recipes/qt/5.x.x/conandata.yml b/recipes/qt/5.x.x/conandata.yml index d0847c695c371..9a7989e928d3d 100644 --- a/recipes/qt/5.x.x/conandata.yml +++ b/recipes/qt/5.x.x/conandata.yml @@ -78,6 +78,11 @@ patches: "patch_file": "patches/android-openssl.diff" - "base_path": "qt5/qtbase" "patch_file": "patches/android-new-ndk.diff" + - patch_file: "patches/fix-qmake-default-libdirs-apple-clang-15.patch" + base_path: "qt5/qtbase" + patch_description: "Fix qmake build with apple-clang>=15" + patch_type: "portability" + patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" "5.15.9": - "base_path": "qt5/qtbase" "patch_file": "patches/aa2a39dea5.diff" @@ -101,6 +106,11 @@ patches: "patch_file": "patches/android-openssl.diff" - "base_path": "qt5/qtbase" "patch_file": "patches/android-new-ndk.diff" + - patch_file: "patches/fix-qmake-default-libdirs-apple-clang-15.patch" + base_path: "qt5/qtbase" + patch_description: "Fix build with apple-clang 15" + patch_type: "portability" + patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" "5.15.8": - patch_file: "patches/aa2a39dea5.diff" base_path: "qt5/qtbase" @@ -124,6 +134,11 @@ patches: base_path: "qt5/qtbase" - patch_file: "patches/android-new-ndk.diff" base_path: "qt5/qtbase" + - patch_file: "patches/fix-qmake-default-libdirs-apple-clang-15.patch" + base_path: "qt5/qtbase" + patch_description: "Fix build with apple-clang 15" + patch_type: "portability" + patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" "5.15.7": - patch_file: "patches/337f28c9ab.patch" base_path: "qt5/qtbase" @@ -155,3 +170,8 @@ patches: base_path: "qt5/qtbase" - patch_file: "patches/android-new-ndk.diff" base_path: "qt5/qtbase" + - patch_file: "patches/fix-qmake-default-libdirs-apple-clang-15.patch" + base_path: "qt5/qtbase" + patch_description: "Fix build with apple-clang 15" + patch_type: "portability" + patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" diff --git a/recipes/qt/5.x.x/patches/fix-qmake-default-libdirs-apple-clang-15.patch b/recipes/qt/5.x.x/patches/fix-qmake-default-libdirs-apple-clang-15.patch new file mode 100644 index 0000000000000..a058fb5245ef2 --- /dev/null +++ b/recipes/qt/5.x.x/patches/fix-qmake-default-libdirs-apple-clang-15.patch @@ -0,0 +1,26 @@ +--- a/mkspecs/features/toolchain.prf ++++ b/mkspecs/features/toolchain.prf +@@ -288,9 +288,12 @@ isEmpty($${target_prefix}.INCDIRS) { + } + } + } +- isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS): \ ++ isEmpty(QMAKE_DEFAULT_INCDIRS): \ + !integrity: \ +- error("failed to parse default search paths from compiler output") ++ error("failed to parse default include paths from compiler output") ++ isEmpty(QMAKE_DEFAULT_LIBDIRS): \ ++ !integrity:!darwin: \ ++ error("failed to parse default library paths from compiler output") + QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS) + } else: ghs { + cmd = $$QMAKE_CXX $$QMAKE_CXXFLAGS -$${LITERAL_HASH} -o /tmp/fake_output /tmp/fake_input.cpp +@@ -412,7 +415,7 @@ isEmpty($${target_prefix}.INCDIRS) { + QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP) + } + +- unix:if(!cross_compile|host_build) { ++ unix:!darwin:if(!cross_compile|host_build) { + isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include + isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib + } From 86c4c8e08b5422788bb922290612beaf609de395 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 24 Sep 2023 19:24:06 +0200 Subject: [PATCH 02/11] fix build with apple-clang 15 when deployment target of macOS is < 14 see https://bugreports.qt.io/browse/QTBUG-114316 --- recipes/qt/5.x.x/conandata.yml | 20 +++++++++ .../fix-macos-cpp-lib-memory-resource.patch | 43 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 recipes/qt/5.x.x/patches/fix-macos-cpp-lib-memory-resource.patch diff --git a/recipes/qt/5.x.x/conandata.yml b/recipes/qt/5.x.x/conandata.yml index 9a7989e928d3d..be8ca4b23af75 100644 --- a/recipes/qt/5.x.x/conandata.yml +++ b/recipes/qt/5.x.x/conandata.yml @@ -83,6 +83,11 @@ patches: patch_description: "Fix qmake build with apple-clang>=15" patch_type: "portability" patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" + - patch_file: "patches/fix-macos-cpp-lib-memory-resource.patch" + base_path: "qt5/qtbase" + patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" + patch_type: "portability" + patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" "5.15.9": - "base_path": "qt5/qtbase" "patch_file": "patches/aa2a39dea5.diff" @@ -111,6 +116,11 @@ patches: patch_description: "Fix build with apple-clang 15" patch_type: "portability" patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" + - patch_file: "patches/fix-macos-cpp-lib-memory-resource.patch" + base_path: "qt5/qtbase" + patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" + patch_type: "portability" + patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" "5.15.8": - patch_file: "patches/aa2a39dea5.diff" base_path: "qt5/qtbase" @@ -139,6 +149,11 @@ patches: patch_description: "Fix build with apple-clang 15" patch_type: "portability" patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" + - patch_file: "patches/fix-macos-cpp-lib-memory-resource.patch" + base_path: "qt5/qtbase" + patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" + patch_type: "portability" + patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" "5.15.7": - patch_file: "patches/337f28c9ab.patch" base_path: "qt5/qtbase" @@ -175,3 +190,8 @@ patches: patch_description: "Fix build with apple-clang 15" patch_type: "portability" patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" + - patch_file: "patches/fix-macos-cpp-lib-memory-resource.patch" + base_path: "qt5/qtbase" + patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" + patch_type: "portability" + patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" diff --git a/recipes/qt/5.x.x/patches/fix-macos-cpp-lib-memory-resource.patch b/recipes/qt/5.x.x/patches/fix-macos-cpp-lib-memory-resource.patch new file mode 100644 index 0000000000000..21112d5316d7a --- /dev/null +++ b/recipes/qt/5.x.x/patches/fix-macos-cpp-lib-memory-resource.patch @@ -0,0 +1,43 @@ +--- a/src/corelib/global/qcompilerdetection.h ++++ b/src/corelib/global/qcompilerdetection.h +@@ -1050,16 +1050,22 @@ + # endif // !_HAS_CONSTEXPR + # endif // !__GLIBCXX__ && !_LIBCPP_VERSION + # endif // Q_OS_QNX +-# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \ +- && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) ++# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) ++# if defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) + // Apple has not updated libstdc++ since 2007, which means it does not have + // or std::move. Let's disable these features +-# undef Q_COMPILER_INITIALIZER_LISTS +-# undef Q_COMPILER_RVALUE_REFS +-# undef Q_COMPILER_REF_QUALIFIERS ++# undef Q_COMPILER_INITIALIZER_LISTS ++# undef Q_COMPILER_RVALUE_REFS ++# undef Q_COMPILER_REF_QUALIFIERS + // Also disable , since it's clearly not there +-# undef Q_COMPILER_ATOMICS +-# endif ++# undef Q_COMPILER_ATOMICS ++# endif ++# if defined(__cpp_lib_memory_resource) \ ++ && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 140000) \ ++ || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 170000)) ++# undef __cpp_lib_memory_resource // Only supported on macOS 14 and iOS 17 ++# endif ++# endif // (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) + # if defined(Q_CC_CLANG) && defined(Q_CC_INTEL) && Q_CC_INTEL >= 1500 + // ICC 15.x and 16.0 have their own implementation of std::atomic, which is activated when in Clang mode + // (probably because libc++'s on OS X failed to compile), but they're missing some +--- a/src/corelib/tools/qduplicatetracker_p.h ++++ b/src/corelib/tools/qduplicatetracker_p.h +@@ -52,7 +52,7 @@ + + #include + +-#if QT_HAS_INCLUDE() && __cplusplus > 201402L ++#if defined(__cpp_lib_memory_resource) && __cplusplus > 201402L + # include + # include + #else From f9c91fa481d4ad295d46e94c2fe3d12cecaf12be Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 24 Sep 2023 22:05:19 +0200 Subject: [PATCH 03/11] improve robustness of macOS builds when deps are shared --- recipes/qt/5.x.x/conanfile.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index 8e54f6b2a47b0..4e2a754fc3778 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -475,18 +475,6 @@ def generate(self): env.prepend_path("PKG_CONFIG_PATH", self.generators_folder) if self.settings.os == "Windows": env.prepend_path("PATH", os.path.join(self.source_folder, "qt5", "gnuwin32", "bin")) - if self._settings_build.os == "Macos": - # On macOS, SIP resets DYLD_LIBRARY_PATH injected by VirtualBuildEnv & VirtualRunEnv - dyld_library_path = "$DYLD_LIBRARY_PATH" - dyld_library_path_build = vbe.vars().get("DYLD_LIBRARY_PATH") - if dyld_library_path_build: - dyld_library_path = f"{dyld_library_path_build}:{dyld_library_path}" - if not cross_building(self): - dyld_library_path_host = vre.vars().get("DYLD_LIBRARY_PATH") - if dyld_library_path_host: - dyld_library_path = f"{dyld_library_path_host}:{dyld_library_path}" - save(self, "bash_env", f'export DYLD_LIBRARY_PATH="{dyld_library_path}"') - env.define_path("BASH_ENV", os.path.abspath("bash_env")) env.vars(self).save_script("conan_qt_env_file") def _make_program(self): @@ -801,6 +789,19 @@ def _getenvpath(var): if self._settings_build.os == "Linux" and self.settings.compiler == "clang": args += ['QMAKE_CXXFLAGS+="-ftemplate-depth=1024"'] + if self._settings_build.os == "Macos": + # On macOS, SIP resets DYLD_LIBRARY_PATH injected by VirtualBuildEnv & VirtualRunEnv. + # Qt builds several executables (moc etc) which are called later on during build of + # libraries, and these executables link to several external dependencies in requirements(). + # If these external libs are shared, moc calls fail because its dylib dependencies + # are not found (unless they can be accidentally found in system paths). + # So the workaround is to add libdirs of these external dependencies to LC_RPATH + # of runtime artifacts. + if not cross_building(self): + for libpath in VirtualRunEnv(self).vars().get("DYLD_LIBRARY_PATH", "").split(":"): + # see https://doc.qt.io/qt-5/qmake-variable-reference.html#qmake-rpathdir + args += [f"QMAKE_RPATHDIR+=\"{libpath}\""] + if self.options.qtwebengine and self.settings.os in ["Linux", "FreeBSD"]: args += ["-qt-webengine-ffmpeg", "-system-webengine-opus", @@ -1047,7 +1048,7 @@ def _create_plugin(pluginname, libname, plugintype, requires): "exec_prefix=${prefix}", ] self.cpp_info.components["qtCore"].set_property("pkg_config_custom_content", "\n".join(pkg_config_vars)) - + if self.settings.os == "Windows": module = "WinMain" componentname = f"qt{module}" From 36bfb781d1d47305187d9d1aada5018acadfafb1 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 25 Sep 2023 00:56:54 +0200 Subject: [PATCH 04/11] add package_type --- recipes/qt/5.x.x/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index 4e2a754fc3778..748e16dcfac5f 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -33,7 +33,7 @@ class QtConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.qt.io" license = "LGPL-3.0-only" - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], From 69ec16b1069ecef6b6563e5efa36a92592215d59 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 25 Sep 2023 00:58:56 +0200 Subject: [PATCH 05/11] use is_msvc_static_runtime() --- recipes/qt/5.x.x/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index 748e16dcfac5f..837f487b3361a 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -6,7 +6,7 @@ from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv from conan.tools.files import chdir, copy, get, load, replace_in_file, rm, rmdir, save, export_conandata_patches, apply_conandata_patches from conan.tools.gnu import PkgConfigDeps -from conan.tools.microsoft import msvc_runtime_flag, is_msvc, VCVars +from conan.tools.microsoft import is_msvc, msvc_runtime_flag, is_msvc_static_runtime, VCVars from conan.tools.scm import Version import configparser import glob @@ -308,7 +308,7 @@ def validate(self): raise ConanInvalidConfiguration("Qt without libc++ needs qt:with_doubleconversion. " "Either enable qt:with_doubleconversion or switch to libc++") - if "MT" in self.settings.get_safe("compiler.runtime", default="") and self.options.shared: + if is_msvc_static_runtime(self) and self.options.shared: raise ConanInvalidConfiguration("Qt cannot be built as shared library with static runtime") if self.settings.compiler == "apple-clang": From 37e602f35e4c36cacfbc4f6737063da93e01690c Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 25 Sep 2023 01:02:12 +0200 Subject: [PATCH 06/11] use host_version for wayland in build requirements --- recipes/qt/5.x.x/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index 837f487b3361a..f3470587a42ca 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -15,7 +15,7 @@ import textwrap import shutil -required_conan_version = ">=1.59.0" +required_conan_version = ">=1.60.0 <2 || >=2.0.6" class QtConan(ConanFile): @@ -442,7 +442,7 @@ def build_requirements(self): self.tool_requires("bison/3.8.2") self.tool_requires("flex/2.6.4") if self.options.qtwayland: - self.tool_requires("wayland/1.22.0") + self.tool_requires("wayland/") def source(self): get(self, **self.conan_data["sources"][self.version], From 25756b3dbae18c75d30a39aec371915ca90f2fcf Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 25 Sep 2023 01:08:48 +0200 Subject: [PATCH 07/11] bump dependencies + use version range for zlib --- recipes/qt/5.x.x/conanfile.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index f3470587a42ca..9b7aaad3f8c9c 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -339,7 +339,7 @@ def validate(self): raise ConanInvalidConfiguration("sqlite3 option enable_column_metadata must be enabled for qt") def requirements(self): - self.requires("zlib/1.2.13") + self.requires("zlib/[>=1.2.11 <2]") if self.options.openssl: self.requires("openssl/[>=1.1 <4]") if self.options.with_pcre2: @@ -349,7 +349,7 @@ def requirements(self): if is_apple_os(self): self.requires("moltenvk/1.2.2") if self.options.with_glib: - self.requires("glib/2.77.0") + self.requires("glib/2.78.0") # if self.options.with_libiconv: # QTBUG-84708 # self.requires("libiconv/1.16")# QTBUG-84708 if self.options.with_doubleconversion and not self.options.multiconfiguration: @@ -361,41 +361,42 @@ def requirements(self): if self.options.get_safe("with_icu", False): self.requires("icu/73.2") if self.options.get_safe("with_harfbuzz", False) and not self.options.multiconfiguration: - self.requires("harfbuzz/8.0.1") + self.requires("harfbuzz/8.1.1") if self.options.get_safe("with_libjpeg", False) and not self.options.multiconfiguration: if self.options.with_libjpeg == "libjpeg-turbo": - self.requires("libjpeg-turbo/2.1.5") + self.requires("libjpeg-turbo/3.0.0") else: self.requires("libjpeg/9e") if self.options.get_safe("with_libpng", False) and not self.options.multiconfiguration: self.requires("libpng/1.6.40") if self.options.with_sqlite3 and not self.options.multiconfiguration: - self.requires("sqlite3/3.42.0") + self.requires("sqlite3/3.43.1") if self.options.get_safe("with_mysql", False): - self.requires("libmysqlclient/8.0.31") + self.requires("libmysqlclient/8.1.0") if self.options.with_pq: - self.requires("libpq/15.3") + self.requires("libpq/15.4") if self.options.with_odbc: if self.settings.os != "Windows": self.requires("odbc/2.3.11") if self.options.get_safe("with_openal", False): self.requires("openal-soft/1.22.2") if self.options.get_safe("with_libalsa", False): - self.requires("libalsa/1.2.7.2") - if self.options.get_safe("with_x11", False): - self.requires("xkbcommon/1.5.0") + self.requires("libalsa/1.2.10") + if self.options.get_safe("with_x11"): self.requires("xorg/system") + if self.options.get_safe("with_x11") or self.options.qtwayland: + self.requires("xkbcommon/1.5.0") if self.options.get_safe("opengl", "no") != "no": self.requires("opengl/system") if self.options.with_zstd: self.requires("zstd/1.5.5") if self.options.qtwebengine and self.settings.os in ["Linux", "FreeBSD"]: self.requires("expat/2.5.0") - self.requires("opus/1.3.1") + self.requires("opus/1.4") if not self.options.qtwayland: self.requires("xorg-proto/2022.2") self.requires("libxshmfence/1.3") - self.requires("nss/3.89") + self.requires("nss/3.93") self.requires("libdrm/2.4.114") self.requires("egl/system") if self.options.get_safe("with_gstreamer", False): @@ -406,7 +407,6 @@ def requirements(self): self.requires("dbus/1.15.6") if self.options.qtwayland: self.requires("wayland/1.22.0") - self.requires("xkbcommon/1.5.0") 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_atspi"): From 27b45dc02e05c05514460ef286e6dbfc6d32ae6e Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Mon, 25 Sep 2023 01:27:39 +0200 Subject: [PATCH 08/11] decrease min conan v2 version, 2.0.5 is enough for --- recipes/qt/5.x.x/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index 9b7aaad3f8c9c..6d48ea9d5d102 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -15,7 +15,7 @@ import textwrap import shutil -required_conan_version = ">=1.60.0 <2 || >=2.0.6" +required_conan_version = ">=1.60.0 <2 || >=2.0.5" class QtConan(ConanFile): From 9938beb4a87d17a024f08f32bd806280afaac2de Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Sun, 1 Oct 2023 21:43:14 +0200 Subject: [PATCH 09/11] adapt patches to each version --- recipes/qt/5.x.x/conandata.yml | 16 +++---- ...0-fix-macos-cpp-lib-memory-resource.patch} | 0 ....7-fix-macos-cpp-lib-memory-resource.patch | 43 +++++++++++++++++++ ...qmake-default-libdirs-apple-clang-15.patch | 26 +++++++++++ ...make-default-libdirs-apple-clang-15.patch} | 0 5 files changed, 77 insertions(+), 8 deletions(-) rename recipes/qt/5.x.x/patches/{fix-macos-cpp-lib-memory-resource.patch => 5.15.10-fix-macos-cpp-lib-memory-resource.patch} (100%) create mode 100644 recipes/qt/5.x.x/patches/5.15.7-fix-macos-cpp-lib-memory-resource.patch create mode 100644 recipes/qt/5.x.x/patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch rename recipes/qt/5.x.x/patches/{fix-qmake-default-libdirs-apple-clang-15.patch => 5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch} (100%) diff --git a/recipes/qt/5.x.x/conandata.yml b/recipes/qt/5.x.x/conandata.yml index be8ca4b23af75..89d0b087ba834 100644 --- a/recipes/qt/5.x.x/conandata.yml +++ b/recipes/qt/5.x.x/conandata.yml @@ -78,12 +78,12 @@ patches: "patch_file": "patches/android-openssl.diff" - "base_path": "qt5/qtbase" "patch_file": "patches/android-new-ndk.diff" - - patch_file: "patches/fix-qmake-default-libdirs-apple-clang-15.patch" + - patch_file: "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch" base_path: "qt5/qtbase" patch_description: "Fix qmake build with apple-clang>=15" patch_type: "portability" patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" - - patch_file: "patches/fix-macos-cpp-lib-memory-resource.patch" + - patch_file: "patches/5.15.10-fix-macos-cpp-lib-memory-resource.patch" base_path: "qt5/qtbase" patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" patch_type: "portability" @@ -111,12 +111,12 @@ patches: "patch_file": "patches/android-openssl.diff" - "base_path": "qt5/qtbase" "patch_file": "patches/android-new-ndk.diff" - - patch_file: "patches/fix-qmake-default-libdirs-apple-clang-15.patch" + - patch_file: "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch" base_path: "qt5/qtbase" patch_description: "Fix build with apple-clang 15" patch_type: "portability" patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" - - patch_file: "patches/fix-macos-cpp-lib-memory-resource.patch" + - patch_file: "patches/5.15.7-fix-macos-cpp-lib-memory-resource.patch" base_path: "qt5/qtbase" patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" patch_type: "portability" @@ -144,12 +144,12 @@ patches: base_path: "qt5/qtbase" - patch_file: "patches/android-new-ndk.diff" base_path: "qt5/qtbase" - - patch_file: "patches/fix-qmake-default-libdirs-apple-clang-15.patch" + - patch_file: "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch" base_path: "qt5/qtbase" patch_description: "Fix build with apple-clang 15" patch_type: "portability" patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" - - patch_file: "patches/fix-macos-cpp-lib-memory-resource.patch" + - patch_file: "patches/5.15.7-fix-macos-cpp-lib-memory-resource.patch" base_path: "qt5/qtbase" patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" patch_type: "portability" @@ -185,12 +185,12 @@ patches: base_path: "qt5/qtbase" - patch_file: "patches/android-new-ndk.diff" base_path: "qt5/qtbase" - - patch_file: "patches/fix-qmake-default-libdirs-apple-clang-15.patch" + - patch_file: "patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch" base_path: "qt5/qtbase" patch_description: "Fix build with apple-clang 15" patch_type: "portability" patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" - - patch_file: "patches/fix-macos-cpp-lib-memory-resource.patch" + - patch_file: "patches/5.15.7-fix-macos-cpp-lib-memory-resource.patch" base_path: "qt5/qtbase" patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" patch_type: "portability" diff --git a/recipes/qt/5.x.x/patches/fix-macos-cpp-lib-memory-resource.patch b/recipes/qt/5.x.x/patches/5.15.10-fix-macos-cpp-lib-memory-resource.patch similarity index 100% rename from recipes/qt/5.x.x/patches/fix-macos-cpp-lib-memory-resource.patch rename to recipes/qt/5.x.x/patches/5.15.10-fix-macos-cpp-lib-memory-resource.patch diff --git a/recipes/qt/5.x.x/patches/5.15.7-fix-macos-cpp-lib-memory-resource.patch b/recipes/qt/5.x.x/patches/5.15.7-fix-macos-cpp-lib-memory-resource.patch new file mode 100644 index 0000000000000..2eb73ac2b79b5 --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.7-fix-macos-cpp-lib-memory-resource.patch @@ -0,0 +1,43 @@ +--- a/src/corelib/global/qcompilerdetection.h ++++ b/src/corelib/global/qcompilerdetection.h +@@ -1041,16 +1041,22 @@ + # endif // !_HAS_CONSTEXPR + # endif // !__GLIBCXX__ && !_LIBCPP_VERSION + # endif // Q_OS_QNX +-# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) && defined(__GNUC_LIBSTD__) \ +- && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) ++# if (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) ++# if defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402) + // Apple has not updated libstdc++ since 2007, which means it does not have + // or std::move. Let's disable these features +-# undef Q_COMPILER_INITIALIZER_LISTS +-# undef Q_COMPILER_RVALUE_REFS +-# undef Q_COMPILER_REF_QUALIFIERS ++# undef Q_COMPILER_INITIALIZER_LISTS ++# undef Q_COMPILER_RVALUE_REFS ++# undef Q_COMPILER_REF_QUALIFIERS + // Also disable , since it's clearly not there +-# undef Q_COMPILER_ATOMICS +-# endif ++# undef Q_COMPILER_ATOMICS ++# endif ++# if defined(__cpp_lib_memory_resource) \ ++ && ((defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED < 140000) \ ++ || (defined(__IPHONE_OS_VERSION_MIN_REQUIRED) && __IPHONE_OS_VERSION_MIN_REQUIRED < 170000)) ++# undef __cpp_lib_memory_resource // Only supported on macOS 14 and iOS 17 ++# endif ++# endif // (defined(Q_CC_CLANG) || defined(Q_CC_INTEL)) && defined(Q_OS_MAC) + # if defined(Q_CC_CLANG) && defined(Q_CC_INTEL) && Q_CC_INTEL >= 1500 + // ICC 15.x and 16.0 have their own implementation of std::atomic, which is activated when in Clang mode + // (probably because libc++'s on OS X failed to compile), but they're missing some +--- a/src/corelib/tools/qduplicatetracker_p.h ++++ b/src/corelib/tools/qduplicatetracker_p.h +@@ -52,7 +52,7 @@ + + #include + +-#if QT_HAS_INCLUDE() && __cplusplus > 201402L ++#if defined(__cpp_lib_memory_resource) && __cplusplus > 201402L + # include + # include + #else diff --git a/recipes/qt/5.x.x/patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch b/recipes/qt/5.x.x/patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch new file mode 100644 index 0000000000000..1f9f0f90f6e5b --- /dev/null +++ b/recipes/qt/5.x.x/patches/5.15.7-fix-qmake-default-libdirs-apple-clang-15.patch @@ -0,0 +1,26 @@ +--- a/mkspecs/features/toolchain.prf ++++ b/mkspecs/features/toolchain.prf +@@ -283,9 +283,12 @@ isEmpty($${target_prefix}.INCDIRS) { + } + } + } +- isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS): \ ++ isEmpty(QMAKE_DEFAULT_INCDIRS): \ + !integrity: \ +- error("failed to parse default search paths from compiler output") ++ error("failed to parse default include paths from compiler output") ++ isEmpty(QMAKE_DEFAULT_LIBDIRS): \ ++ !integrity:!darwin: \ ++ error("failed to parse default library paths from compiler output") + QMAKE_DEFAULT_LIBDIRS = $$unique(QMAKE_DEFAULT_LIBDIRS) + } else: ghs { + cmd = $$QMAKE_CXX $$QMAKE_CXXFLAGS -$${LITERAL_HASH} -o /tmp/fake_output /tmp/fake_input.cpp +@@ -407,7 +410,7 @@ isEmpty($${target_prefix}.INCDIRS) { + QMAKE_DEFAULT_INCDIRS = $$split(INCLUDE, $$QMAKE_DIRLIST_SEP) + } + +- unix:if(!cross_compile|host_build) { ++ unix:!darwin:if(!cross_compile|host_build) { + isEmpty(QMAKE_DEFAULT_INCDIRS): QMAKE_DEFAULT_INCDIRS = /usr/include /usr/local/include + isEmpty(QMAKE_DEFAULT_LIBDIRS): QMAKE_DEFAULT_LIBDIRS = /lib /usr/lib + } diff --git a/recipes/qt/5.x.x/patches/fix-qmake-default-libdirs-apple-clang-15.patch b/recipes/qt/5.x.x/patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch similarity index 100% rename from recipes/qt/5.x.x/patches/fix-qmake-default-libdirs-apple-clang-15.patch rename to recipes/qt/5.x.x/patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch From 4576ae5be4269e09da2d61a5f8353292be06e523 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 6 Oct 2023 16:54:04 +0200 Subject: [PATCH 10/11] bump dependencies --- recipes/qt/5.x.x/conanfile.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/recipes/qt/5.x.x/conanfile.py b/recipes/qt/5.x.x/conanfile.py index 6d48ea9d5d102..976d58a30b32d 100644 --- a/recipes/qt/5.x.x/conanfile.py +++ b/recipes/qt/5.x.x/conanfile.py @@ -361,7 +361,7 @@ def requirements(self): if self.options.get_safe("with_icu", False): self.requires("icu/73.2") if self.options.get_safe("with_harfbuzz", False) and not self.options.multiconfiguration: - self.requires("harfbuzz/8.1.1") + self.requires("harfbuzz/8.2.1") if self.options.get_safe("with_libjpeg", False) and not self.options.multiconfiguration: if self.options.with_libjpeg == "libjpeg-turbo": self.requires("libjpeg-turbo/3.0.0") @@ -404,13 +404,13 @@ 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.options.qtwayland: self.requires("wayland/1.22.0") 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_atspi"): - self.requires("at-spi2-core/2.49.1") + self.requires("at-spi2-core/2.50.0") if self.options.get_safe("with_md4c", False): self.requires("md4c/0.4.8") @@ -437,7 +437,7 @@ def build_requirements(self): self.tool_requires("gperf/3.1") # gperf, bison, flex, python >= 2.7.5 & < 3 if self._settings_build.os == "Windows": - self.tool_requires("winflexbison/2.5.24") + self.tool_requires("winflexbison/2.5.25") else: self.tool_requires("bison/3.8.2") self.tool_requires("flex/2.6.4") From 9d78ba6f8ae8a5f3f1f3351e95feb93a1a8b8715 Mon Sep 17 00:00:00 2001 From: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Date: Fri, 6 Oct 2023 17:46:19 +0200 Subject: [PATCH 11/11] also patch 5.15.11 --- recipes/qt/5.x.x/conandata.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/recipes/qt/5.x.x/conandata.yml b/recipes/qt/5.x.x/conandata.yml index 0f20ce9e0e5b5..db92ab6d5dace 100644 --- a/recipes/qt/5.x.x/conandata.yml +++ b/recipes/qt/5.x.x/conandata.yml @@ -98,6 +98,16 @@ patches: "patch_file": "patches/android-openssl.diff" - "base_path": "qt5/qtbase" "patch_file": "patches/android-new-ndk.diff" + - patch_file: "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch" + base_path: "qt5/qtbase" + patch_description: "Fix qmake build with apple-clang>=15" + patch_type: "portability" + patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/503916" + - patch_file: "patches/5.15.10-fix-macos-cpp-lib-memory-resource.patch" + base_path: "qt5/qtbase" + patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14" + patch_type: "portability" + patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392" "5.15.10": - "base_path": "qt5/qtbase" "patch_file": "patches/aa2a39dea5.diff"