Build error on Ubuntu 22.04.3 LTS #29017

issue centaur1 openend this issue on December 6, 2023
  1. centaur1 commented at 10:34 pm on December 6, 2023: contributor

    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

  2. maflcko commented at 7:32 am on December 7, 2023: member
    You’ll have to run make clean before compiling a different version of Bitcoin Core with make
  3. maflcko added the label Build system on Dec 7, 2023
  4. maflcko added the label Questions and Help on Dec 7, 2023
  5. centaur1 commented at 3:12 pm on December 7, 2023: contributor
    Duh. Thanks. It hadn’t needed that previously. :-)
  6. fanquake commented at 3:21 pm on December 7, 2023: member
    @centaur1 does that mean this is solved and issue should be closed?
  7. centaur1 closed this on Dec 7, 2023

  8. centaur1 commented at 3:22 pm on December 7, 2023: contributor
    Yes. I thought I hit “comment and close” but didn’t.

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