Page MenuHomePhabricator

Remove confusing P1008R1 violation in ATMPArgs
ClosedPublic

Authored by PiRK on Jan 29 2024, 17:16.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCcfcab8f52cfc: Remove confusing P1008R1 violation in ATMPArgs
Summary

This is a backport of core#24404

Note that without this change, the compiler raises errors when trying to compile with set(CMAKE_CXX_STANDARD 20)

/home/pierre/dev/bitcoin-abc/src/validation.cpp: In static member function ‘static {anonymous}::MemPoolAccept::ATMPArgs {anonymous}::MemPoolAccept::ATMPArgs::SingleAccept(const Config&, int64_t, bool, std::vector<COutPoint>&, bool, unsigned int)’:
/home/pierre/dev/bitcoin-abc/src/validation.cpp:332:59: error: no matching function for call to ‘{anonymous}::MemPoolAccept::ATMPArgs::ATMPArgs(<brace-enclosed initializer list>)’
  332 |                             /*m_package_submission=*/false};
      |                                                           ^
/home/pierre/dev/bitcoin-abc/src/validation.cpp:299:12: note: candidate: ‘constexpr {anonymous}::MemPoolAccept::ATMPArgs::ATMPArgs(const {anonymous}::MemPoolAccept::ATMPArgs&)’
  299 |     struct ATMPArgs {
      |            ^~~~~~~~
/home/pierre/dev/bitcoin-abc/src/validation.cpp:299:12: note:   candidate expects 1 argument, 7 provided

Depends on D15313

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Jan 29 2024, 17:16

Tail of the build log:

  393 |   operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
      |             ~~~~~~~~~~^~~
In file included from /usr/include/c++/9/bits/stl_algobase.h:67,
                 from /usr/include/c++/9/algorithm:61,
                 from ../../src/./span.h:8,
                 from ../../src/./wallet/rpc/backup.h:8,
                 from ../../src/wallet/rpc/backup.cpp:5:
/usr/include/c++/9/bits/stl_iterator.h:996:5: note: candidate: ‘template<class _Iterator, class _Container> __gnu_cxx::__normal_iterator<_Iterator, _Container> __gnu_cxx::operator+(typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)’
  996 |     operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
      |     ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:996:5: note:   template argument deduction/substitution failed:
../../src/wallet/rpc/backup.cpp:965:40: note:   mismatched types ‘const __gnu_cxx::__normal_iterator<_Iterator, _Container>’ and ‘const char [85]’
  965 |                                        "move it out of the way first");
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/wallet/rpc/backup.cpp:1077:55: error: cannot convert ‘std::u8string’ {aka ‘std::__cxx11::basic_string<char8_t>’} to ‘const UniValue&’
 1077 |             reply.pushKV("filename", filepath.u8string());
      |                                      ~~~~~~~~~~~~~~~~~^~
      |                                                       |
      |                                                       std::u8string {aka std::__cxx11::basic_string<char8_t>}
In file included from ../../src/./rpc/command.h:8,
                 from ../../src/./rpc/server.h:10,
                 from ../../src/wallet/rpc/backup.cpp:14:
../../src/univalue/include/univalue.h:102:57: note:   initializing argument 2 of ‘bool UniValue::pushKV(const string&, const UniValue&)’
  102 |     bool pushKV(const std::string& key, const UniValue& val);
      |                                         ~~~~~~~~~~~~~~~~^~~
