Merge bitcoin/bitcoin#34856: [30.x] Backports

75d707b307 doc: update release notes for v30.x (fanquake)
6bba04ba73 depends, qt: Fix build on aarch64 macOS 26.4 (Hennadii Stepanov)
84c2f003b3 wallet: feebumper, fix crash when combined bump fee is unavailable (furszy)
f05988aa05 wallet: fix amount computed as boolean in coin selection (furszy)
72d2b85414 tests: applied PYTHON_GIL to the env for every test (kevkevinpal)
fde84b822e cmake: Migrate away from deprecated SQLite3 target (Daniel Pfeifer)

Pull request description:

  Backports:
  * #34848
  * #34869
  * #34870
  * #34888
  * #34956

ACKs for top commit:
  marcofleon:
    lgtm ACK 75d707b307

Tree-SHA512: 5bbb3f5480a376105644b10b64af6bc7c04eb9ff7ef3a31b586a018441d1aed6dee24c91862ebae0dd3792b2caa76f7f87d94be58f8a42ed696c382cd26c5e4e
This commit is contained in:
merge-script
2026-04-07 22:22:46 +08:00
9 changed files with 70 additions and 5 deletions

View File

@@ -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)

View File

@@ -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

View File

@@ -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))

View File

@@ -0,0 +1,44 @@
commit a76004f16fdc43e1b7af83bfdf3f1a613491b234
Author: Paul Wicking <paul.wicking@qt.io>
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
<arm_acle.h> 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ø <tor.arne.vestbo@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
--- 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 <atomic>
@@ -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

View File

@@ -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

View File

@@ -38,8 +38,7 @@ target_link_libraries(bitcoin_wallet
PRIVATE
core_interface
bitcoin_common
$<TARGET_NAME_IF_EXISTS:unofficial::sqlite3::sqlite3>
$<TARGET_NAME_IF_EXISTS:SQLite::SQLite3>
SQLite3::SQLite3
univalue
Boost::headers
$<TARGET_NAME_IF_EXISTS:USDT::headers>

View File

@@ -80,9 +80,10 @@ static feebumper::Result CheckFeeRate(const CWallet& wallet, const CMutableTrans
reused_inputs.push_back(txin.prevout);
}
std::optional<CAmount> combined_bump_fee = wallet.chain().calculateCombinedBumpFee(reused_inputs, newFeerate);
const std::optional<CAmount> 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();

View File

@@ -928,7 +928,7 @@ util::Result<SelectionResult> 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")};

View File

@@ -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