Is there an existing issue for this?
- I have searched the existing issues
Current behaviour
Building on 22.04.3 LTS (GNU/Linux 5.15.0-87-generic x86_64) results in this error:
test/base58_tests.cpp: In member function ‘void base58_tests::base58_EncodeBase58::test_method()’: test/base58_tests.cpp:26:44: error: invalid initialization of reference of type ‘const string&’ {aka ‘const std::__cxx11::basic_string&’} from expression of type ‘const unsigned char [1462]’ 26 | UniValue tests = read_json(json_tests::base58_encode_decode); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ In file included from test/base58_tests.cpp:8: ./test/util/json.h:12:39: note: in passing argument 1 of ‘UniValue read_json(const string&)’ 12 | UniValue read_json(const std::string& jsondata); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~ test/base58_tests.cpp: In member function ‘void base58_tests::base58_DecodeBase58::test_method()’: test/base58_tests.cpp:46:44: error: invalid initialization of reference of type ‘const string&’ {aka ‘const std::__cxx11::basic_string&’} from expression of type ‘const unsigned char [1462]’ 46 | UniValue tests = read_json(json_tests::base58_encode_decode); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ In file included from test/base58_tests.cpp:8: ./test/util/json.h:12:39: note: in passing argument 1 of ‘UniValue read_json(const string&)’ 12 | UniValue read_json(const std::string& jsondata); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~ make[2]: *** [Makefile:18370: test/test_bitcoin-base58_tests.o] Error 1 make[2]: *** Waiting for unfinished jobs…. make[2]: Leaving directory ‘/home/btc/bitcoin/src’ make[1]: *** [Makefile:20137: all-recursive] Error 1 make[1]: Leaving directory ‘/home/btc/bitcoin/src’ make: *** [Makefile:813: all-recursive] Error 1
Expected behaviour
It should compile like prior versions have :-)
Steps to reproduce
e.g. git checkout v26.0
./autogen.sh ./configure –disable-wallet make -j 6
Relevant log output
test/base58_tests.cpp: In member function ‘void base58_tests::base58_EncodeBase58::test_method()’: test/base58_tests.cpp:26:44: error: invalid initialization of reference of type ‘const string&’ {aka ‘const std::__cxx11::basic_string&’} from expression of type ‘const unsigned char [1462]’ 26 | UniValue tests = read_json(json_tests::base58_encode_decode); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ In file included from test/base58_tests.cpp:8: ./test/util/json.h:12:39: note: in passing argument 1 of ‘UniValue read_json(const string&)’ 12 | UniValue read_json(const std::string& jsondata); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~ test/base58_tests.cpp: In member function ‘void base58_tests::base58_DecodeBase58::test_method()’: test/base58_tests.cpp:46:44: error: invalid initialization of reference of type ‘const string&’ {aka ‘const std::__cxx11::basic_string&’} from expression of type ‘const unsigned char [1462]’ 46 | UniValue tests = read_json(json_tests::base58_encode_decode); | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~ In file included from test/base58_tests.cpp:8: ./test/util/json.h:12:39: note: in passing argument 1 of ‘UniValue read_json(const string&)’ 12 | UniValue read_json(const std::string& jsondata); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~ make[2]: *** [Makefile:18370: test/test_bitcoin-base58_tests.o] Error 1 make[2]: *** Waiting for unfinished jobs…. make[2]: Leaving directory ‘/home/btc/bitcoin/src’ make[1]: *** [Makefile:20137: all-recursive] Error 1 make[1]: Leaving directory ‘/home/btc/bitcoin/src’ make: *** [Makefile:813: all-recursive] Error 1
How did you obtain Bitcoin Core
Compiled from source
What version of Bitcoin Core are you using?
26.0
Operating system and version
22.04.3 LTS (GNU/Linux 5.15.0-87-generic x86_64)
Machine specifications
4GB RAM, 2 cores, 2TB