From d4bfe6f361db831c7a885945b4dd3a88ed45d298 Mon Sep 17 00:00:00 2001 From: sproxet <17163658+sproxet@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:07:06 +0700 Subject: [PATCH 1/2] Fix qmake compilation on OSX Sonoma. --- depends/packages/qt.mk | 3 ++- depends/patches/qt/fix_sonoma_qmake.patch | 28 +++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 depends/patches/qt/fix_sonoma_qmake.patch diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index e46ad88eef..5c5a1799f5 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -11,7 +11,7 @@ $(package)_linguist_tools = lrelease lupdate lconvert $(package)_patches = qt.pro qttools_src.pro $(package)_patches += fix_qt_pkgconfig.patch mac-qmake.conf fix_no_printer.patch no-xlib.patch $(package)_patches += support_new_android_ndks.patch fix_android_jni_static.patch dont_hardcode_pwd.patch -$(package)_patches += dont_hardcode_x86_64.patch no_sdk_version_check.patch +$(package)_patches += dont_hardcode_x86_64.patch no_sdk_version_check.patch fix_sonoma_qmake.patch $(package)_patches+= fix_lib_paths.patch fix_android_pch.patch $(package)_patches+= qtbase-moc-ignore-gcc-macro.patch fix_limits_header.patch $(package)_patches+= fix_montery_include.patch @@ -233,6 +233,7 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ patch -p1 -i $($(package)_patch_dir)/fix_limits_header.patch && \ patch -p1 -i $($(package)_patch_dir)/fix_montery_include.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix_sonoma_qmake.patch && \ mkdir -p qtbase/mkspecs/macx-clang-linux &&\ cp -f qtbase/mkspecs/macx-clang/qplatformdefs.h qtbase/mkspecs/macx-clang-linux/ &&\ cp -f $($(package)_patch_dir)/mac-qmake.conf qtbase/mkspecs/macx-clang-linux/qmake.conf && \ diff --git a/depends/patches/qt/fix_sonoma_qmake.patch b/depends/patches/qt/fix_sonoma_qmake.patch new file mode 100644 index 0000000000..b958723f2a --- /dev/null +++ b/depends/patches/qt/fix_sonoma_qmake.patch @@ -0,0 +1,28 @@ +diff --git a/qtbase/mkspecs/features/toolchain.prf b/qtbase/mkspecs/features/toolchain.prf +index 0c505fc965..c70f2797c8 100644 +--- a/qtbase/mkspecs/features/toolchain.prf ++++ b/qtbase/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 92a3d42435312870c4bda8cd769b3071c733dbe3 Mon Sep 17 00:00:00 2001 From: sproxet <17163658+sproxet@users.noreply.github.com> Date: Tue, 17 Oct 2023 16:08:26 +0700 Subject: [PATCH 2/2] Upgrade boost. --- depends/packages/boost.mk | 4 ++-- src/qt/bitcoin.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 0a0208e2c3..ac9e85546a 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -1,8 +1,8 @@ package=boost -$(package)_version=1_77_0 +$(package)_version=1_81_0 $(package)_download_path=https://boostorg.jfrog.io/artifactory/main/release/$(subst _,.,$($(package)_version))/source/ $(package)_file_name=boost_$($(package)_version).tar.bz2 -$(package)_sha256_hash=fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854 +$(package)_sha256_hash=71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa $(package)_dependencies=native_b2 define $(package)_set_vars diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp index cbea7f2b5b..a82f368ef3 100644 --- a/src/qt/bitcoin.cpp +++ b/src/qt/bitcoin.cpp @@ -40,6 +40,8 @@ #endif #include +#include +#include #include #include @@ -629,7 +631,8 @@ void BitcoinApplication::migrateToFiro() } else if (doNotShowAgain) { // create file to block migration in the future - boost::filesystem::ofstream(dontMigrateFilePath).flush(); + std::ofstream dontMigrateFile(dontMigrateFilePath.string()); + dontMigrateFile.flush(); } } @@ -639,7 +642,7 @@ int main(int argc, char *argv[]) #ifdef ENABLE_CRASH_HOOKS RegisterPrettyTerminateHander(); RegisterPrettySignalHandlers(); -#endif +#endif SetupEnvironment(); /// 1. Parse command-line options. These take precedence over anything else.