macOS build error: bench/bench_bitcoin-data.o redefinition of 'block413567' #16567

issue brentkearney opened this issue on August 8, 2019
  1. brentkearney commented at 5:37 AM on August 8, 2019: none

    <!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! -->

    <!-- Describe the issue -->

    The latest master branch (as of commit e5fdda6) fails to compile on macOS 10.14.6.

    <!--- What behavior did you expect? -->

    <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

    Making all in src
      CXX      bench/bench_bitcoin-data.o
    In file included from bench/data.cpp:10:
    ./bench/data/block413567.raw.h:1:28: error: redefinition of 'block413567' with a different type: 'const unsigned char []' vs 'const std::vector<uint8_t>'
          (aka 'const vector<unsigned char>')
    static unsigned const char block413567[] = {
                               ^
    ./bench/data.h:14:35: note: previous declaration is here
    extern const std::vector<uint8_t> block413567;
                                      ^
    bench/data.cpp:11:40: error: use of undeclared identifier 'block413567_raw'; did you mean 'block413567'?
    const std::vector<uint8_t> block413567{block413567_raw, block413567_raw + sizeof(block413567_raw) / sizeof(block413567_raw[0])};
                                           ^~~~~~~~~~~~~~~
                                           block413567
    bench/data.cpp:11:28: note: 'block413567' declared here
    const std::vector<uint8_t> block413567{block413567_raw, block413567_raw + sizeof(block413567_raw) / sizeof(block413567_raw[0])};
                               ^
    bench/data.cpp:11:82: error: use of undeclared identifier 'block413567_raw'; did you mean 'block413567'?
    const std::vector<uint8_t> block413567{block413567_raw, block413567_raw + sizeof(block413567_raw) / sizeof(block413567_raw[0])};
                                                                                     ^~~~~~~~~~~~~~~
                                                                                     block413567
    bench/data.cpp:11:28: note: 'block413567' declared here
    const std::vector<uint8_t> block413567{block413567_raw, block413567_raw + sizeof(block413567_raw) / sizeof(block413567_raw[0])};
                               ^
    bench/data.cpp:11:108: error: use of undeclared identifier 'block413567_raw'; did you mean 'block413567'?
    const std::vector<uint8_t> block413567{block413567_raw, block413567_raw + sizeof(block413567_raw) / sizeof(block413567_raw[0])};
                                                                                                               ^~~~~~~~~~~~~~~
                                                                                                               block413567
    bench/data.cpp:11:28: note: 'block413567' declared here
    const std::vector<uint8_t> block413567{block413567_raw, block413567_raw + sizeof(block413567_raw) / sizeof(block413567_raw[0])};
                               ^
    bench/data.cpp:11:57: error: use of undeclared identifier 'block413567_raw'
    const std::vector<uint8_t> block413567{block413567_raw, block413567_raw + sizeof(block413567_raw) / sizeof(block413567_raw[0])};
                                                            ^
    5 errors generated.
    make[2]: *** [bench/bench_bitcoin-data.o] Error 1
    make[1]: *** [all-recursive] Error 1
    make: *** [all-recursive] Error 1
    

    <!--- How reliably can you reproduce the issue, what are the steps to do so? -->

    To reproduce:

    cd bitcoin
    make clean
    git pull origin master
    ./autogen.sh ; ./configure; make
    

    <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? -->

    Version: Latest source as of commit e5fdda68c6d2313edb74443f0d1e6d2ce2d97f5e

    <!-- What type of machine are you observing the error on (OS/CPU and disk type)? -->

    On machine: MacOS Mojave 10.14.6, MBP 2.9 GHz Intel Core i7, SSD

    <!-- For the GUI-related issue on Linux provide names and versions of a distro, a desktop environment and a graphical shell (if relevant). -->

    <!-- Any extra information that might be useful in the debugging process. -->

    <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. -->

    The conflig.log: https://pastebin.com/nA5F7gLZ

  2. fanquake commented at 5:39 AM on August 8, 2019: member

    Try a git clean -fx in your bitcoin dir. Then ./autogen.sh && ./configure && make -j4 again.

  3. brentkearney commented at 6:00 AM on August 8, 2019: none

    That did it. Thanks!

  4. brentkearney closed this on Aug 8, 2019

  5. MarcoFalke locked this on Dec 16, 2021

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: 2026-04-15 15:14 UTC

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