[393/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[394/544] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[395/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
FAILED: src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DABORT_ON_FAILED_ASSUME -DBOOST_ALL_NO_LIB -DBUILD_BITCOIN_INTERNAL -DDEBUG -DDEBUG_LOCKORDER -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -O0 -fPIC -fvisibility=hidden -g3 -ftrapv -fstack-reuse=none -fstack-protector-all -Wstack-protector -fcf-protection=full -fstack-clash-protection -U_FORTIFY_SOURCE -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wformat-security -Wredundant-move -Woverloaded-virtual -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-psabi -pthread -std=gnu++2a -MD -MT src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o -MF src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o.d -o src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o -c ../../src/wallet/rpcwallet.cpp
../../src/wallet/rpcwallet.cpp: In lambda function:
../../src/wallet/rpcwallet.cpp:2634:52: error: cannot convert ‘std::u8string’ {aka ‘std::__cxx11::basic_string<char8_t>’} to ‘const UniValue&’
 2634 |                 wallet.pushKV("name", path.u8string());
      |                                       ~~~~~~~~~~~~~^~
      |                                                    |
      |                                                    std::u8string {aka std::__cxx11::basic_string<char8_t>}
In file included from ../../src/./rpc/command.h:8,
                 from ../../src/./rpc/server.h:10,
                 from ../../src/wallet/rpcwallet.cpp:19:
../../src/univalue/include/univalue.h:102:57: note:   initializing argument 2 of ‘bool UniValue::pushKV(const string&, const UniValue&)’
  102 |     bool pushKV(const std::string& key, const UniValue& val);
      |                                         ~~~~~~~~~~~~~~~~^~~
[396/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/util.cpp.o
[397/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/signmessage.cpp.o
[398/544] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[399/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/encrypt.cpp.o
[400/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/transaction.cpp.o
[401/544] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[402/544] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[403/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[404/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[405/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/interfaces.cpp.o
[406/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/spend.cpp.o
[407/544] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[408/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[409/544] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[410/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[411/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-debug failed with exit code 1

Tail of the build log:

                wallet.pushKV("name", path.u8string());
                                      ^~~~~~~~~~~~~~~
../../src/univalue/include/univalue.h:23:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'const UniValue &' for 1st argument
class UniValue {
      ^
../../src/univalue/include/univalue.h:23:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'UniValue &&' for 1st argument
../../src/univalue/include/univalue.h:30:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'UniValue::VType' for 1st argument
    UniValue(UniValue::VType type, const std::string& value = std::string()) : typ(type), val(value) {}
    ^
../../src/univalue/include/univalue.h:31:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'uint64_t' (aka 'unsigned long') for 1st argument
    UniValue(uint64_t val_) {
    ^
../../src/univalue/include/univalue.h:34:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'int64_t' (aka 'long') for 1st argument
    UniValue(int64_t val_) {
    ^
../../src/univalue/include/univalue.h:37:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'bool' for 1st argument
    UniValue(bool val_) {
    ^
../../src/univalue/include/univalue.h:40:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'int' for 1st argument
    UniValue(int val_) {
    ^
../../src/univalue/include/univalue.h:43:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'double' for 1st argument
    UniValue(double val_) {
    ^
../../src/univalue/include/univalue.h:46:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'const std::string &' (aka 'const basic_string<char> &') for 1st argument
    UniValue(const std::string& val_) {
    ^
../../src/univalue/include/univalue.h:49:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'const char *' for 1st argument
    UniValue(const char *val_) {
    ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/basic_string.h:787:7: note: candidate function
      operator __sv_type() const noexcept
      ^
../../src/univalue/include/univalue.h:102:57: note: passing argument to parameter 'val' here
    bool pushKV(const std::string& key, const UniValue& val);
                                                        ^
1 error generated.
[398/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[399/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/signmessage.cpp.o
[400/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/receive.cpp.o
[401/544] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[402/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/util.cpp.o
[403/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/encrypt.cpp.o
[404/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[405/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/transaction.cpp.o
[406/544] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[407/544] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[408/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[409/544] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[410/544] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[411/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[412/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/spend.cpp.o
[413/544] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[414/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/interfaces.cpp.o
[415/544] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[416/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[417/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[418/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang failed with exit code 1

Tail of the build log:

../../src/univalue/include/univalue.h:23:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'UniValue &&' for 1st argument
../../src/univalue/include/univalue.h:30:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'UniValue::VType' for 1st argument
    UniValue(UniValue::VType type, const std::string& value = std::string()) : typ(type), val(value) {}
    ^
../../src/univalue/include/univalue.h:31:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'uint64_t' (aka 'unsigned long') for 1st argument
    UniValue(uint64_t val_) {
    ^
../../src/univalue/include/univalue.h:34:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'int64_t' (aka 'long') for 1st argument
    UniValue(int64_t val_) {
    ^
../../src/univalue/include/univalue.h:37:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'bool' for 1st argument
    UniValue(bool val_) {
    ^
../../src/univalue/include/univalue.h:40:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'int' for 1st argument
    UniValue(int val_) {
    ^
../../src/univalue/include/univalue.h:43:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'double' for 1st argument
    UniValue(double val_) {
    ^
../../src/univalue/include/univalue.h:46:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'const std::string &' (aka 'const basic_string<char> &') for 1st argument
    UniValue(const std::string& val_) {
    ^
../../src/univalue/include/univalue.h:49:5: note: candidate constructor not viable: no known conversion from 'std::u8string' (aka 'basic_string<char8_t>') to 'const char *' for 1st argument
    UniValue(const char *val_) {
    ^
/usr/lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/basic_string.h:787:7: note: candidate function
      operator __sv_type() const noexcept
      ^
../../src/univalue/include/univalue.h:102:57: note: passing argument to parameter 'val' here
    bool pushKV(const std::string& key, const UniValue& val);
                                                        ^
4258 warnings and 1 error generated.
Error while processing /work/abc-ci-builds/build-clang-tidy/../../src/wallet/rpcwallet.cpp.
Suppressed 4258 warnings (4254 in non-user code, 4 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
Found compiler error(s).
[396/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[397/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[398/542] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[399/542] Linking CXX static library src/zmq/libzmq.a
[400/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/transaction.cpp.o
[401/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/signmessage.cpp.o
[402/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[403/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/receive.cpp.o
[404/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/util.cpp.o
[405/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/encrypt.cpp.o
[406/542] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[407/542] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[408/542] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[409/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/interfaces.cpp.o
[410/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[411/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[412/542] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[413/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/spend.cpp.o
[414/542] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[415/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[416/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[417/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1
PiRK planned changes to this revision.Jan 29 2024, 17:21

oops debugging change included

Tail of the build log:

[451/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/avalanche/proof.cpp.o
[452/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/net_permissions.cpp.o
[453/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/netaddress.cpp.o
[454/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/policy/block/minerfund.cpp.o
[455/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/avalanche/proofpool.cpp.o
[456/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/util/readwritefile.cpp.o
[457/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/netbase.cpp.o
[458/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/protocol.cpp.o
[459/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/util/error.cpp.o
[460/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/util/asmap.cpp.o
[461/607] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/arith_uint256.cpp.o
[462/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/timedata.cpp.o
[463/607] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/hash.cpp.o
[464/607] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/uint256.cpp.o
[465/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/util/sock.cpp.o
[466/607] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/util/strencodings.cpp.o
[467/607] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/pubkey.cpp.o
[468/607] Building C object src/secp256k1/CMakeFiles/secp256k1.dir/src/secp256k1.c.o
[469/607] Linking C static library src/secp256k1/libsecp256k1.a
[470/607] Building C object src/secp256k1/CMakeFiles/recover-bench.dir/src/bench_recover.c.o
[471/607] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/primitives/transaction.cpp.o
[472/607] Linking C executable src/secp256k1/recover-bench
[473/607] Building C object src/secp256k1/CMakeFiles/sign-bench.dir/src/bench_sign.c.o
[474/607] Linking C executable src/secp256k1/sign-bench
[475/607] Building C object src/secp256k1/CMakeFiles/verify-bench.dir/src/bench_verify.c.o
[476/607] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/amount.cpp.o
[477/607] Linking C executable src/secp256k1/verify-bench
[478/607] Building CXX object src/CMakeFiles/bitcoinconsensus.dir/consensus/tx_check.cpp.o
[479/607] Linking CXX static library src/libbitcoinconsensus.a
[480/607] Linking CXX static library src/libscript.a
[481/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/policy/block/stakingrewards.cpp.o
[482/607] Building CXX object src/CMakeFiles/bitcoinconsensus-shared.dir/script/bitcoinconsensus.cpp.o
[483/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/avalanche/peermanager.cpp.o
[484/607] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockindex.cpp.o
[485/607] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[486/607] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[487/607] Linking C executable src/secp256k1/ecmult-bench
[488/607] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[489/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/avalanche/processor.cpp.o
[490/607] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[491/607] Building CXX object src/CMakeFiles/bitcoind.dir/bitcoind.cpp.o
[492/607] Linking C executable src/secp256k1/internal-bench
[493/607] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[494/607] Building CXX object src/CMakeFiles/bitcoin-chainstate.dir/bitcoin-chainstate.cpp.o
[495/607] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[496/607] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[497/607] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[498/607] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[499/607] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[500/607] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[501/607] Building CXX object src/test/CMakeFiles/testutil.dir/util/validation.cpp.o
[502/607] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[503/607] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[504/607] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[505/607] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[506/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/net.cpp.o
[507/607] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[508/607] Building CXX object src/CMakeFiles/bitcoinkernel.dir/validation.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-without-wallet failed with exit code 1

Tail of the build log:

                 from ../../src/./span.h:8,
                 from ../../src/./wallet/rpc/backup.h:8,
                 from ../../src/wallet/rpc/backup.cpp:5:
/usr/include/c++/9/bits/stl_iterator.h:996:5: note: candidate: ‘template<class _Iterator, class _Container> __gnu_cxx::__normal_iterator<_Iterator, _Container> __gnu_cxx::operator+(typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)’
  996 |     operator+(typename __normal_iterator<_Iterator, _Container>::difference_type
      |     ^~~~~~~~
/usr/include/c++/9/bits/stl_iterator.h:996:5: note:   template argument deduction/substitution failed:
../../src/wallet/rpc/backup.cpp:965:40: note:   mismatched types ‘const __gnu_cxx::__normal_iterator<_Iterator, _Container>’ and ‘const char [85]’
  965 |                                        "move it out of the way first");
      |                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../src/wallet/rpc/backup.cpp:1077:55: error: cannot convert ‘std::u8string’ {aka ‘std::__cxx11::basic_string<char8_t>’} to ‘const UniValue&’
 1077 |             reply.pushKV("filename", filepath.u8string());
      |                                      ~~~~~~~~~~~~~~~~~^~
      |                                                       |
      |                                                       std::u8string {aka std::__cxx11::basic_string<char8_t>}
In file included from ../../src/./rpc/command.h:8,
                 from ../../src/./rpc/server.h:10,
                 from ../../src/wallet/rpc/backup.cpp:14:
../../src/univalue/include/univalue.h:102:57: note:   initializing argument 2 of ‘bool UniValue::pushKV(const string&, const UniValue&)’
  102 |     bool pushKV(const std::string& key, const UniValue& val);
      |                                         ~~~~~~~~~~~~~~~~^~~
[389/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
FAILED: src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o 
/usr/bin/ccache /usr/bin/c++ -DBOOST_ALL_NO_LIB -DBUILD_BITCOIN_INTERNAL -DENABLE_AVX2 -DENABLE_SHANI -DENABLE_SSE41 -DHAVE_BUILD_INFO -DHAVE_CONFIG_H -DHAVE_CONSENSUS_LIB -DLEVELDB_ATOMIC_PRESENT -DLEVELDB_PLATFORM_POSIX -DOS_LINUX -I../../src/. -Isrc -I../../src/univalue/include -Isrc/crypto/.. -I../../src/secp256k1/include -I../../src/leveldb/include -isystem /usr/include/jemalloc -isystem /usr/include/miniupnpc -Werror -g -O2 -fPIC -fvisibility=hidden -fstack-reuse=none -fstack-protector-all -Wstack-protector -fcf-protection=full -fstack-clash-protection -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Wextra -Wformat -Wvla -Wcast-align -Wunused-parameter -Wmissing-braces -Wredundant-decls -Wsign-compare -Wduplicated-branches -Wduplicated-cond -Wlogical-op -Wformat-security -Wredundant-move -Woverloaded-virtual -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-psabi -pthread -std=gnu++2a -MD -MT src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o -MF src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o.d -o src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o -c ../../src/wallet/rpcwallet.cpp
../../src/wallet/rpcwallet.cpp: In lambda function:
../../src/wallet/rpcwallet.cpp:2634:52: error: cannot convert ‘std::u8string’ {aka ‘std::__cxx11::basic_string<char8_t>’} to ‘const UniValue&’
 2634 |                 wallet.pushKV("name", path.u8string());
      |                                       ~~~~~~~~~~~~~^~
      |                                                    |
      |                                                    std::u8string {aka std::__cxx11::basic_string<char8_t>}
In file included from ../../src/./rpc/command.h:8,
                 from ../../src/./rpc/server.h:10,
                 from ../../src/wallet/rpcwallet.cpp:19:
../../src/univalue/include/univalue.h:102:57: note:   initializing argument 2 of ‘bool UniValue::pushKV(const string&, const UniValue&)’
  102 |     bool pushKV(const std::string& key, const UniValue& val);
      |                                         ~~~~~~~~~~~~~~~~^~~
[390/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/receive.cpp.o
[391/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[392/544] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[393/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/transaction.cpp.o
[394/544] Linking CXX static library src/zmq/libzmq.a
[395/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/util.cpp.o
[396/544] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[397/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[398/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/encrypt.cpp.o
[399/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/signmessage.cpp.o
[400/544] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[401/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[402/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[403/544] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[404/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/interfaces.cpp.o
[405/544] Building CXX object src/CMakeFiles/server.dir/validation.cpp.o
[406/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/spend.cpp.o
[407/544] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[408/544] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[409/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[410/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[411/544] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
ninja: build stopped: cannot make progress due to previous errors.
Build build-diff failed with exit code 1

revert debugging change in src/CMakeLists.txt

Tail of the build log:

[361/542] Building C object src/secp256k1/CMakeFiles/ecmult-bench.dir/src/bench_ecmult.c.o
[362/542] Linking C executable src/secp256k1/ecmult-bench
[363/542] Building C object src/secp256k1/CMakeFiles/internal-bench.dir/src/bench_internal.c.o
[364/542] Building CXX object src/CMakeFiles/server.dir/txdb.cpp.o
[365/542] Linking C executable src/secp256k1/internal-bench
[366/542] Building CXX object src/CMakeFiles/server.dir/validationinterface.cpp.o
[367/542] Building CXX object src/CMakeFiles/server.dir/txorphanage.cpp.o
[368/542] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockindex.cpp.o
[369/542] Building CXX object src/test/CMakeFiles/testutil.dir/util/logging.cpp.o
[370/542] Building CXX object src/CMakeFiles/server.dir/rpc/avalanche.cpp.o
[371/542] Building CXX object src/test/CMakeFiles/testutil.dir/util/str.cpp.o
[372/542] Building CXX object src/CMakeFiles/bitcoin-cli.dir/bitcoin-cli.cpp.o
[373/542] Building CXX object src/CMakeFiles/server.dir/torcontrol.cpp.o
[374/542] Linking CXX executable src/bitcoin-cli
[375/542] Building CXX object src/CMakeFiles/server.dir/net_processing.cpp.o
[376/542] Building CXX object src/CMakeFiles/server.dir/rpc/blockchain.cpp.o
[377/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/context.cpp.o
[378/542] Building CXX object src/CMakeFiles/server.dir/txmempool.cpp.o
[379/542] Building CXX object src/test/CMakeFiles/testutil.dir/util/transaction_utils.cpp.o
[380/542] Building CXX object src/test/CMakeFiles/testutil.dir/util/blockfilter.cpp.o
[381/542] Building CXX object src/CMakeFiles/server.dir/rpc/rawtransaction.cpp.o
[382/542] Building CXX object src/CMakeFiles/bitcoin-tx.dir/bitcoin-tx.cpp.o
[383/542] Linking CXX executable src/bitcoin-tx
[384/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/coincontrol.cpp.o
[385/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/db.cpp.o
[386/542] Building CXX object src/CMakeFiles/server.dir/wallet/init.cpp.o
[387/542] Building CXX object src/test/CMakeFiles/testutil.dir/util/validation.cpp.o
[388/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/crypter.cpp.o
[389/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/coinselection.cpp.o
[390/542] Building CXX object src/test/CMakeFiles/testutil.dir/util/mining.cpp.o
[391/542] Building CXX object src/test/CMakeFiles/testutil.dir/util/net.cpp.o
[392/542] Building CXX object src/test/CMakeFiles/testutil.dir/util/wallet.cpp.o
[393/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/bdb.cpp.o
[394/542] Building CXX object src/test/CMakeFiles/testutil.dir/util/setup_common.cpp.o
[395/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/fees.cpp.o
[396/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/transaction.cpp.o
[397/542] Building CXX object src/wallet/CMakeFiles/wallet-tool.dir/wallettool.cpp.o
[398/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/load.cpp.o
[399/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/util.cpp.o
[400/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/receive.cpp.o
[401/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/sqlite.cpp.o
[402/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/signmessage.cpp.o
[403/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/encrypt.cpp.o
[404/542] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/dns.cpp.o
[405/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/salvage.cpp.o
[406/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletutil.cpp.o
[407/542] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/options.cpp.o
[408/542] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/db.cpp.o
[409/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/spend.cpp.o
[410/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/interfaces.cpp.o
[411/542] Building CXX object src/seeder/CMakeFiles/bitcoin-seeder.dir/main.cpp.o
[412/542] Building CXX object src/seeder/CMakeFiles/seeder-base.dir/bitcoin.cpp.o
[413/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/scriptpubkeyman.cpp.o
[414/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpc/backup.cpp.o
[415/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/walletdb.cpp.o
[416/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/rpcwallet.cpp.o
[417/542] Building CXX object src/wallet/CMakeFiles/wallet.dir/wallet.cpp.o
[418/542] Linking CXX static library src/wallet/libwallet.a
ninja: build stopped: cannot make progress due to previous errors.
Build build-clang-tidy failed with exit code 1
Fabien requested changes to this revision.Jan 30 2024, 08:32
Fabien added a subscriber: Fabien.

Clang-tidy is still not happy

This revision now requires changes to proceed.Jan 30 2024, 08:32

fix parameter names when calling the new constructor

This revision is now accepted and ready to land.Jan 30 2024, 11:49