From b0831553f465203a31c7b871d520b65832f84908 Mon Sep 17 00:00:00 2001 From: Andrew Chow Date: Fri, 3 Feb 2023 17:32:35 -0500 Subject: [PATCH 1/3] Merge bitcoin/bitcoin#25966: test: Remove redundant test fb1c6c14c11ccd4833c1a24f77c507f098d369ad test: Remove redundant test (yancy) Pull request description: I can't think of any reason to keep this test case around labeled [fix me](https://github.com/bitcoin/bitcoin/blob/master/src/wallet/test/coinselector_tests.cpp#L242). The test was originally added [here](https://github.com/bitcoin/bitcoin/commit/4566ab75f277612425337bf7786c1d3a410d894a) however there was never an assertion about the coins that should be selected, only that a solution is found (which is a redundant solution to the test [above](https://github.com/bitcoin/bitcoin/blob/master/src/wallet/test/coinselector_tests.cpp#L222)). The comment was later added here to [fix](https://github.com/bitcoin/bitcoin/commit/384273260a6ccbcf79dade0830011f528e5a1581) it, however it's unclear what exactly it's testing. A test was later added [here](https://github.com/bitcoin/bitcoin/blob/master/src/wallet/test/coinselector_tests.cpp#L366) where if the [long term fee](https://github.com/bitcoin/bitcoin/blob/master/src/wallet/test/coinselector_tests.cpp#L357) is less than the current [fee](https://github.com/bitcoin/bitcoin/blob/master/src/wallet/test/coinselector_tests.cpp#L356), then select fewer UTXOs, which may have been the original intent. ACKs for top commit: S3RK: ACK fb1c6c14c11ccd4833c1a24f77c507f098d369ad Zero-1729: Concept ACK fb1c6c14c11ccd4833c1a24f77c507f098d369ad achow101: ACK fb1c6c14c11ccd4833c1a24f77c507f098d369ad Tree-SHA512: bce2cdae669c144ffaa130237a1643e3b6728e13d603cebf5d9493c4c7c68b3635868e4d93d210783c2ded2a871f185ca09a2053168c05b26a1e056ff6edf68f --- src/wallet/test/coinselector_tests.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/wallet/test/coinselector_tests.cpp b/src/wallet/test/coinselector_tests.cpp index d37916737f6c..d221bb20230f 100644 --- a/src/wallet/test/coinselector_tests.cpp +++ b/src/wallet/test/coinselector_tests.cpp @@ -240,17 +240,6 @@ BOOST_AUTO_TEST_CASE(bnb_search_test) BOOST_CHECK_EQUAL(result5->GetSelectedValue(), 10 * CENT); expected_result.Clear(); - // Negative effective value - // Select 10 Cent but have 1 Cent not be possible because too small - add_coin(5 * CENT, 5, expected_result); - add_coin(3 * CENT, 3, expected_result); - add_coin(2 * CENT, 2, expected_result); - const auto result6 = SelectCoinsBnB(GroupCoins(utxo_pool), 10 * CENT, 5000); - BOOST_CHECK(result6); - BOOST_CHECK_EQUAL(result6->GetSelectedValue(), 10 * CENT); - // FIXME: this test is redundant with the above, because 1 Cent is selected, not "too small" - // BOOST_CHECK(EquivalentResult(expected_result, *result)); - // Select 0.25 Cent, not possible BOOST_CHECK(!SelectCoinsBnB(GroupCoins(utxo_pool), 0.25 * CENT, 0.5 * CENT)); expected_result.Clear(); From 7711ffb6493b773bbab7332cba771c6978403ae1 Mon Sep 17 00:00:00 2001 From: merge-script Date: Wed, 31 Jul 2024 09:50:10 +0100 Subject: [PATCH 2/3] Merge bitcoin/bitcoin#30452: guix: bump time-machine to efc26826400762207cde9f23802cfe75a737963c 6ee000e56f7ceba82791bc9f6fca59328a2eb0ad guix: bump time-machine to efc26826400762207cde9f23802cfe75a737963c (fanquake) cbeb2c20e1f8076a9789436816ccb72b59a471c3 guix: patch /gnu/store paths out of winpthreads (fanquake) Pull request description: Needed for https://github.com/bitcoin/bitcoin/issues/30210. This doesn't switch runtimes, because upstream is still configured to use the old runtime. See: https://git.savannah.gnu.org/cgit/guix.git/commit/?id=17188be0f723e00377b21b767f5447d7938a116e. git-mimimal `2.45.1` -> `2.45.2` Kernel Headers `6.1.92` -> `6.1.100` LLVM `18.1.6` -> `18.1.8` mingw-w64 `11.0.1` -> `12.0.0` NSIS `3.09` -> `3.10` patch `2.7.6` -> `2.7.6-0.f144b35` ACKs for top commit: TheCharlatan: ACK 6ee000e56f7ceba82791bc9f6fca59328a2eb0ad Tree-SHA512: f4f99d16dd8cab5b2b7c5d82111af86de20e1669cc3b4054d72ab4a67b2956757df170f0df28c96d18653c1c9d2ebdd0ecc441005726a20cd963d98513b4a851 --- contrib/devtools/symbol-check.py | 2 +- contrib/guix/libexec/prelude.bash | 2 +- contrib/guix/manifest.scm | 8 ++++++-- contrib/guix/patches/gcc-remap-guix-store.patch | 15 +++++---------- .../patches/winpthreads-remap-guix-store.patch | 17 +++++++++++++++++ 5 files changed, 30 insertions(+), 14 deletions(-) create mode 100644 contrib/guix/patches/winpthreads-remap-guix-store.patch diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py index f4b6847a94f5..d6bdb193eb64 100755 --- a/contrib/devtools/symbol-check.py +++ b/contrib/devtools/symbol-check.py @@ -252,7 +252,7 @@ def check_MACHO_sdk(binary) -> bool: return False def check_MACHO_lld(binary) -> bool: - if binary.build_version.tools[0].version == [18, 1, 6]: + if binary.build_version.tools[0].version == [18, 1, 8]: return True return False diff --git a/contrib/guix/libexec/prelude.bash b/contrib/guix/libexec/prelude.bash index e0d653e46cd8..b31ce3772070 100644 --- a/contrib/guix/libexec/prelude.bash +++ b/contrib/guix/libexec/prelude.bash @@ -51,7 +51,7 @@ fi time-machine() { # shellcheck disable=SC2086 guix time-machine --url=https://git.savannah.gnu.org/git/guix.git \ - --commit=f0bb724211872cd6158fce6162e0b8c73efed126 \ + --commit=efc26826400762207cde9f23802cfe75a737963c \ --cores="$JOBS" \ --keep-failed \ --fallback \ diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm index 65d2cf845a2d..aa613f443f82 100644 --- a/contrib/guix/manifest.scm +++ b/contrib/guix/manifest.scm @@ -128,13 +128,17 @@ desirable for building Dash Core release binaries." (package-with-extra-patches binutils (search-our-patches "binutils-unaligned-default.patch"))) +(define (winpthreads-patches mingw-w64-x86_64-winpthreads) + (package-with-extra-patches mingw-w64-x86_64-winpthreads + (search-our-patches "winpthreads-remap-guix-store.patch"))) + (define (make-mingw-pthreads-cross-toolchain target) "Create a cross-compilation toolchain package for TARGET" (let* ((xbinutils (binutils-mingw-patches (cross-binutils target))) (machine (substring target 0 (string-index target #\-))) - (pthreads-xlibc (make-mingw-w64 machine + (pthreads-xlibc (winpthreads-patches (make-mingw-w64 machine #:xgcc (cross-gcc target #:xgcc (gcc-mingw-patches base-gcc)) - #:with-winpthreads? #t)) + #:with-winpthreads? #t))) (pthreads-xgcc (cross-gcc target #:xgcc (gcc-mingw-patches mingw-w64-base-gcc) #:xbinutils xbinutils diff --git a/contrib/guix/patches/gcc-remap-guix-store.patch b/contrib/guix/patches/gcc-remap-guix-store.patch index a47ef7a2df13..a8b41d485b04 100644 --- a/contrib/guix/patches/gcc-remap-guix-store.patch +++ b/contrib/guix/patches/gcc-remap-guix-store.patch @@ -1,14 +1,9 @@ -From aad25427e74f387412e8bc9a9d7bbc6c496c792f Mon Sep 17 00:00:00 2001 -From: Andrew Chow -Date: Wed, 6 Jul 2022 16:49:41 -0400 -Subject: [PATCH] guix: remap guix store paths to /usr +Without ffile-prefix-map, the debug symbols will contain paths for the +guix store which will include the hashes of each package. However, the +hash for the same package will differ when on different architectures. +In order to be reproducible regardless of the architecture used to build +the package, map all guix store prefixes to something fixed, e.g. /usr. ---- - libgcc/Makefile.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in -index 851e7657d07..476c2becd1c 100644 --- a/libgcc/Makefile.in +++ b/libgcc/Makefile.in @@ -854,7 +854,7 @@ endif diff --git a/contrib/guix/patches/winpthreads-remap-guix-store.patch b/contrib/guix/patches/winpthreads-remap-guix-store.patch new file mode 100644 index 000000000000..e1f1a6eba531 --- /dev/null +++ b/contrib/guix/patches/winpthreads-remap-guix-store.patch @@ -0,0 +1,17 @@ +Without ffile-prefix-map, the debug symbols will contain paths for the +guix store which will include the hashes of each package. However, the +hash for the same package will differ when on different architectures. +In order to be reproducible regardless of the architecture used to build +the package, map all guix store prefixes to something fixed, e.g. /usr. + +--- a/mingw-w64-libraries/winpthreads/Makefile.in ++++ b/mingw-w64-libraries/winpthreads/Makefile.in +@@ -478,7 +478,7 @@ top_build_prefix = @top_build_prefix@ + top_builddir = @top_builddir@ + top_srcdir = @top_srcdir@ + SUBDIRS = . tests +-AM_CFLAGS = -Wall -DWIN32_LEAN_AND_MEAN $(am__append_1) ++AM_CFLAGS = -Wall -DWIN32_LEAN_AND_MEAN $(am__append_1) $(shell find /gnu/store -maxdepth 1 -mindepth 1 -type d -exec echo -n " -ffile-prefix-map={}=/usr" \;) + ACLOCAL_AMFLAGS = -I m4 + lib_LTLIBRARIES = libwinpthread.la + include_HEADERS = include/pthread.h include/sched.h include/semaphore.h include/pthread_unistd.h include/pthread_time.h include/pthread_compat.h include/pthread_signal.h From 8588fab46dd6ac904030b3c18953f903fb6bd07b Mon Sep 17 00:00:00 2001 From: fanquake Date: Fri, 17 Nov 2023 15:37:38 +0000 Subject: [PATCH 3/3] Merge bitcoin/bitcoin#28900: doc: remove mingw-w64 install for "older" systems 656a7e9de626ea76f377c7e1e3370a869d7bcca9 doc: remove mingw-w64 install for "older" systems (fanquake) Pull request description: Now that we require GCC 10.1+, the posix variant is available on supported systems. i.e: https://packages.debian.org/bullseye/g++-mingw-w64-x86-64-posix https://packages.ubuntu.com/jammy/g++-mingw-w64-x86-64-posix ACKs for top commit: maflcko: ACK 656a7e9de626ea76f377c7e1e3370a869d7bcca9 BrandonOdiwuor: ACK 656a7e9de626ea76f377c7e1e3370a869d7bcca9 hebasto: ACK 656a7e9de626ea76f377c7e1e3370a869d7bcca9. Tree-SHA512: b7d3696ad5d0322c107ced5750d20c40167caaf7d063cf01da5fc12c4086827f4f73185aa5cc9ac170778b0523c0c16cca3b2419b11019da9d30b936ee897e14 --- doc/build-windows.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/doc/build-windows.md b/doc/build-windows.md index 3670b59cf71f..91d1b86cef54 100644 --- a/doc/build-windows.md +++ b/doc/build-windows.md @@ -39,16 +39,9 @@ See [dependencies.md](dependencies.md) for a complete overview. ## Building for 64-bit Windows The first step is to install the mingw-w64 cross-compilation tool chain: - - on modern systems (Ubuntu 21.04 Hirsute Hippo or newer, Debian 11 Bullseye or newer): ```sh sudo apt install g++-mingw-w64-x86-64-posix -``` - - - on older systems: - -```sh -sudo apt install g++-mingw-w64-x86-64 ``` Once the toolchain is installed the build steps are common: