build: Require C++20 compiler #28349

pull maflcko wants to merge 5 commits into bitcoin:master from maflcko:2308-c++20- changing 11 files +26 −51
  1. maflcko commented at 8:56 am on August 27, 2023: member

    C++20 allows to write safer code, because it allows to enforce more stuff at compile time (constinit, conteval, constexpr, std::span, …).

    Also, it allows to write less verbose and easier to understand code (C++ 20 Concepts).

    See #23363 and https://en.cppreference.com/w/cpp/compiler_support#cpp20

    With g++-10 (https://github.com/bitcoin/bitcoin/pull/28348) and clang-13 (https://github.com/bitcoin/bitcoin/pull/28210), there is broad support for almost all features of C++20.

    It should be fine to require a C++20 compiler for Bitcoin Core 27.0 in 2024 (next year), not the soon upcoming 26.0 next month.

    This pull request includes three small cleanups to make use of C++20 features. If any issues are detected before or after merge, this should be easy to revert. If no issues arise, it should be fine to make use of more involved C++20 features later on.

  2. DrahtBot commented at 8:56 am on August 27, 2023: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK fanquake

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #26593 (tracing: Only prepare tracepoint arguments when actually tracing by 0xB10C)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  3. DrahtBot renamed this:
    build: Require C++20 compiler
    build: Require C++20 compiler
    on Aug 27, 2023
  4. DrahtBot added the label Build system on Aug 27, 2023
  5. maflcko commented at 9:01 am on August 27, 2023: member
    Not sure why CI fails. Does ./depends/ support C++20?
  6. in src/test/fuzz/fuzz.cpp:74 in de8355cd12 outdated
    66@@ -67,7 +67,7 @@ auto& FuzzTargets()
    67 
    68 void FuzzFrameworkRegisterTarget(std::string_view name, TypeTestOneInput target, FuzzTargetOptions opts)
    69 {
    70-    const auto it_ins{FuzzTargets().try_emplace(name, FuzzTarget /* temporary can be dropped in C++20 */ {std::move(target), std::move(opts)})};
    71+    const auto it_ins{FuzzTargets().try_emplace(name, std::move(target), std::move(opts))};
    


    maflcko commented at 9:30 am on August 27, 2023:

    https://github.com/bitcoin/bitcoin/actions/runs/5989963678/job/16246763442#step:7:2565

     0   CXX      test/fuzz/libtest_fuzz_a-fuzz.o
     1In file included from test/fuzz/fuzz.cpp:5:
     2In file included from ./test/fuzz/fuzz.h:8:
     3In file included from ./span.h:8:
     4In file included from /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
     5In file included from /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/functional:495:
     6In file included from /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/bind_front.h:14:
     7In file included from /Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__functional/perfect_forward.h:14:
     8/Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/tuple:1522:7: error: no matching constructor for initialization of 'FuzzTarget'
     9      second(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...)
    10      ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    11/Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__utility/pair.h:252:11: note: in instantiation of function template specialization 'std::pair<const std::string_view, FuzzTarget>::pair<const std::string_view &, std::function<void (Span<const unsigned char>)> &&, FuzzTargetOptions &&, 0UL, 0UL, 1UL>' requested here
    12        : pair(__pc, __first_args, __second_args,
    13          ^
    14/Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/construct_at.h:37:38: note: in instantiation of function template specialization 'std::pair<const std::string_view, FuzzTarget>::pair<const std::string_view &, std::function<void (Span<const unsigned char>)> &&, FuzzTargetOptions &&>' requested here
    15    return ::new ((void*)__location) _Tp(_VSTD::forward<_Args>(__args)...);
    16                                     ^
    17/Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/allocator_traits.h:298:16: note: in instantiation of function template specialization 'std::construct_at<std::pair<const std::string_view, FuzzTarget>, const std::piecewise_construct_t &, std::tuple<const std::string_view &>, std::tuple<std::function<void (Span<const unsigned char>)> &&, FuzzTargetOptions &&>, std::pair<const std::string_view, FuzzTarget> *>' requested here
    18        _VSTD::construct_at(__p, _VSTD::forward<_Args>(__args)...);
    19               ^
    20/Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__tree:2136:20: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<std::__tree_node<std::__value_type<std::string_view, FuzzTarget>, void *>>>::construct<std::pair<const std::string_view, FuzzTarget>, const std::piecewise_construct_t &, std::tuple<const std::string_view &>, std::tuple<std::function<void (Span<const unsigned char>)> &&, FuzzTargetOptions &&>, void, void>' requested here
    21    __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), _VSTD::forward<_Args>(__args)...);
    22                   ^
    23/Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__tree:2098:29: note: in instantiation of function template specialization 'std::__tree<std::__value_type<std::string_view, FuzzTarget>, std::__map_value_compare<std::string_view, std::__value_type<std::string_view, FuzzTarget>, std::less<std::string_view>, true>, std::allocator<std::__value_type<std::string_view, FuzzTarget>>>::__construct_node<const std::piecewise_construct_t &, std::tuple<const std::string_view &>, std::tuple<std::function<void (Span<const unsigned char>)> &&, FuzzTargetOptions &&>>' requested here
    24        __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
    25                            ^
    26/Applications/Xcode_14.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/map:1235:24: note: in instantiation of function template specialization 'std::__tree<std::__value_type<std::string_view, FuzzTarget>, std::__map_value_compare<std::string_view, std::__value_type<std::string_view, FuzzTarget>, std::less<std::string_view>, true>, std::allocator<std::__value_type<std::string_view, FuzzTarget>>>::__emplace_unique_key_args<std::string_view, const std::piecewise_construct_t &, std::tuple<const std::string_view &>, std::tuple<std::function<void (Span<const unsigned char>)> &&, FuzzTargetOptions &&>>' requested here
    27        return __tree_.__emplace_unique_key_args(__k,
    28                       ^
    29test/fuzz/fuzz.cpp:70:37: note: in instantiation of function template specialization 'std::map<std::string_view, FuzzTarget>::try_emplace<std::function<void (Span<const unsigned char>)>, FuzzTargetOptions>' requested here
    30    const auto it_ins{FuzzTargets().try_emplace(name, std::move(target), std::move(opts))};
    31                                    ^
    32test/fuzz/fuzz.cpp:57:8: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
    33struct FuzzTarget {
    34       ^
    35test/fuzz/fuzz.cpp:57:8: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 2 were provided
    36test/fuzz/fuzz.cpp:57:8: note: candidate constructor (the implicit default constructor) not viable: requires 0 arguments, but 2 were provided
    371 error generated.
    

    fanquake commented at 10:40 am on August 27, 2023:
    I assume the problem here is that macOS is going to need a newer version of the SDK for (better) c++20 support

    maflcko commented at 10:43 am on August 27, 2023:

    I am not sure if this even a C++20 feature, or something else: #28065 (review)

    I guess I’ll just drop it from this pull, unless someone with a macOS wants to spend time on this.


    maflcko commented at 11:17 am on October 3, 2023:
    Looks like this also happens on Ubuntu clang-13, so I’ll drop commit c3d6f193c806c9ec1bc052e228ae84af97af89e0 for now
  7. DrahtBot added the label CI failed on Aug 27, 2023
  8. hebasto commented at 12:58 pm on August 27, 2023: member

    Not sure why CI fails. Does ./depends/ support C++20?

     0--- a/depends/Makefile
     1+++ b/depends/Makefile
     2@@ -49,7 +49,7 @@ NO_HARDEN ?=
     3 FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
     4 
     5 C_STANDARD ?= c11
     6-CXX_STANDARD ?= c++17
     7+CXX_STANDARD ?= c++20
     8 
     9 BUILD = $(shell ./config.guess)
    10 HOST ?= $(BUILD)
    

    ?

  9. hebasto commented at 1:23 pm on August 27, 2023: member

    https://cirrus-ci.com/task/5662608053764096:

    g++: error: unrecognized command line option ‘-std=c++20’; did you mean ‘-std=c++2a’?

    funny…

  10. maflcko commented at 1:31 pm on August 27, 2023: member
    Ok, looks like this is passing. The remaining errors should go away once and if this is rebased on the bump pull requests.
  11. maflcko added the label Needs rebase on Aug 27, 2023
  12. hebasto commented at 1:36 pm on August 27, 2023: member

    cirrus-ci.com/task/5662608053764096:

    g++: error: unrecognized command line option ‘-std=c++20’; did you mean ‘-std=c++2a’?

    funny…

    It seems we should require GCC >= 10 first. See: https://gcc.gnu.org/projects/cxx-status.html.

  13. maflcko commented at 2:12 pm on August 27, 2023: member

    It seems we should require GCC >= 10 first. See: https://gcc.gnu.org/projects/cxx-status.html.

    Yes, I am aware, see the pull request description and my previous comment.

  14. ajtowns commented at 3:00 pm on August 27, 2023: contributor

    FWIW, I get a configure.ac error with clang 14 and libstdc++ 13 – configure: error: cannot figure out how to use std::atomic. Seems to be due to clang not correctly implementing consteval prior to clang++-15. Using clang’s libc++ (apt-get install libc++abi-dev libc++-dev and -stdlib=libc++) seems like it might fix it.

     0$ head -n31 build-aux/m4/l_atomic.m4  | tail -n19  > testing.cpp
     1$ clang++ -std=c++17 -stdlib=libc++ -o testing -Wall -W testing.cpp
     2$ clang++ -std=c++20 -stdlib=libc++ -o testing -Wall -W testing.cpp
     3$ clang++ -std=c++17 -o testing -Wall -W testing.cpp
     4$ clang++ -std=c++20 -o testing -Wall -W testing.cpp
     5In file included from testing.cpp:3:
     6/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: error: call to consteval function 'std::chrono::hh_mm_ss::_S_fractional_width' is not a constant expression
     7        static constexpr unsigned fractional_width = {_S_fractional_width()};
     8                                                      ^
     9/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: note: undefined function '_S_fractional_width' cannot be used in a constant expression
    10/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2275:2: note: declared here
    11        _S_fractional_width()
    12        ^
    131 error generated.
    14$ clang++-15 -std=c++20 -o testing -Wall -W testing.cpp
    15$ clang++ --version
    16Debian clang version 14.0.6
    17Target: x86_64-pc-linux-gnu
    18Thread model: posix
    19InstalledDir: /usr/bin
    
  15. DrahtBot removed the label Needs rebase on Aug 27, 2023
  16. maflcko commented at 3:12 pm on August 27, 2023: member

    FWIW, I get a configure.ac error with clang 14 and libstdc++ 13

    Ugh, that seems like a blocker, given that clang-14 seems still to be the default for the current Debian stable (https://packages.debian.org/bookworm/clang) and even trixie (for now).

    configure: error: cannot figure out how to use std::atomic

    If this was the only error, I wonder if it will go away with the cmake transition, or if we can work around it, but I doubt it and expect almost any code to fail to compile.

  17. ajtowns commented at 4:19 pm on August 27, 2023: contributor

    If this was the only error, I wonder if it will go away with the cmake transition, or if we can work around it, but I doubt it and expect almost any code to fail to compile.

    I think it’s specific to atomic<chrono::duration> as specified in parts of gcc’s libstdc++ headers bracketed by #if c++20… Could just decide we’re not going to use atomic<duration>.

  18. ajtowns commented at 4:59 am on August 28, 2023: contributor

    If this was the only error, I wonder if it will go away with the cmake transition, or if we can work around it, but I doubt it and expect almost any code to fail to compile.

    I think it’s specific to atomic<chrono::duration> as specified in parts of gcc’s libstdc++ headers bracketed by #if c++20… Could just decide we’re not going to use atomic<duration>.

    Ah, it’s worse than that – clang++-14 can’t deal with libstdc++’s chrono header at all in c++20 mode.

    0$ cat testing.cpp
    1#include <chrono>
    2int main() { return 0; }
    3$ clang++-14 -std=c++20 -o testing -Wall -W testing.cpp
    4In file included from testing.cpp:1:
    5/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: error: call to consteval function 'std::chrono::hh_mm_ss::_S_fractional_width' is not a constant expression
    6        static constexpr unsigned fractional_width = {_S_fractional_width()};
    

    Using libc++ with CC=clang-14 CXX='env clang++-14 -stdlib=libc++' LDFLAGS='-stdlib=libc++' almost works, but Db::verify with clang’s ostream isn’t available for linking (using system libdb5.3++, not depends build):

    0/usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-bdb.o): in function `wallet::BerkeleyDatabase::Verify(bilingual_str&)':
    1./src/./src/wallet/bdb.cpp:327:(.text+0x3367): undefined reference to `Db::verify(char const*, char const*, std::__1::basic_ostream<char, std::__1::char_traits<char> >*, unsigned int)'
    
  19. maflcko commented at 5:57 am on August 28, 2023: member

    Using libc++ with CC=clang-14 CXX='env clang++-14 -stdlib=libc++' LDFLAGS='-stdlib=libc++' almost works, but Db::verify with clang’s ostream isn’t available for linking (using system libdb5.3++, not depends build):

    Yeah, that should be a known “issue”, unrelated to C++20.

  20. maflcko commented at 7:25 am on August 28, 2023: member

    Ah, it’s worse than that – clang++-14 can’t deal with libstdc++’s chrono header at all in c++20 mode.

    So to clarify, this is only a bug with clang++-14 and libstdc++-13? If so, the only operating system that ships with this config is Debian 13 Trixie, which is your operating system? If so, I’d suggest to just fix it upstream by bumping the default clang version in Debian.

  21. ajtowns commented at 7:49 am on August 28, 2023: contributor

    Using libc++ with CC=clang-14 CXX='env clang++-14 -stdlib=libc++' LDFLAGS='-stdlib=libc++' almost works, but Db::verify with clang’s ostream isn’t available for linking (using system libdb5.3++, not depends build):

    Yeah, that should be a known “issue”, unrelated to C++20.

    Yeah… I guess we could do C++20 with the following options on linux:

    • gcc 10 or above should be fine
    • clang 15 or above should be fine
    • clang 13/14 – use libc++ and depends build of libdb++

    Probably want an autoconf macro to check for the latter case?

  22. maflcko commented at 7:54 am on August 28, 2023: member
  23. maflcko commented at 7:58 am on August 28, 2023: member
    • clang 13/14 – use libc++ and depends build of libdb++

    Probably want an autoconf macro to check for the latter case?

    Sgtm, but maybe check the status of the autoconf and bdb removal before spending time on this? :sweat_smile:

  24. ajtowns commented at 12:14 pm on August 28, 2023: contributor

    Ah, it’s worse than that – clang++-14 can’t deal with libstdc++’s chrono header at all in c++20 mode.

    So to clarify, this is only a bug with clang++-14 and libstdc++-13? If so, the only operating system that ships with this config is Debian 13 Trixie, which is your operating system? If so, I’d suggest to just fix it upstream by bumping the default clang version in Debian.

    Yes, this seems correct! Seems like a non-problem then.

  25. fanquake added this to the milestone 27.0 on Sep 26, 2023
  26. fanquake commented at 1:54 pm on October 2, 2023: member
    Our depends version of Qt is also going to be a blocker here. We’ll need to move along to a more recent point release for improved C++20 support.
  27. hebasto commented at 5:24 pm on October 2, 2023: member

    Our depends version of Qt is also going to be a blocker here. We’ll need to move along to a more recent point release for improved C++20 support.

    Sorry if I missed something that was mentioned previously, but what is wrong in Qt 5.15.5 with C++20 support?

    With this diff:

     0diff --git a/depends/Makefile b/depends/Makefile
     1index 3169117633..319c3498df 100644
     2--- a/depends/Makefile
     3+++ b/depends/Makefile
     4@@ -49,7 +49,7 @@ NO_HARDEN ?=
     5 FALLBACK_DOWNLOAD_PATH ?= https://bitcoincore.org/depends-sources
     6 
     7 C_STANDARD ?= c11
     8-CXX_STANDARD ?= c++17
     9+CXX_STANDARD ?= c++20
    10 
    11 BUILD = $(shell ./config.guess)
    12 HOST ?= $(BUILD)
    13diff --git a/depends/packages/qt.mk b/depends/packages/qt.mk
    14index 136ce32579..ef30878e65 100644
    15--- a/depends/packages/qt.mk
    16+++ b/depends/packages/qt.mk
    17@@ -39,7 +39,7 @@ $(package)_config_opts_release += -silent
    18 $(package)_config_opts_debug = -debug
    19 $(package)_config_opts_debug += -optimized-tools
    20 $(package)_config_opts += -bindir $(build_prefix)/bin
    21-$(package)_config_opts += -c++std c++17
    22+$(package)_config_opts += -c++std c++2a
    23 $(package)_config_opts += -confirm-license
    24 $(package)_config_opts += -hostprefix $(build_prefix)
    25 $(package)_config_opts += -no-compile-examples
    

    everything compiles. Did not test cross-compiling, however.

    A quick look at https://github.com/qt/qtbase/compare/v5.15.5-lts-lgpl..v5.15.10-lts-lgpl shows that support for C++23 has been added. But we are talking about C++20, right?

  28. fanquake commented at 5:29 pm on October 2, 2023: member

    Last I looked there were fixes since 5.15.5 that we needed, and things didn’t work.

    Did not test cross-compiling, however.

    What do you mean by “everything”? Probably also worth checking cross-compilation before claiming it works?

  29. hebasto commented at 5:31 pm on October 2, 2023: member

    Last I looked there were fixes since 5.15.5 that we needed, and things didn’t work.

    Why not just sharing known steps to reproduce “things didn’t work”?

  30. fanquake commented at 5:33 pm on October 2, 2023: member
    Because I tested it as part of a different change, months ago, and don’t have a trivial reproducer on hand.
  31. fanquake commented at 6:21 pm on October 2, 2023: member

    With this diff: everything compiles.

    The first thing I tested after applying your diff failed to compile. Master (fd8ab08558ccfb62f2d0a64d2d0d4dcefba977bc) + #28543 + the diff above:

     0Build type: macx-clang (x86_64, CPU features: cx16 mmx sse sse2 sse3 ssse3 sse4.1)
     1Compiler: clang (Apple) 15.0.0
     2Configuration: sse2 aesni sse3 ssse3 sse4_1 sse4_2 avx avx2 avx512f avx512bw avx512cd avx512dq avx512er avx512ifma avx512pf avx512vbmi avx512vl f16c largefile precompile_header rdrnd rdseed shani silent x86SimdAlways release c++11 c++14 c++17 c++1z c++2a reduce_exports static stl
     3Build options:
     4  Mode ................................... release
     5  Optimize release build for size ........ no
     6  Building shared libraries .............. no
     7  Using C standard ....................... C11
     8  Using C++ standard ..................... C++2a
     9  Using ccache ........................... no
    10<snip>
    11compiling ../../corelib/io/qdir.cpp
    12compiling ../../corelib/io/qdiriterator.cpp
    13../../corelib/global/qrandom.cpp:386:30: error: no member named 'is_literal_type' in namespace 'std'
    14        Q_STATIC_ASSERT(std::is_literal_type<SystemAndGlobalGenerators>::value);
    15                        ~~~~~^
    16../../../include/QtCore/../../src/corelib/global/qglobal.h:120:57: note: expanded from macro 'Q_STATIC_ASSERT'
    17#  define Q_STATIC_ASSERT(Condition) static_assert(bool(Condition), #Condition)
    18                                                        ^~~~~~~~~
    19../../corelib/global/qrandom.cpp:386:46: error: 'SystemAndGlobalGenerators' does not refer to a value
    20        Q_STATIC_ASSERT(std::is_literal_type<SystemAndGlobalGenerators>::value);
    21                                             ^
    22../../corelib/global/qrandom.cpp:350:26: note: declared here
    23struct QRandomGenerator::SystemAndGlobalGenerators
    24                         ^
    25../../corelib/global/qrandom.cpp:386:74: error: no member named 'value' in the global namespace
    26        Q_STATIC_ASSERT(std::is_literal_type<SystemAndGlobalGenerators>::value);
    27                                                                       ~~^
    28../../../include/QtCore/../../src/corelib/global/qglobal.h:120:57: note: expanded from macro 'Q_STATIC_ASSERT'
    29#  define Q_STATIC_ASSERT(Condition) static_assert(bool(Condition), #Condition)
    30                                                        ^~~~~~~~~
    31compiling ../../corelib/io/qfile.cpp
    323 errors generated.
    

    Looks like this was fixed upstream in https://github.com/qt/qtbase/commit/df08a21fa4e7139d46ec68bcf264c922789c4f3a, which we don’t yet have until updating. Am I missing something?

  32. maflcko commented at 8:22 am on October 3, 2023: member

    Is it required that qt is compiled under C++20 when Bitcoin Core (and other dependencies) are compiled under C++20?

    If yes, I should probably include that patch hunk in this pull request?

  33. fanquake commented at 8:32 am on October 3, 2023: member

    Is it required that qt is compiled under C++20 when Bitcoin Core (and other dependencies) are compiled under C++20?

    Yes. We’ve always compiled our dependencies this way, and I can’t see a reason to change that now.

  34. maflcko force-pushed on Oct 3, 2023
  35. maflcko commented at 8:41 am on October 3, 2023: member

    Is it required that qt is compiled under C++20 when Bitcoin Core (and other dependencies) are compiled under C++20?

    Yes. We’ve always compiled our dependencies this way, and I can’t see a reason to change that now.

    Thanks, fixed.

  36. in depends/packages/qt.mk:42 in aec17939a5 outdated
    38@@ -39,7 +39,7 @@ $(package)_config_opts_release += -silent
    39 $(package)_config_opts_debug = -debug
    40 $(package)_config_opts_debug += -optimized-tools
    41 $(package)_config_opts += -bindir $(build_prefix)/bin
    42-$(package)_config_opts += -c++std c++17
    43+$(package)_config_opts += -c++std c++20
    


    hebasto commented at 9:04 am on October 3, 2023:
    0$(package)_config_opts += -c++std c++2a
    

    maflcko commented at 9:10 am on October 3, 2023:
    So I guess we’d need qt6 for the c++20 option: https://doc.qt.io/qt-6/qmake-variable-reference.html ?
  37. maflcko force-pushed on Oct 3, 2023
  38. maflcko commented at 12:04 pm on October 3, 2023: member
    Could make sense to test this on macOS (depends) locally, to avoid re-introducing bugs similar to https://github.com/bitcoin/bitcoin/issues/28566
  39. fanquake commented at 2:02 pm on October 3, 2023: member
    If you wanted to see what else will break, could pull in the std::bit change: https://github.com/fanquake/bitcoin/commit/67af0da7ee57361860a435615f92c092db060018. Could also bump assumptions.h and/or start using starts_with in test/fuzz/rpc.cpp.
  40. maflcko commented at 2:12 pm on October 3, 2023: member

    Heh, my goal was to only touch the build system (and tests) here.

    I presume testing the build system changes will be mostly different from testing the actual C++20 source code changes in production code.

    Obviously no objection, if someone is including more changes when testing locally, but I think I’ll keep the changes minimal here.

  41. maflcko commented at 2:24 pm on October 3, 2023: member

    Could also bump assumptions.h

    Not sure what to bump it to. For some reason g++10 has 201709. https://godbolt.org/z/xbY1z4fGM

  42. maflcko commented at 2:26 pm on October 3, 2023: member

    start using starts_with in test/fuzz/rpc.cpp.

    Thanks, done

  43. fanquake commented at 2:51 pm on October 3, 2023: member

    Not sure what to bump it to. For some reason g++10 has 201709. https://godbolt.org/z/xbY1z4fGM

    Hmm. I guess we’ll have to just take that value if we want to require c++20, but also support gcc 10. Looking at https://gcc.gnu.org/projects/cxx-status.html, it seems that most language features are implmented by 10.x.

    It looks like the value was added to GCC 8, with the addition of c++20 features (https://github.com/gcc-mirror/gcc/commit/026a79f70cf33f836ea5275eda72d4870a3041e5), but then didn’t actually get bumped to 202002 until GCC 11 (https://github.com/gcc-mirror/gcc/commit/445430e16bd08ade34637d2346ded40dd49de508), where it was “past time to update this macro”.

  44. maflcko commented at 3:17 pm on October 3, 2023: member

    Hmm. I guess we’ll have to just take that value

    Happy to do that, but I wonder what the check does. The header compat/assumptions.h is not included anywhere, except for one file, where iwyu suggests to drop it.

    Generally I think that assumptions should be put right next to the code that uses them.

    I understand that there are assumptions that hold for all code, but then we should make sure to include the compilation blob at least once in a central part, for example libbitcoinkernel.

  45. maflcko referenced this in commit 77774110f4 on Oct 4, 2023
  46. maflcko commented at 9:30 am on October 4, 2023: member
  47. fanquake referenced this in commit 30b3477507 on Oct 4, 2023
  48. maflcko commented at 9:52 am on October 5, 2023: member

    Looks like CI fails with https://cirrus-ci.com/task/6671857634508800?logs=ci#L1949

     0Build failure. Verbose build follows.
     1+ make deploy V=1
     2Making all in src
     3make[1]: Entering directory '/ci_container_base/ci/scratch/build/bitcoin-x86_64-apple-darwin/src'
     4make[2]: Entering directory '/ci_container_base/ci/scratch/build/bitcoin-x86_64-apple-darwin/src'
     5/usr/bin/ccache env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH /ci_container_base/depends/x86_64-apple-darwin/native/bin/clang++ --target=x86_64-apple-darwin -mmacosx-version-min=11.0 -B/ci_container_base/depends/x86_64-apple-darwin/native/bin -mlinker-version=609 -isysroot/ci_container_base/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers -nostdlibinc -iwithsysroot/usr/include/c++/v1 -iwithsysroot/usr/include -iframeworkwithsysroot/System/Library/Frameworks -std=c++20 -DHAVE_CONFIG_H -I. -I../src/config  -fmacro-prefix-map=/ci_container_base/ci/scratch/build/bitcoin-x86_64-apple-darwin=. -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -DHAVE_BUILD_INFO -DMAC_OSX -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -DPROVIDE_FUZZ_MAIN_FUNCTION -I. -I./minisketch/include -I./secp256k1/include -I./univalue/include -I/ci_container_base/depends/x86_64-apple-darwin/include/  -fdebug-prefix-map=/ci_container_base/ci/scratch/build/bitcoin-x86_64-apple-darwin=. -Wstack-protector -fstack-protector-all -fcf-protection=full   -Werror    -fvisibility=hidden -fPIE -pipe -std=c++20 -O2  -c -o bitcoind-bitcoind.o `test -f 'bitcoind.cpp' || echo './'`bitcoind.cpp
     6In file included from bitcoind.cpp:12:
     7In file included from ./common/args.h:8:
     8In file included from ./common/settings.h:8:
     9./util/fs.h:75:12: error: no matching conversion for functional-style cast from 'std::u8string' (aka 'basic_string<char8_t>') to 'std::filesystem::path'
    10    return std::filesystem::path(std::u8string{utf8_str.begin(), utf8_str.end()});
    11           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    12/ci_container_base/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1/filesystem:763:29: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'const std::filesystem::path' for 1st argument
    13  _LIBCPP_INLINE_VISIBILITY path(const path& __p) : __pn_(__p.__pn_) {}
    14                            ^
    15/ci_container_base/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1/filesystem:764:29: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'std::filesystem::path' for 1st argument
    16  _LIBCPP_INLINE_VISIBILITY path(path&& __p) noexcept
    17                            ^
    18/ci_container_base/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1/filesystem:768:3: note: candidate constructor not viable: no known conversion from 'basic_string<char8_t>' to 'basic_string<std::filesystem::path::value_type>' for 1st argument
    19  path(string_type&& __s, format = format::auto_format) noexcept
    20  ^
    21/ci_container_base/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1/filesystem:772:3: note: candidate template ignored: requirement '__is_pathable<std::basic_string<char8_t, std::char_traits<char8_t>, std::allocator<char8_t>>, false, false, false>::value' was not satisfied [with _Source = std::basic_string<char8_t>]
    22  path(const _Source& __src, format = format::auto_format) {
    23  ^
    24/ci_container_base/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1/filesystem:762:29: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
    25  _LIBCPP_INLINE_VISIBILITY path() noexcept {}
    26                            ^
    27/ci_container_base/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1/filesystem:777:3: note: candidate constructor template not viable: requires at least 2 arguments, but 1 was provided
    28  path(_InputIt __first, _InputIt __last, format = format::auto_format) {
    29  ^
    30/ci_container_base/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1/filesystem:784:3: note: candidate constructor template not viable: requires at least 2 arguments, but 1 was provided
    31  path(const _Source& __src, const locale& __loc, format = format::auto_format);
    32  ^
    33/ci_container_base/depends/SDKs/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers/usr/include/c++/v1/filesystem:786:3: note: candidate constructor template not viable: requires at least 3 arguments, but 1 was provided
    34  path(_InputIt __first, _InputIt _last, const locale& __loc,
    35  ^
    361 error generated.
    37make[2]: *** [Makefile:16287: bitcoind-bitcoind.o] Error 1
    38make[2]: Leaving directory '/ci_container_base/ci/scratch/build/bitcoin-x86_64-apple-darwin/src'
    39make[1]: *** [Makefile:20150: all-recursive] Error 1
    40make[1]: Leaving directory '/ci_container_base/ci/scratch/build/bitcoin-x86_64-apple-darwin/src'
    41make: *** [Makefile:812: all-recursive] Error 1
    42Exit status: 2
    
  49. fanquake commented at 12:31 pm on October 6, 2023: member

    Looks like CI fails with

    My assumption is that a newer version of the macOS SDK is going to be needed, probably from Xcode 14.3 or 15, as that is where most c++20 support has landed in Apples libc++ (We currently use the version from Xcode 12). Note that building this branch, using Xcode 15, targetting -mmacosx-version-min=11.0 work ok.

  50. maflcko commented at 12:54 pm on October 6, 2023: member
    Ah, thanks for taking a look. I presumed this was fixed by #28337, but I guess bumping the SDK will be needed as well.
  51. PastaPastaPasta referenced this in commit 8c641f2dbe on Oct 6, 2023
  52. Frank-GER referenced this in commit f0b8779803 on Oct 13, 2023
  53. maflcko commented at 6:27 am on October 25, 2023: member

    Is it required that qt is compiled under C++20 when Bitcoin Core (and other dependencies) are compiled under C++20?

    Yes. We’ve always compiled our dependencies this way, and I can’t see a reason to change that now.

    Thanks, fixed.

    Looks like this results in a new error now. Steps to reproduce:

    0cd depends && make MULTIPROCESS=1 capnp -j $( nproc )
    

    Output:

    0src/kj/string.h:238:67: warning: in C++20 this comparison calls the current function recursively with reversed arguments
    1  238 | inline bool operator==(const char* a, const String& b) { return b == a; }
    2      |                                                                 ~~^~~~
    

    I wonder if this will be fixed by bumping capnp. Which could make sense independently of the changes here? cc @ryanofsky

  54. ryanofsky commented at 12:51 pm on October 25, 2023: contributor

    I wonder if this will be fixed by bumping capnp. Which could make sense independently of the changes here? cc @ryanofsky

    I wouldn’t say it makes sense independently of the changes here, but bumping would probably be easier than patching. The upstream fix is: https://github.com/capnproto/capnproto/commit/4b35480e18af80b9f0f0c3b9013c2e1ab6d5d7c2 which is pretty recent and only goes back to the 1.0 release, so probably just makes sense to bump to latest 1.01 release

  55. maflcko commented at 12:57 pm on October 25, 2023: member

    I wouldn’t say it makes sense independently of the changes here

    I think it makes sense independently for the following reasons:

    • debian is starting to ship this version in Trixie (https://packages.debian.org/trixie/capnproto), which will likely become the version shipped with Ubuntu 24.04 LTS, so testing with a more recent version in depends makes sense.
    • The feature is currently experimental, so bumping the version shouldn’t cause any production issues.
    • With multiprocess begin a priority project for 27.0, it seems better to do build system changes/bumps early, rather than later, to allow for more time testing them.
  56. maflcko commented at 11:46 am on October 26, 2023: member
  57. maflcko added the label DrahtBot Guix build requested on Oct 26, 2023
  58. DrahtBot commented at 6:30 pm on October 26, 2023: contributor

    Guix builds (on x86_64)

    File commit cb8844e2b9d3ae3cae613c82683660f0fc5222d6(master) commit c785addb8b9911175818f4b8ae1546d6129a0406(master and this pull)
    SHA256SUMS.part 9c1ff8b1084f03e3...
    *-aarch64-linux-gnu-debug.tar.gz a94eb7a39d230df9...
    *-aarch64-linux-gnu.tar.gz a97289204a942c62...
    *-arm-linux-gnueabihf-debug.tar.gz d477c52454e9e56a...
    *-arm-linux-gnueabihf.tar.gz 4faeeb1a6c230ee6...
    *-arm64-apple-darwin-unsigned.tar.gz e2156b467c2f9b61...
    *-arm64-apple-darwin-unsigned.zip df3fc5160ed252fd...
    *-arm64-apple-darwin.tar.gz 26a9dd7925b1b031...
    *-powerpc64-linux-gnu-debug.tar.gz 4658aac84057f136...
    *-powerpc64-linux-gnu.tar.gz 96681115edb9462c...
    *-powerpc64le-linux-gnu-debug.tar.gz 4a6f2eaf9b4481a5...
    *-powerpc64le-linux-gnu.tar.gz 4b189250845bf6d8...
    *-riscv64-linux-gnu-debug.tar.gz 8b2adff50a96e382...
    *-riscv64-linux-gnu.tar.gz 8776afd4a5b52b98...
    *-x86_64-apple-darwin-unsigned.tar.gz 996dbcd1c48cf4a7...
    *-x86_64-apple-darwin-unsigned.zip 901dcfa51a1f45dd...
    *-x86_64-apple-darwin.tar.gz 1b13b056b0884650...
    *-x86_64-linux-gnu-debug.tar.gz 14d151e7b2f50f07...
    *-x86_64-linux-gnu.tar.gz dab0c4e2ce7116e4...
    *.tar.gz 9a22c1079adaf163... 518c896f69e05ef0...
    guix_build.log 12e609742606ab17... 1195124f26c3190b...
    guix_build.log.diff c309cfa89eb18966...
  59. DrahtBot removed the label DrahtBot Guix build requested on Oct 26, 2023
  60. PastaPastaPasta referenced this in commit c38071b663 on Oct 27, 2023
  61. maflcko commented at 7:17 am on October 31, 2023: member

    Looks like configure doesn’t detect g++-10 as a C++20 compiler, see https://cirrus-ci.com/task/5152770953576448?logs=ci#L5426 and #28349 (comment)

     0 | #ifndef __cplusplus
     1| 
     2| #error "This is not a C++ compiler"
     3| 
     4| #elif __cplusplus < 202002L
     5| 
     6| #error "This is not a C++20 compiler"
     7| 
     8| #else
     9| 
    10| #include <version>
    11| 
    12| namespace cxx20
    13| {
    14| 
    15| // As C++20 supports feature test macros in the standard, there is no
    16| // immediate need to actually test for feature availability on the
    17| // Autoconf side.
    18| 
    19| }  // namespace cxx20
    20| 
    21| #endif  // __cplusplus < 202002L
    22| 
    23| 
    24| 
    25configure:5613: result: no
    26configure:5637: error: *** A compiler with support for C++20 language features is required.
    
  62. maflcko commented at 7:23 am on October 31, 2023: member
    I presume this will be fixed by cmake, so I’ll just leave this in draft for now.
  63. fanquake commented at 8:06 am on October 31, 2023: member

    CMake isn’t ready yet, and we actually want C++20 first, to save porting over redundant code, just to delete it later.

    Happy to take over this pull if you prefer.

  64. maflcko commented at 4:56 pm on October 31, 2023: member
    In any case, it is waiting on the macOS compile failure (Xcode?), so I can’t really take it out of draft anyway.
  65. maflcko force-pushed on Oct 31, 2023
  66. maflcko force-pushed on Oct 31, 2023
  67. maflcko added the label DrahtBot Guix build requested on Oct 31, 2023
  68. maflcko force-pushed on Oct 31, 2023
  69. maflcko force-pushed on Oct 31, 2023
  70. maflcko force-pushed on Oct 31, 2023
  71. maflcko commented at 8:16 pm on October 31, 2023: member

    No idea what is wrong with Microsoft/Azure/GHA again. Locally it works fine, but not on their infra:

    https://github.com/bitcoin/bitcoin/actions/runs/6711963492/job/18240509895?pr=28349#step:6:210

     0 checking whether clang is Clang... yes
     1checking whether pthreads work with "-pthread" and "-lpthread"... yes
     2checking whether Clang needs flag to prevent "argument unused" warning when linking with -pthread... no
     3checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
     4checking whether more special flags are required for pthreads... no
     5checking for PTHREAD_PRIO_INHERIT... yes
     6checking whether std::atomic can be used without link library... no
     7checking whether std::atomic needs -latomic... no
     8configure: error: in `/home/runner/work/bitcoin/bitcoin':
     9configure: error: cannot figure out how to use std::atomic
    10See `config.log' for more details
    
  72. maflcko force-pushed on Oct 31, 2023
  73. DrahtBot commented at 3:45 am on November 1, 2023: contributor

    Guix builds (on x86_64)

    File commit 3c0b66c2ece7695ab59f466d7b4d81a4c18ffd76(master) commit 69e64a76f827ad258246cc7cae08bfa5c0e8fa52(master and this pull)
    SHA256SUMS.part e0183e919e441500... b9274266f7a34f55...
    *-aarch64-linux-gnu-debug.tar.gz d13b5de70f000c6b... 6344bbfdb8391bdf...
    *-aarch64-linux-gnu.tar.gz 5dd9fc1083482d55... 76d56754cb6a1dca...
    *-arm-linux-gnueabihf-debug.tar.gz a37a769106ea8077... 784f34290074f096...
    *-arm-linux-gnueabihf.tar.gz 73f3bcfa079c199b... e297aa0b4456361d...
    *-arm64-apple-darwin-unsigned.tar.gz cfa0c860102fef9d...
    *-arm64-apple-darwin-unsigned.zip 45cbaa94bee5caac...
    *-arm64-apple-darwin.tar.gz 6c326ae45d56dcc7...
    *-powerpc64-linux-gnu-debug.tar.gz 5026e75e07abe0f1... 6746d715b121cd64...
    *-powerpc64-linux-gnu.tar.gz 83264140c6ec5140... 2fed4b223c08ae82...
    *-powerpc64le-linux-gnu-debug.tar.gz f73029e9bbb07fa1... 2d27e5cc771471b1...
    *-powerpc64le-linux-gnu.tar.gz 106083f2aa3492f4... 4cbdbb2276ea208d...
    *-riscv64-linux-gnu-debug.tar.gz 111b2395703a0277... 27b0754880e4012c...
    *-riscv64-linux-gnu.tar.gz 93e89c59064f7b00... acc9e6d383d0ea8a...
    *-x86_64-apple-darwin-unsigned.tar.gz 7355da26a0530264...
    *-x86_64-apple-darwin-unsigned.zip 48b1888ada06adcc...
    *-x86_64-apple-darwin.tar.gz 92280d3cc7114c7d...
    *-x86_64-linux-gnu-debug.tar.gz 2f931eccfbabae1d... 540a17338128d891...
    *-x86_64-linux-gnu.tar.gz 8f9d14ca9411cd5b... b63359973db08c7b...
    *.tar.gz 8bde24630fc6b199... 67e002f40b2e65dc...
    guix_build.log 29a5a777a7a591bc... 466b8d50cf506801...
    guix_build.log.diff b13cda22c0c0fb4c...
  74. DrahtBot removed the label DrahtBot Guix build requested on Nov 1, 2023
  75. maflcko force-pushed on Nov 6, 2023
  76. maflcko force-pushed on Nov 8, 2023
  77. maflcko force-pushed on Nov 13, 2023
  78. maflcko force-pushed on Nov 16, 2023
  79. maflcko force-pushed on Nov 17, 2023
  80. DrahtBot added the label Needs rebase on Nov 22, 2023
  81. maflcko force-pushed on Nov 22, 2023
  82. DrahtBot removed the label Needs rebase on Nov 22, 2023
  83. maflcko force-pushed on Nov 28, 2023
  84. maflcko force-pushed on Dec 4, 2023
  85. maflcko force-pushed on Dec 5, 2023
  86. DrahtBot removed the label CI failed on Dec 5, 2023
  87. PastaPastaPasta referenced this in commit 64c41d1f39 on Dec 6, 2023
  88. PastaPastaPasta referenced this in commit bb1ecd4489 on Dec 7, 2023
  89. fanquake closed this on Dec 7, 2023

  90. maflcko reopened this on Dec 7, 2023

  91. build: Require C++20 compiler fa67f096bd
  92. refactor: modernize-use-default-member-init for bit-fields (C++20) fa02fc0a86
  93. refactor: Drop unused _Pragma to ignore -Wgnu-zero-variadic-macro-arguments fae3b77a87
  94. Revert "tracepoints: Disables `-Wgnu-zero-variadic-macro-arguments` to compile without warnings"
    This reverts commit 5197660e947435e510ef3ef72be8be8dee3ffa41.
    faa48388bc
  95. fuzz: Use C++20 starts_with in rpc.cpp fa6e50d6c7
  96. maflcko force-pushed on Dec 7, 2023
  97. maflcko added the label DrahtBot Guix build requested on Dec 7, 2023
  98. maflcko marked this as ready for review on Dec 7, 2023
  99. maflcko commented at 10:08 am on December 7, 2023: member

    Rebased.

    Once and if this is merged, I’ll follow-up with a fs.h cleanup.

  100. fanquake commented at 3:07 pm on December 7, 2023: member

    Guix Build (x86_64):

     0e5353b158953861a821ed757f1e82ecb059b936c42fea7d0f218c5f5271f9e6e  guix-build-fa6e50d6c796/output/aarch64-linux-gnu/SHA256SUMS.part
     103d479c397af94a67e6430f9f9538a8b3cc540358eb1e94859efb863dcff06ab  guix-build-fa6e50d6c796/output/aarch64-linux-gnu/bitcoin-fa6e50d6c796-aarch64-linux-gnu-debug.tar.gz
     211dafce4484ae16a74721c88b8f4b1b3dc87637639cdb70116bc0b1f498ea851  guix-build-fa6e50d6c796/output/aarch64-linux-gnu/bitcoin-fa6e50d6c796-aarch64-linux-gnu.tar.gz
     3c740b34ccc186c98f73fd65b9a59f825c827cf4ecd18a7c167133ddb91d5144d  guix-build-fa6e50d6c796/output/arm-linux-gnueabihf/SHA256SUMS.part
     4192ccf57bea669e324e1525eef14f032b640f2361f7b1db8f307ab75a9886468  guix-build-fa6e50d6c796/output/arm-linux-gnueabihf/bitcoin-fa6e50d6c796-arm-linux-gnueabihf-debug.tar.gz
     55eaba226c6d6fb59df34d6d55d047dedad5ba027c167b4761cf704b0f3257b65  guix-build-fa6e50d6c796/output/arm-linux-gnueabihf/bitcoin-fa6e50d6c796-arm-linux-gnueabihf.tar.gz
     656a1d184011dbcf198606236cea11a03c4c91c3826a582790a121a2656dee27a  guix-build-fa6e50d6c796/output/arm64-apple-darwin/SHA256SUMS.part
     7a2cd396f53c10c57581464415876dff2b7a8db0f44b96d86df114f93d4ac24a9  guix-build-fa6e50d6c796/output/arm64-apple-darwin/bitcoin-fa6e50d6c796-arm64-apple-darwin-unsigned.tar.gz
     8f3212051887adb43ee86c4376b32a6b874c5fe3d0878547e1e2abdff62170200  guix-build-fa6e50d6c796/output/arm64-apple-darwin/bitcoin-fa6e50d6c796-arm64-apple-darwin-unsigned.zip
     9fa9a1af5b3b7000583f2dec7157a6af7260dbbba707299064a47e52d78a7ce00  guix-build-fa6e50d6c796/output/arm64-apple-darwin/bitcoin-fa6e50d6c796-arm64-apple-darwin.tar.gz
    10558c4d2a42b38b89a6f0be7612ce6e3362fd1ff360bcecef1a2f0a505d90d5b2  guix-build-fa6e50d6c796/output/dist-archive/bitcoin-fa6e50d6c796.tar.gz
    11b94dbfe3b5296d71e40a85dcf1e36c912f9c735363ede76405403b79e22fbc2f  guix-build-fa6e50d6c796/output/powerpc64-linux-gnu/SHA256SUMS.part
    12d7dc15c2e6f24ce254e3609de819a68f640366efddbcb8670ae25b5ffcddbcae  guix-build-fa6e50d6c796/output/powerpc64-linux-gnu/bitcoin-fa6e50d6c796-powerpc64-linux-gnu-debug.tar.gz
    1355ec7f88d52537294e6e6f0ce7e48a20ced8ed1f5354cd13a29903d03128a3f3  guix-build-fa6e50d6c796/output/powerpc64-linux-gnu/bitcoin-fa6e50d6c796-powerpc64-linux-gnu.tar.gz
    148f8c7986fdd6e91b9abe9268016aac26e9b9e4793c179d37f3cc66c5918909f0  guix-build-fa6e50d6c796/output/powerpc64le-linux-gnu/SHA256SUMS.part
    1588c8cef57d32db15c5f25f8a616a120aeab937cba47f82fe2d847bd412bdca14  guix-build-fa6e50d6c796/output/powerpc64le-linux-gnu/bitcoin-fa6e50d6c796-powerpc64le-linux-gnu-debug.tar.gz
    16247e9f2a9ca83aca79697d5fbd416cfbbb76e4a2b815167824c69575695fd87a  guix-build-fa6e50d6c796/output/powerpc64le-linux-gnu/bitcoin-fa6e50d6c796-powerpc64le-linux-gnu.tar.gz
    17b20beff0f319c74171eadf3d22701f3e0255201df33e35513a2fdb6f1cef3bd0  guix-build-fa6e50d6c796/output/riscv64-linux-gnu/SHA256SUMS.part
    186d0014ffa2f2db09bce9f8575ab3000424f4ef8be37e74fdcdd490995fa81705  guix-build-fa6e50d6c796/output/riscv64-linux-gnu/bitcoin-fa6e50d6c796-riscv64-linux-gnu-debug.tar.gz
    199f14769debd583e52af047919de80770d91946755454853d6570c0cf9cb57127  guix-build-fa6e50d6c796/output/riscv64-linux-gnu/bitcoin-fa6e50d6c796-riscv64-linux-gnu.tar.gz
    2039d4926869107e52a91f7eafc80ade8605e7b31871c1b51994937a5647c8c4c5  guix-build-fa6e50d6c796/output/x86_64-apple-darwin/SHA256SUMS.part
    21a4355271304b998a4f7df5eaf7d00a612788e90323643279f9c209847d77e883  guix-build-fa6e50d6c796/output/x86_64-apple-darwin/bitcoin-fa6e50d6c796-x86_64-apple-darwin-unsigned.tar.gz
    22bd61f4d76ff4a9b025a6d8674ed23aef8453b1717f546e92c68b80ead72ac7de  guix-build-fa6e50d6c796/output/x86_64-apple-darwin/bitcoin-fa6e50d6c796-x86_64-apple-darwin-unsigned.zip
    23738775678ebe42017566bda77247ff1e9ddf9258dd22729ecbb1a248aac86880  guix-build-fa6e50d6c796/output/x86_64-apple-darwin/bitcoin-fa6e50d6c796-x86_64-apple-darwin.tar.gz
    2452354c6ace98e5576cbcbd1279e9e1ec39c573258ab4498fcdeca29ee77b2d7d  guix-build-fa6e50d6c796/output/x86_64-linux-gnu/SHA256SUMS.part
    25b509b28ca13add87173872412fabd574f7d34e12f72c024acb6c0c514665f36c  guix-build-fa6e50d6c796/output/x86_64-linux-gnu/bitcoin-fa6e50d6c796-x86_64-linux-gnu-debug.tar.gz
    265f13ea27365154bcbd833e2219b6fb35b58e365a9992563abbd09df71ca424d4  guix-build-fa6e50d6c796/output/x86_64-linux-gnu/bitcoin-fa6e50d6c796-x86_64-linux-gnu.tar.gz
    2753714ca64c9de2c8dfe2d044eeff6f145bd1818ac5247e94a3801b58ff85857a  guix-build-fa6e50d6c796/output/x86_64-w64-mingw32/SHA256SUMS.part
    281bae509b8f789ace92c46ef735f18f6f03a11ca0c510c2bd1a7a6efddcf51184  guix-build-fa6e50d6c796/output/x86_64-w64-mingw32/bitcoin-fa6e50d6c796-win64-debug.zip
    29d2e84befcd39716fe63cd90ce607f903c866780df402dd423ef934a129c60dbc  guix-build-fa6e50d6c796/output/x86_64-w64-mingw32/bitcoin-fa6e50d6c796-win64-setup-unsigned.exe
    3006fc6332a1e591da965c615f871386042b6f6b023cc7aa2a2f5ee459c247d257  guix-build-fa6e50d6c796/output/x86_64-w64-mingw32/bitcoin-fa6e50d6c796-win64-unsigned.tar.gz
    318046be0ad76c90dd9fe63c8569cf2bfe7a8989cbf07843ff0c2920e87c17e7e9  guix-build-fa6e50d6c796/output/x86_64-w64-mingw32/bitcoin-fa6e50d6c796-win64.zip
    
  101. PastaPastaPasta referenced this in commit db82ecbefe on Dec 7, 2023
  102. maflcko commented at 3:22 pm on December 7, 2023: member
    The benchmarks on https://corecheck.dev/bitcoin/bitcoin/pulls/28349 are grey (“normal”/expected)
  103. DrahtBot commented at 7:32 pm on December 7, 2023: contributor

    Guix builds (on x86_64)

    File commit dce1dfbc47050404bcf3ce2461e8baff0b088ffb(master) commit e3c53e43fd6f9b166c4888727e1595c76afe218e(master and this pull)
    SHA256SUMS.part d80bfdff781d89e3... 0af02ff57f0c6add...
    *-aarch64-linux-gnu-debug.tar.gz 94e8b7875a9ce3ff... 25b77893da289116...
    *-aarch64-linux-gnu.tar.gz ba450dde41f78079... d5378bcc159a32a4...
    *-arm-linux-gnueabihf-debug.tar.gz 1bc118c5ab7dc401... 5720b199807f810a...
    *-arm-linux-gnueabihf.tar.gz efce30e5a32001c0... 34ff529ee94b33da...
    *-arm64-apple-darwin-unsigned.tar.gz 415db4d526a282f2... c5a9e6b45d24f887...
    *-arm64-apple-darwin-unsigned.zip 94aff60bdcc51612... 2e3f2172d77bd5a0...
    *-arm64-apple-darwin.tar.gz 99f70a54a32be601... 0668328433e6ea46...
    *-powerpc64-linux-gnu-debug.tar.gz 89eae14f680c86fc... 3505f6d5b7eea666...
    *-powerpc64-linux-gnu.tar.gz a3bdbc9acd7952b8... d8a76e1fff2bb7d7...
    *-powerpc64le-linux-gnu-debug.tar.gz 76e7c9ca4a00c1f3... 25bfecfea50fa6a7...
    *-powerpc64le-linux-gnu.tar.gz 220948ee0f94e14e... 74c8adb992d18661...
    *-riscv64-linux-gnu-debug.tar.gz 9b1ffb17e0229f82... 6f6473d85fe944f8...
    *-riscv64-linux-gnu.tar.gz 469d0c90e7d2a248... 13aa1386668a7ece...
    *-x86_64-apple-darwin-unsigned.tar.gz df40d7c0df26b57e... af907c0766d3ca2c...
    *-x86_64-apple-darwin-unsigned.zip 75866a183de6009f... aa43b17ce1205d2c...
    *-x86_64-apple-darwin.tar.gz d43a4a8be3dfe3d7... 22afbee0b37717aa...
    *-x86_64-linux-gnu-debug.tar.gz fdc057cc4746bf47... 39b43ad2da508216...
    *-x86_64-linux-gnu.tar.gz 61c3188be428aa8f... 6e2dab20378fdde8...
    *.tar.gz 4c7b653d0daf4599... 540e6521072e1a4a...
    guix_build.log a2b713e6987d264a... e6596fdd806eefc0...
    guix_build.log.diff da02ceeb92d64ded...
  104. DrahtBot removed the label DrahtBot Guix build requested on Dec 7, 2023
  105. fanquake approved
  106. fanquake commented at 11:18 am on December 8, 2023: member
    ACK fa6e50d6c79633e22ad4cfc75f56aaa40112ecbb
  107. fanquake merged this on Dec 8, 2023
  108. fanquake closed this on Dec 8, 2023

  109. maflcko deleted the branch on Dec 8, 2023
  110. 0xB10C commented at 12:57 pm on December 8, 2023: contributor

    post-merge ACK. Tested this on my NixOS setup. Configure and build works fine, unit tests pass. Reverting in faa48388bca06df1ca7ab92461b76a6720481e45 makes sense.

     0  CXX      policy/libbitcoin_common_a-feerate.o
     1In file included from ./hash.h:13,
     2                 from ./pubkey.h:10,
     3                 from ./addresstype.h:9,
     4                 from ./outputtype.h:9,
     5                 from outputtype.cpp:6:
     6In member function bool prevector<N, T, Size, Diff>::is_direct() const [with unsigned int N = 28; T = unsigned char; Size = unsigned int; Diff = int],
     7    inlined from prevector<N, T, Size, Diff>::~prevector() [with unsigned int N = 28; T = unsigned char; Size = unsigned int; Diff = int] at ./prevector.h:469:23,
     8    inlined from CScript::~CScript() at ./script/script.h:413:7,
     9    inlined from CNoDestination::~CNoDestination() at ./addresstype.h:18:7,
    10    inlined from constexpr void std::destroy_at(_Tp*) [with _Tp = CNoDestination] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/stl_construct.h:88:18,
    11    inlined from constexpr void std::_Destroy(_Tp*) [with _Tp = CNoDestination] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/stl_construct.h:149:22,
    12    inlined from std::__detail::__variant::_Variant_storage<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::_M_reset()::<lambda(auto:19&&)> mutable [with auto:19 = CNoDestination&] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:472:19,
    13    inlined from constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = void; _Fn = __detail::__variant::_Variant_storage<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::_M_reset()::<lambda(auto:19&&)>; _Args = {CNoDestination&}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/invoke.h:61:36,
    14    inlined from constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = void; _Callable = __detail::__variant::_Variant_storage<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::_M_reset()::<lambda(auto:19&&)>; _Args = {CNoDestination&}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/invoke.h:111:28,
    15    inlined from static constexpr decltype(auto) std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<_Result_type (*)(_Visitor, _Variants ...)>, std::integer_sequence<long unsigned int, __indices ...> >::__visit_invoke(_Visitor&&, _Variants ...) [with _Result_type = void; _Visitor = std::__detail::__variant::_Variant_storage<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::_M_reset()::<lambda(auto:19&&)>&&; _Variants = {std::variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>&}; long unsigned int ...__indices = {0}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:1035:40,
    16    inlined from constexpr decltype(auto) std::__do_visit(_Visitor&&, _Variants&& ...) [with _Result_type = void; _Visitor = __detail::__variant::_Variant_storage<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::_M_reset()::<lambda(auto:19&&)>; _Variants = {variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>&}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:1783:5,
    17    inlined from constexpr decltype(auto) std::__do_visit(_Visitor&&, _Variants&& ...) [with _Result_type = void; _Visitor = __detail::__variant::_Variant_storage<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::_M_reset()::<lambda(auto:19&&)>; _Variants = {variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>&}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:1729:5,
    18    inlined from constexpr void std::__detail::__variant::_Variant_storage<false, _Types ...>::_M_reset() [with _Types = {CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:470:23,
    19    inlined from constexpr std::__detail::__variant::_Variant_storage<false, _Types ...>::~_Variant_storage() [with _Types = {CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:480:17,
    20    inlined from constexpr std::__detail::__variant::_Copy_ctor_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::~_Copy_ctor_base() at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:554:12,
    21    inlined from constexpr std::__detail::__variant::_Move_ctor_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::~_Move_ctor_base() at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:591:12,
    22    inlined from constexpr std::__detail::__variant::_Copy_assign_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::~_Copy_assign_base() at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:629:12,
    23    inlined from constexpr std::__detail::__variant::_Move_assign_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::~_Move_assign_base() at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:681:12,
    24    inlined from constexpr std::__detail::__variant::_Variant_base<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::~_Variant_base() at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:735:12,
    25    inlined from constexpr std::variant<_Types>::~variant() [with _Types = {CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:1407:28,
    26    inlined from std::vector<std::variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown> > GetAllDestinationsForKey(const CPubKey&) at outputtype.cpp:79:5:
    27./prevector.h:170:37: warning: *(const prevector<28, unsigned char, unsigned int, int>*)((char*)&p2sh + offsetof(std::CTxDestination, std::variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::<unnamed>.std::__detail::__variant::_Variant_base<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::<unnamed>.std::__detail::__variant::_Move_assign_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::<unnamed>.std::__detail::__variant::_Copy_assign_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::<unnamed>.std::__detail::__variant::_Move_ctor_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::<unnamed>.std::__detail::__variant::_Copy_ctor_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::<unnamed>.std::__detail::__variant::_Variant_storage<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::_M_u)).prevector<28, unsigned char>::_size may be used uninitialized [-Wmaybe-uninitialized]
    28  170 |     bool is_direct() const { return _size <= N; }
    29      |                                     ^~~~~
    30outputtype.cpp: In function std::vector<std::variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown> > GetAllDestinationsForKey(const CPubKey&):
    31outputtype.cpp:77:24: note: p2sh declared here
    32   77 |         CTxDestination p2sh = ScriptHash(GetScriptForDestination(segwit));
    33      |                        ^~~~
    34In file included from /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/vector:64,
    35                 from ./serialize.h:25,
    36                 from ./hash.h:14:
    37In destructor constexpr std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>],
    38    inlined from constexpr std::vector<_Tp, _Alloc>::~vector() [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/stl_vector.h:733:7,
    39    inlined from constexpr WitnessUnknown::~WitnessUnknown() at ./addresstype.h:94:8,
    40    inlined from constexpr void std::destroy_at(_Tp*) [with _Tp = WitnessUnknown] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/stl_construct.h:88:18,
    41    inlined from constexpr void std::_Destroy(_Tp*) [with _Tp = WitnessUnknown] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/stl_construct.h:149:22,
    42    inlined from std::__detail::__variant::_Variant_storage<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::_M_reset()::<lambda(auto:19&&)> mutable [with auto:19 = WitnessUnknown&] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:472:19,
    43    inlined from constexpr _Res std::__invoke_impl(__invoke_other, _Fn&&, _Args&& ...) [with _Res = void; _Fn = __detail::__variant::_Variant_storage<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::_M_reset()::<lambda(auto:19&&)>; _Args = {WitnessUnknown&}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/invoke.h:61:36,
    44    inlined from constexpr std::enable_if_t<is_invocable_r_v<_Res, _Callable, _Args ...>, _Res> std::__invoke_r(_Callable&&, _Args&& ...) [with _Res = void; _Callable = __detail::__variant::_Variant_storage<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::_M_reset()::<lambda(auto:19&&)>; _Args = {WitnessUnknown&}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/invoke.h:111:28,
    45    inlined from static constexpr decltype(auto) std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<_Result_type (*)(_Visitor, _Variants ...)>, std::integer_sequence<long unsigned int, __indices ...> >::__visit_invoke(_Visitor&&, _Variants ...) [with _Result_type = void; _Visitor = std::__detail::__variant::_Variant_storage<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::_M_reset()::<lambda(auto:19&&)>&&; _Variants = {std::variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>&}; long unsigned int ...__indices = {7}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:1035:40,
    46    inlined from constexpr decltype(auto) std::__do_visit(_Visitor&&, _Variants&& ...) [with _Result_type = void; _Visitor = __detail::__variant::_Variant_storage<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::_M_reset()::<lambda(auto:19&&)>; _Variants = {variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>&}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:1790:5,
    47    inlined from constexpr void std::__detail::__variant::_Variant_storage<false, _Types ...>::_M_reset() [with _Types = {CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:470:23,
    48    inlined from constexpr std::__detail::__variant::_Variant_storage<false, _Types ...>::~_Variant_storage() [with _Types = {CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:480:17,
    49    inlined from constexpr std::__detail::__variant::_Copy_ctor_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::~_Copy_ctor_base() at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:554:12,
    50    inlined from constexpr std::__detail::__variant::_Move_ctor_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::~_Move_ctor_base() at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:591:12,
    51    inlined from constexpr std::__detail::__variant::_Copy_assign_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::~_Copy_assign_base() at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:629:12,
    52    inlined from constexpr std::__detail::__variant::_Move_assign_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::~_Move_assign_base() at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:681:12,
    53    inlined from constexpr std::__detail::__variant::_Variant_base<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::~_Variant_base() at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:735:12,
    54    inlined from constexpr std::variant<_Types>::~variant() [with _Types = {CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown}] at /nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/variant:1407:28,
    55    inlined from std::vector<std::variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown> > GetAllDestinationsForKey(const CPubKey&) at outputtype.cpp:79:5:
    56/nix/store/b7hvml0m3qmqraz1022fwvyyg6fc1vdy-gcc-12.2.0/include/c++/12.2.0/bits/stl_vector.h:367:31: warning: *(std::_Vector_base<unsigned char, std::allocator<unsigned char> >*)((char*)&p2sh + offsetof(std::CTxDestination, std::variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::<unnamed>.std::__detail::__variant::_Variant_base<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::<unnamed>.std::__detail::__variant::_Move_assign_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::<unnamed>.std::__detail::__variant::_Copy_assign_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::<unnamed>.std::__detail::__variant::_Move_ctor_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::<unnamed>.std::__detail::__variant::_Copy_ctor_base<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::<unnamed>.std::__detail::__variant::_Variant_storage<false, CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown>::_M_u) + 8).std::_Vector_base<unsigned char, std::allocator<unsigned char> >::_M_impl.std::_Vector_base<unsigned char, std::allocator<unsigned char> >::_Vector_impl::<anonymous>.std::_Vector_base<unsigned char, std::allocator<unsigned char> >::_Vector_impl_data::_M_end_of_storage may be used uninitialized [-Wmaybe-uninitialized]
    57  367 |                       _M_impl._M_end_of_storage - _M_impl._M_start);
    58      |                       ~~~~~~~~^~~~~~~~~~~~~~~~~
    59outputtype.cpp: In function std::vector<std::variant<CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, WitnessUnknown> > GetAllDestinationsForKey(const CPubKey&):
    60outputtype.cpp:77:24: note: p2sh declared here
    61   77 |         CTxDestination p2sh = ScriptHash(GetScriptForDestination(segwit));
    62      |                        ^~~~
    
  111. TheCharlatan commented at 3:23 pm on December 8, 2023: contributor
    Post-merge ACK.
  112. hebasto commented at 8:53 pm on December 8, 2023: member

    Looks like configure doesn’t detect g++-10 as a C++20 compiler…

    I presume this will be fixed by cmake…

    It does :)

  113. fanquake commented at 9:02 pm on December 8, 2023: member
    Isn’t it just applying the exact same workaround (internally) that we are using? There’s no other way to know that GCC supports C++20, because of the bug we discussed above.
  114. hebasto commented at 9:14 pm on December 8, 2023: member

    Isn’t it just applying the exact same workaround (internally) that we are using? There’s no other way to know that GCC supports C++20, because of the bug we discussed above.

    I didn’t look into CMake code for that. I only tested it, including the minimum supported CMake 3.16.

  115. Julio-Rats referenced this in commit dce1dfbc47 on Jan 26, 2024
  116. theuni commented at 4:33 pm on March 1, 2024: member
    This needs a release note imo.
  117. fanquake added the label Needs release note on Mar 1, 2024
  118. fanquake removed the label Needs release note on Mar 4, 2024
  119. fanquake commented at 11:57 am on March 4, 2024: member
    Added rel-note todo to the draft wiki.

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-08 19:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me