[build][benchmark] Build fails on Ubuntu 18.04, bench errors #16479

issue givanse opened this issue on July 28, 2019
  1. givanse commented at 6:29 PM on July 28, 2019: contributor

    The build fails, make fails with:

    In file included from bench/data.cpp:10:0:
    ./bench/data/block413567.raw.h:1:40: error: conflicting declaration ‘const unsigned char benchmark::data::block413567 []’
     static unsigned const char block413567[] = {
                                            ^
    In file included from bench/data.cpp:5:0:
    ./bench/data.h:14:35: note: previous declaration as ‘const std::vector<unsigned char> benchmark::data::block413567’
     extern const std::vector<uint8_t> block413567;
                                       ^~~~~~~~~~~
    ...
    
    /usr/include/c++/7/bits/stl_vector.h:270:7: note:   candidate expects 1 argument, 2 provided
    /usr/include/c++/7/bits/stl_vector.h:259:7: note: candidate: std::vector<_Tp, _Alloc>::vector() [with _Tp = unsigned char; _Alloc = std::allocator<unsigned char>]
           vector()
           ^~~~~~
    /usr/include/c++/7/bits/stl_vector.h:259:7: note:   candidate expects 0 arguments, 2 provided
    Makefile:10306: recipe for target 'bench/bench_bench_bitcoin-data.o' failed
    make[2]: *** [bench/bench_bench_bitcoin-data.o] Error 1
    

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

    100% repro. Steps are to follow the instructions found at https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md

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

    Compiling latest: https://github.com/bitcoin/bitcoin/commit/3489b715120b1bf7559fbddf03cd87b889fdca47

    Configuration:

    Build Options:
      with endomorphism   = no
      with ecmult precomp = yes
      with jni            = no
      with benchmarks     = yes
      with coverage       = no
      module ecdh         = no
      module recovery     = yes
    
      asm                 = x86_64
      bignum              = no
      field               = 64bit
      scalar              = 64bit
    
      CC                  = gcc
      CFLAGS              = -g -O2 -W -std=c89 -pedantic -Wall -Wextra -Wcast-align -Wnested-externs -Wshadow -Wstrict-prototypes -Wno-unused-function -Wno-long-long -Wno-overlength-strings -fvisibility=hidden -O3
      CPPFLAGS            = 
      LDFLAGS             = 
    
    Fixing libtool for -rpath problems.
    
    Options used to compile and link:
      with wallet   = yes
      with gui / qt = yes
        with bip70  = yes
        with qr     = yes
      with zmq      = no
      with test     = yes
        with fuzz   = no
      with bench    = no
      with upnp     = yes
      use asm       = yes
      sanitizers    = 
      debug enabled = yes
      gprof enabled = no
      werror        = no
    
      target os     = linux
      build os      = 
    
      CC            = gcc
      CFLAGS        = -g -O2
      CPPFLAGS      =  -DDEBUG -DDEBUG_LOCKORDER  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS
      CXX           = g++ -std=c++11
      CXXFLAGS      =  -Og -g3 -ftrapv  -fstack-reuse=none -Wstack-protector -fstack-protector-all  -Wall -Wextra -Wformat -Wvla -Wformat-security -Wredundant-decls  -Wno-unused-parameter -Wno-implicit-fallthrough   
      LDFLAGS       = -pthread  -Wl,-z,relro -Wl,-z,now -pie  
      ARFLAGS       = cr
    

    OS: Ubuntu 18.04

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

    A workaround is to disable benchmarks: ./configure --disable-bench

  2. givanse renamed this:
    Building on Ubuntu 18.04 fails
    [build][benchmark] Build fails on Ubuntu 18.04, bench errors
    on Jul 28, 2019
  3. MarcoFalke commented at 8:10 PM on July 28, 2019: member

    Have you tried make clean or make distclean?

  4. givanse commented at 9:48 PM on July 28, 2019: contributor

    I hadn't, that is what I needed 😊Thanks!

    ./configure
    make clean
    make
    
  5. givanse closed this on Jul 28, 2019

  6. lacksfish commented at 9:14 PM on August 16, 2019: none

    Had the same issue on Ubuntu 19.04 on master at b80cdfec9a079b841194c7026faddbd496e1dfc0

    Trying again with ./configure --disable-bench ...

  7. DrahtBot 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-13 21:14 UTC

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