diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d46df1d3bc..5999808f986 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -111,8 +111,12 @@ if(ENABLE_WALLET) if(VCPKG_TARGET_TRIPLET) # Use of the `unofficial::` namespace is a vcpkg package manager convention. find_package(unofficial-sqlite3 CONFIG REQUIRED) + add_library(SQLite3::SQLite3 ALIAS unofficial::sqlite3::sqlite3) else() find_package(SQLite3 3.7.17 REQUIRED) + if(NOT TARGET SQLite3::SQLite3) # CMake < 4.3 + add_library(SQLite3::SQLite3 ALIAS SQLite::SQLite3) + endif() endif() endif() cmake_dependent_option(BUILD_WALLET_TOOL "Build bitcoin-wallet tool." ${BUILD_TESTS} "ENABLE_WALLET" OFF) diff --git a/depends/packages/native_qt.mk b/depends/packages/native_qt.mk index 18cbc6d90e3..d34dd78201d 100644 --- a/depends/packages/native_qt.mk +++ b/depends/packages/native_qt.mk @@ -10,6 +10,7 @@ $(package)_patches += qtbase-moc-ignore-gcc-macro.patch $(package)_patches += qtbase_skip_tools.patch $(package)_patches += rcc_hardcode_timestamp.patch $(package)_patches += qttools_skip_dependencies.patch +$(package)_patches += fix-macos26-qyield.patch $(package)_qttranslations_file_name=$(qt_details_qttranslations_file_name) $(package)_qttranslations_sha256_hash=$(qt_details_qttranslations_sha256_hash) @@ -134,7 +135,8 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/qtbase-moc-ignore-gcc-macro.patch && \ patch -p1 -i $($(package)_patch_dir)/qtbase_skip_tools.patch && \ patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \ - patch -p1 -i $($(package)_patch_dir)/qttools_skip_dependencies.patch + patch -p1 -i $($(package)_patch_dir)/qttools_skip_dependencies.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix-macos26-qyield.patch endef define $(package)_config_cmds diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk index 6b2f74f591b..df8e531ef5c 100644 --- a/depends/packages/qt.mk +++ b/depends/packages/qt.mk @@ -25,6 +25,7 @@ $(package)_patches += fix-gcc16-sfinae-qregularexpression.patch $(package)_patches += fix-gcc16-sfinae-qchar.patch $(package)_patches += fix-gcc16-sfinae-qbitarray.patch $(package)_patches += fix-gcc16-sfinae-qanystringview.patch +$(package)_patches += fix-macos26-qyield.patch $(package)_patches += fix-qbytearray-include.patch $(package)_qttranslations_file_name=$(qt_details_qttranslations_file_name) @@ -276,6 +277,7 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/fix-gcc16-sfinae-qchar.patch && \ patch -p1 -i $($(package)_patch_dir)/fix-gcc16-sfinae-qbitarray.patch && \ patch -p1 -i $($(package)_patch_dir)/fix-gcc16-sfinae-qanystringview.patch && \ + patch -p1 -i $($(package)_patch_dir)/fix-macos26-qyield.patch && \ patch -p1 -i $($(package)_patch_dir)/fix-qbytearray-include.patch endef ifeq ($(host),$(build)) diff --git a/depends/patches/qt/fix-macos26-qyield.patch b/depends/patches/qt/fix-macos26-qyield.patch new file mode 100644 index 00000000000..65514a01cc8 --- /dev/null +++ b/depends/patches/qt/fix-macos26-qyield.patch @@ -0,0 +1,44 @@ +commit a76004f16fdc43e1b7af83bfdf3f1a613491b234 +Author: Paul Wicking +Date: Thu Mar 26 07:09:43 2026 +0100 + + qyieldcpu: Fix compilation with macOS 26.4 SDK + + After updating to the macOS 26.4 SDK, qtbase fails to compile on + Apple Silicon with an implicit function declaration error for + __yield() in qyieldcpu.h. It appears that the SDK's Clang now + reports __has_builtin(__yield) as true, but __yield() requires + for its declaration. + + The compiler's own __builtin_arm_yield intrinsic was already checked + further down in the cascade. Moving it above the __yield check resolves + the build failure, without unnecessarily pulling in the header. + + Fixes: QTBUG-145239 + Change-Id: I94b4d8f72385a4944c272ed7a66d249537a82e7d + Reviewed-by: Tor Arne Vestbø + Reviewed-by: Fabian Kosmale + +--- a/qtbase/src/corelib/thread/qyieldcpu.h ++++ b/qtbase/src/corelib/thread/qyieldcpu.h +@@ -31,7 +31,9 @@ void qYieldCpu(void) + noexcept + #endif + { +-#if __has_builtin(__yield) ++#if __has_builtin(__builtin_arm_yield) ++ __builtin_arm_yield(); ++#elif __has_builtin(__yield) + __yield(); // Generic + #elif defined(_YIELD_PROCESSOR) && defined(Q_CC_MSVC) + _YIELD_PROCESSOR(); // Generic; MSVC's +@@ -45,9 +47,6 @@ void qYieldCpu(void) + _mm_pause(); + #elif defined(Q_PROCESSOR_X86) + __asm__("pause"); // hopefully asm() works in this compiler +- +-#elif __has_builtin(__builtin_arm_yield) +- __builtin_arm_yield(); + #elif defined(Q_PROCESSOR_ARM) && Q_PROCESSOR_ARM >= 7 && defined(Q_CC_GNU) + __asm__("yield"); // this works everywhere + diff --git a/doc/release-notes.md b/doc/release-notes.md index 2147de3985e..56d97cf728f 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -43,6 +43,8 @@ Notable changes ### Wallet - #34358 wallet: fix removeprunedfunds bug with conflicting transactions +- #34870 wallet: feebumper, fix crash when combined bump fee is unavailable +- #34888 wallet: fix amount computed as boolean in coin selection ### Net @@ -66,6 +68,8 @@ Notable changes - #34713 depends: Allow building Qt packages after interruption - #34754 depends: Qt fixes for GCC 16 compatibility - #34787 build: fix native macOS deployment +- #34848 cmake: Migrate away from deprecated SQLite3 target +- #34956 depends, qt: Fix build on aarch64 macOS 26.4 ### Test @@ -76,6 +80,7 @@ Notable changes - #34445 fuzz: Use AFL_SHM_ID for naming test directories - #34608 test: Fix broken --valgrind handling after bitcoin wrapper - #34690 test: Add missing timeout_factor to zmq socket +- #34869 tests: applied PYTHON_GIL to the env for every test ### Util @@ -108,10 +113,13 @@ Thanks to everyone who directly contributed to this release: - ANAVHEOBA - brunoerg +- Daniel Pfeifer - darosior - fanquake +- furszy - Hennadii Stepanov - jayvaliya +- kevkevinpal - Lőrinc - m3dwards - marcofleon diff --git a/src/wallet/CMakeLists.txt b/src/wallet/CMakeLists.txt index 8ec381df5a8..36fd3ef95ae 100644 --- a/src/wallet/CMakeLists.txt +++ b/src/wallet/CMakeLists.txt @@ -38,8 +38,7 @@ target_link_libraries(bitcoin_wallet PRIVATE core_interface bitcoin_common - $ - $ + SQLite3::SQLite3 univalue Boost::headers $ diff --git a/src/wallet/feebumper.cpp b/src/wallet/feebumper.cpp index d55c4cfe3bb..b3d2d95b7fe 100644 --- a/src/wallet/feebumper.cpp +++ b/src/wallet/feebumper.cpp @@ -80,9 +80,10 @@ static feebumper::Result CheckFeeRate(const CWallet& wallet, const CMutableTrans reused_inputs.push_back(txin.prevout); } - std::optional combined_bump_fee = wallet.chain().calculateCombinedBumpFee(reused_inputs, newFeerate); + const std::optional combined_bump_fee = wallet.chain().calculateCombinedBumpFee(reused_inputs, newFeerate); if (!combined_bump_fee.has_value()) { errors.push_back(Untranslated(strprintf("Failed to calculate bump fees, because unconfirmed UTXOs depend on an enormous cluster of unconfirmed transactions."))); + return feebumper::Result::WALLET_ERROR; } CAmount new_total_fee = newFeerate.GetFee(maxTxSize) + combined_bump_fee.value(); diff --git a/src/wallet/spend.cpp b/src/wallet/spend.cpp index 5654c8f3d49..dc34060d729 100644 --- a/src/wallet/spend.cpp +++ b/src/wallet/spend.cpp @@ -928,7 +928,7 @@ util::Result AutomaticCoinSelection(const CWallet& wallet, Coin if (group.m_ancestors >= max_ancestors || group.m_descendants >= max_descendants) total_unconf_long_chain += group.GetSelectionAmount(); } - if (CAmount total_amount = available_coins.GetTotalAmount() - total_discarded < value_to_select) { + if (CAmount total_amount = available_coins.GetTotalAmount() - total_discarded; total_amount < value_to_select) { // Special case, too-long-mempool cluster. if (total_amount + total_unconf_long_chain > value_to_select) { return util::Error{_("Unconfirmed UTXOs are available, but spending them creates a chain of transactions that will be rejected by the mempool")}; diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 56522aa6ffd..6136cce2e58 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -550,6 +550,11 @@ def main(): def run_tests(*, test_list, build_dir, tmpdir, jobs=1, enable_coverage=False, args=None, combined_logs_len=0, failfast=False, use_term_control, results_filepath=None): args = args or [] + # Some optional Python dependencies (e.g. pycapnp) may emit warnings or fail under + # CPython free-threaded builds when the GIL is disabled. Force it on for all + # functional tests so every child process inherits PYTHON_GIL=1. + os.environ["PYTHON_GIL"] = "1" + # Warn if bitcoind is already running try: # pgrep exits with code zero when one or more matching processes found