[build] cannot build tests using v26.0 #29051

issue nymkappa openend this issue on December 11, 2023
  1. nymkappa commented at 9:12 am on December 11, 2023: none

    Is there an existing issue for this?

    • I have searched the existing issues

    Current behaviour

    I’m trying to upgrade to core v26.0 on macOS (M1 processor) but I’m getting the following error when building from sources:

     0  CXX      test/test_bitcoin-base58_tests.o
     1test/base58_tests.cpp:26:22: error: no matching function for call to 'read_json'
     2    UniValue tests = read_json(json_tests::base58_encode_decode);
     3                     ^~~~~~~~~
     4./test/util/json.h:12:10: note: candidate function not viable: no known conversion from 'const unsigned char[1462]' to 'const std::string' (aka 'const basic_string<char>') for 1st argument
     5UniValue read_json(const std::string& jsondata);
     6         ^
     7test/base58_tests.cpp:46:22: error: no matching function for call to 'read_json'
     8    UniValue tests = read_json(json_tests::base58_encode_decode);
     9                     ^~~~~~~~~
    10./test/util/json.h:12:10: note: candidate function not viable: no known conversion from 'const unsigned char[1462]' to 'const std::string' (aka 'const basic_string<char>') for 1st argument
    11UniValue read_json(const std::string& jsondata);
    12         ^
    132 errors generated.
    14make[2]: *** [test/test_bitcoin-base58_tests.o] Error 1
    15make[2]: *** Waiting for unfinished jobs....
    16make[1]: *** [all-recursive] Error 1
    17make: *** [all-recursive] Error 1
    

    Previous tag (v25.1) is building fine. I’ve also tested latest master @ 3e691258d8789a4a89cce42e7e71b130491594d7 and resulted in the same error.

    Expected behaviour

    Should build just fine.

    Steps to reproduce

    ./configure && make -j 4

    Relevant log output

    No response

    How did you obtain Bitcoin Core

    Compiled from source

    What version of Bitcoin Core are you using?

    v26.0 @ 44d8b13c81e5276eb610c99f227a4d090cc532f6

    Operating system and version

    macOS Sonoma 14.1.12 (23B92)

    Machine specifications

    macBook Pro with Apple M1 Max chip

  2. willcl-ark commented at 9:13 am on December 11, 2023: contributor
    Have you run make clean since updating your local repo to v26.0?
  3. nymkappa commented at 9:46 am on December 11, 2023: none

    Have you run make clean since updating your local repo to v26.0?

    I did not. I was not aware I should do this when upgrading. Thanks for the tip. It builds and run fine now on v26.0 @ 44d8b13c81e5276eb610c99f227a4d090cc532f6. All tests also passed. Thank you!

  4. nymkappa closed this on Dec 11, 2023


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-01 10:13 UTC

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