Can't build 0.13 on RHEL 7.2 bcos enabled libevent debuging #8691

issue unsystemizer opened this issue on September 9, 2016
  1. unsystemizer commented at 2:21 PM on September 9, 2016: contributor

    Download v0.13 to RHEL 7.2, install deps, get libevent RPMs from EPEL, build

    ...
    leveldb/util/logging.cc:58:53: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
               (v == kMaxUint64/10 && delta > kMaxUint64%10)) {
                                                         ^
      CXX      leveldb/util/leveldb_libleveldb_a-options.o
      CXX      leveldb/util/leveldb_libleveldb_a-status.o
      CXX      leveldb/port/leveldb_libleveldb_a-port_posix.o
      AR       leveldb/libleveldb.a
      CXX      leveldb/helpers/memenv/leveldb_libmemenv_a-memenv.o
      AR       leveldb/libmemenv.a
      CXXLD    bitcoind
    libbitcoin_server.a(libbitcoin_server_a-httpserver.o): In function `InitHTTPServer()':
    /source/bitcoin-0.13.0/src/httpserver.cpp:394: undefined reference to `event_enable_debug_logging'
    /source/bitcoin-0.13.0/src/httpserver.cpp:396: undefined reference to `event_enable_debug_logging'
    collect2: error: ld returned 1 exit status
    make[2]: *** [bitcoind] Error 1
    make[2]: Leaving directory `/source/bitcoin-0.13.0/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/source/bitcoin-0.13.0/src'
    make: *** [all-recursive] Error 1
    
    # rpm -qa | grep libevent
    libevent-2.0.21-4.el7.x86_64
    libevent-devel-2.0.21-4.el7.x86_64
    
    • Bitcoin v0.13 (release)
    • OS: RHEL7.2; kernel 3.10.0-327.28.3.el7.x86_64

    Poor man's workaround: I couldn't find the proper way in docs, so I went to the 2 offending locations in src/httpserver.cpp and removed libevent debugging (left only event_enable_debug_logging(EVENT_DBG_NONE);

  2. jonasschnelli commented at 9:45 AM on September 12, 2016: contributor

    hmm.. we should probably wrap the event_enable_debug_logging with a preprocessor #ifdef.

  3. jonasschnelli added the label RPC/REST/ZMQ on Sep 12, 2016
  4. jonasschnelli commented at 11:23 AM on September 12, 2016: contributor

    Can you try to get the version number form your installed libevent?

  5. laanwj commented at 2:56 PM on September 13, 2016: member

    We already fixed this issue once by putting a preprocessor ifdef around it:

     #if LIBEVENT_VERSION_NUMBER >= 0x02010100
    ... stuff with libevent debugging
    #endif
    

    It is strange that you get this as a linker error instead of a compilation error. If the function is not in the headers you'd get an error while compiling httpserver.cpp.

    Which makes me conclude that the ibevent headers found by the build system don't match the library you're linking against. Do you have multiple versions of libevent installed?

  6. laanwj added the label Build system on Sep 13, 2016
  7. unsystemizer commented at 10:19 AM on September 15, 2016: contributor

    The problem is there's no libevent-develop package for RHEL 7.2 so I built one from source. I installed the EPEL RPM for libevent itself, but there's no devel RPM so I uninstalled and built everything from 2.02 (IIRC) source. Maybe that's where the mismatch happened. Unfortunately the docs are for Fedora only so while I try to screw around with ./configure parameters I couldn't make it work. Maybe it'd be better to try with Fedora RPMs. I'll try that next.

  8. unsystemizer commented at 10:58 AM on September 15, 2016: contributor

    The corresponding version of Fedora is long dead. Ended up getting these 2 from CentOS 7.2 and then it worked:

    wget ftp://rpmfind.net/linux/centos/7.2.1511/os/x86_64/Packages/libevent-devel-2.0.21-4.el7.x86_64.rpm
    wget ftp://rpmfind.net/linux/centos/7.2.1511/os/x86_64/Packages/libevent-2.0.21-4.el7.x86_64.rpm
    rpm -i libevent-2.0.21-4.el7.x86_64.rpm libevent-devel-2.0.21-4.el7.x86_64.rpm
    
  9. unsystemizer closed this on Sep 15, 2016

  10. DrahtBot locked this on Sep 8, 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 15:15 UTC

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