libevent compile issue #6758

issue kalgecin opened this issue on October 5, 2015
  1. kalgecin commented at 9:46 AM on October 5, 2015: none
    make[2]: Circular univalue/lib/libunivalue.la <- univalue/lib/libunivalue.la dependency dropped.
      CXXLD    bitcoind
    /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-httpserver.o): undefined reference to symbol 'event_free'
    /usr/lib/x86_64-linux-gnu/libevent_core-2.0.so.5: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    Makefile:2651: recipe for target 'bitcoind' failed
    make[2]: *** [bitcoind] Error 1
    make[2]: Leaving directory '/home/kalgecin/bitcoin/src'
    Makefile:6662: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/home/kalgecin/bitcoin/src'
    Makefile:628: recipe for target 'all-recursive' failed
    make: *** [all-recursive] Error 1
    

    ubuntu 15.04 64bit

    i have all the dependencies installed including libevent2 2.0-5 with the dev packages

  2. jonasschnelli commented at 9:48 AM on October 5, 2015: contributor

    Did you run ./autogen & ./configure after upgrading (git pull) your master branch?

  3. kalgecin commented at 12:49 PM on October 5, 2015: none

    yes, no errors were reported, i also tried deleting the repo and cloning anew with the same results

  4. jonasschnelli commented at 1:43 PM on October 5, 2015: contributor

    [...] DSO missing from command line

    Hmm.. i think you are missing a package. Very likely libevent-pthreads-2.*.

    Just tried to compile on my Ubuntu 15.04 VM. Works. Check my relevant packages:

    user@user-virtual-machine:~/bitcoin$ apt --installed list | grep libevent
    
    libevent-2.0-5/vivid,now 2.0.21-stable-2 amd64 [installed]
    libevent-core-2.0-5/vivid,now 2.0.21-stable-2 amd64 [installed,automatic]
    libevent-dev/vivid,now 2.0.21-stable-2 amd64 [installed]
    libevent-extra-2.0-5/vivid,now 2.0.21-stable-2 amd64 [installed,automatic]
    libevent-openssl-2.0-5/vivid,now 2.0.21-stable-2 amd64 [installed,automatic]
    libevent-pthreads-2.0-5/vivid,now 2.0.21-stable-2 amd64 [installed,automatic]
    
  5. allthingsgo commented at 3:18 PM on October 5, 2015: none

    I'm compiling bitcoin source on OSX 10.9 with Xcode 6.1.1 ... first try run of ./configure also reported error 'can't find libevent'. but a simple 'brew install libevent' resolved issue, for me at least.

  6. kalgecin commented at 7:53 AM on October 6, 2015: none
    kalgecin@blackpearl:~/bitcoin$ apt --installed list | grep libevent
    
    WARNING: apt does not have a stable CLI interface yet. Use with caution in scripts.
    
    libevent-2.0-5/vivid,now 2.0.21-stable-2 amd64 [installed]
    libevent-core-2.0-5/vivid,now 2.0.21-stable-2 amd64 [installed,automatic]
    libevent-dev/vivid,now 2.0.21-stable-2 amd64 [installed]
    libevent-extra-2.0-5/vivid,now 2.0.21-stable-2 amd64 [installed,automatic]
    libevent-openssl-2.0-5/vivid,now 2.0.21-stable-2 amd64 [installed,automatic]
    libevent-pthreads-2.0-5/vivid,now 2.0.21-stable-2 amd64 [installed,automatic]
    kalgecin@blackpearl:~/bitcoin$ 
    

    EDIT: with latest git pull

    make[3]: Leaving directory '/home/kalgecin/bitcoin/src/secp256k1'
      CXX      libbitcoin_util_a-clientversion.o
      AR       libbitcoin_util.a
      CXXLD    bitcoind
      CXXLD    bitcoin-cli
      CXXLD    bitcoin-tx
      OBJCXXLD qt/bitcoin-qt
      CXXLD    qt/test/test_bitcoin-qt
      CXXLD    test/test_bitcoin
    /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-httpserver.o): undefined reference to symbol 'event_free'
    /usr/lib/x86_64-linux-gnu/libevent_core-2.0.so.5: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    Makefile:2651: recipe for target 'bitcoind' failed
    make[2]: *** [bitcoind] Error 1
    make[2]: *** Waiting for unfinished jobs....
    /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-httpserver.o): undefined reference to symbol 'event_free'
    /usr/lib/x86_64-linux-gnu/libevent_core-2.0.so.5: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-httpserver.o): undefined reference to symbol 'event_free'
    /usr/lib/x86_64-linux-gnu/libevent_core-2.0.so.5: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    Makefile:2669: recipe for target 'qt/bitcoin-qt' failed
    make[2]: *** [qt/bitcoin-qt] Error 1
    Makefile:2689: recipe for target 'qt/test/test_bitcoin-qt' failed
    make[2]: *** [qt/test/test_bitcoin-qt] Error 1
    make[2]: Leaving directory '/home/kalgecin/bitcoin/src'
    Makefile:6662: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/home/kalgecin/bitcoin/src'
    Makefile:628: recipe for target 'all-recursive' failed
    make: *** [all-recursive] Error 1
    kalgecin@blackpearl:~/bitcoin$ 
    
  7. paveljanik commented at 7:56 AM on October 6, 2015: contributor

    Please show us the output of make V=1. It should show the command line used.

  8. kalgecin commented at 7:57 AM on October 6, 2015: none
    kalgecin@blackpearl:~/bitcoin$ make V=1
    Making all in src
    make[1]: Entering directory '/home/kalgecin/bitcoin/src'
    make[2]: Entering directory '/home/kalgecin/bitcoin/src'
    make[2]: Circular univalue/lib/libunivalue.la <- univalue/lib/libunivalue.la dependency dropped.
    make  -C secp256k1 libsecp256k1.la
    make[3]: Entering directory '/home/kalgecin/bitcoin/src/secp256k1'
    make[3]: Leaving directory '/home/kalgecin/bitcoin/src/secp256k1'
    /bin/bash ../libtool  --tag=CXX   --mode=link g++  -g -O2 -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wno-self-assign  -Wstack-protector -fstack-protector-all -fPIE  -pthread   -Wl,-z,relro -Wl,-z,now -pie -o bitcoind bitcoind-bitcoind.o  libbitcoin_server.a libbitcoin_common.a univalue/lib/libunivalue.la libbitcoin_util.a crypto/libbitcoin_crypto.a ./leveldb/libleveldb.a ./leveldb/libmemenv.a secp256k1/libsecp256k1.la libbitcoin_zmq.a -L/usr/local/lib -lzmq  libbitcoin_wallet.a -L/usr/lib/x86_64-linux-gnu -lboost_system -lboost_filesystem -lboost_program_options -lboost_thread -lboost_chrono -ldb_cxx-4.8 -lssl -lcrypto  -lcrypto  -lminiupnpc -levent_pthreads -levent  -levent  -lanl 
    libtool: link: g++ -g -O2 -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameter -Wno-self-assign -Wstack-protector -fstack-protector-all -fPIE -pthread -Wl,-z -Wl,relro -Wl,-z -Wl,now -pie -o bitcoind bitcoind-bitcoind.o  libbitcoin_server.a libbitcoin_common.a univalue/lib/.libs/libunivalue.a libbitcoin_util.a crypto/libbitcoin_crypto.a ./leveldb/libleveldb.a ./leveldb/libmemenv.a secp256k1/.libs/libsecp256k1.a libbitcoin_zmq.a -L/usr/local/lib /usr/local/lib/libzmq.so libbitcoin_wallet.a -L/usr/lib/x86_64-linux-gnu -lboost_system -lboost_filesystem -lboost_program_options -lboost_thread -lboost_chrono /usr/lib/libdb_cxx-4.8.so -lssl -lcrypto -lminiupnpc -levent_pthreads /usr/local/lib/libevent.so -lanl -pthread
    /usr/bin/ld: libbitcoin_server.a(libbitcoin_server_a-httpserver.o): undefined reference to symbol 'event_free'
    /usr/lib/x86_64-linux-gnu/libevent_core-2.0.so.5: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    Makefile:2651: recipe for target 'bitcoind' failed
    make[2]: *** [bitcoind] Error 1
    make[2]: Leaving directory '/home/kalgecin/bitcoin/src'
    Makefile:6662: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/home/kalgecin/bitcoin/src'
    Makefile:628: recipe for target 'all-recursive' failed
    make: *** [all-recursive] Error 1
    
  9. paveljanik commented at 8:01 AM on October 6, 2015: contributor

    libtool is using /usr/local/lib/libevent.so. Why?

  10. kalgecin commented at 8:44 AM on October 6, 2015: none
    kalgecin@blackpearl:~/bitcoin$ file /usr/local/lib/libevent.so 
    /usr/local/lib/libevent.so: symbolic link to `libevent-1.4.so.2.1.2'
    
  11. paveljanik commented at 9:01 AM on October 6, 2015: contributor

    Is it part of some package or some old strange lib? Can you try removing these for a test?

  12. kalgecin commented at 9:19 AM on October 6, 2015: none

    removing /usr/local/lib/libevent* and reinstalling all libevent packages resolved the issue. thanks

  13. kalgecin closed this on Oct 6, 2015

  14. paveljanik commented at 9:20 AM on October 6, 2015: contributor

    Great. Thanks for confirming.

  15. supere989 commented at 12:52 PM on December 3, 2016: none

    Bumping this with update, ubuntu 16.04 vm need to install libevent-dev

    $ sudo apt-get install libevent-dev

  16. MarcoFalke commented at 1:10 PM on December 3, 2016: member
  17. josephnicholas commented at 8:54 AM on January 16, 2018: none

    @paveljanik and @kalgecin

    Ran ./configure on the latest bitcoin repo in Mac OSX High Sierra. Had issues on libevent and proto buf. They were not found, but when I tried installing them through homebrew it said that its already installed.

    checking for exit in -lboost_chrono... yes checking whether the Boost::Unit_Test_Framework library is available... yes checking for dynamic linked boost test... yes checking for mismatched boost c++11 scoped enums... ok checking for libssl... yes checking for libcrypto... yes checking for protobuf... no configure: WARNING: libprotobuf not found; bitcoin-qt frontend will not be built checking for libevent... no configure: error: libevent not found.

    Warning: protobuf 3.5.1 is already installed Warning: libevent 2.1.8 is already installed

    My output for autogen.sh

    Josephs-MacBook-Pro:bitcoin josephnicholasr.alcantara$ ./autogen.sh glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. glibtoolize: copying file 'build-aux/ltmain.sh' glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'. glibtoolize: copying file 'build-aux/m4/libtool.m4' glibtoolize: copying file 'build-aux/m4/ltoptions.m4' glibtoolize: copying file 'build-aux/m4/ltsugar.m4' glibtoolize: copying file 'build-aux/m4/ltversion.m4' glibtoolize: copying file 'build-aux/m4/lt~obsolete.m4' configure.ac:45: installing 'build-aux/compile' configure.ac:45: installing 'build-aux/config.guess' configure.ac:45: installing 'build-aux/config.sub' configure.ac:28: installing 'build-aux/install-sh' configure.ac:28: installing 'build-aux/missing' Makefile.am: installing 'build-aux/depcomp' parallel-tests: installing 'build-aux/test-driver' glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. glibtoolize: copying file 'build-aux/ltmain.sh' glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'. glibtoolize: copying file 'build-aux/m4/libtool.m4' glibtoolize: copying file 'build-aux/m4/ltoptions.m4' glibtoolize: copying file 'build-aux/m4/ltsugar.m4' glibtoolize: copying file 'build-aux/m4/ltversion.m4' glibtoolize: copying file 'build-aux/m4/lt~obsolete.m4' configure.ac:10: installing 'build-aux/compile' configure.ac:5: installing 'build-aux/config.guess' configure.ac:5: installing 'build-aux/config.sub' configure.ac:9: installing 'build-aux/install-sh' configure.ac:9: installing 'build-aux/missing' Makefile.am: installing 'build-aux/depcomp' parallel-tests: installing 'build-aux/test-driver' glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'. glibtoolize: copying file 'build-aux/ltmain.sh' glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'build-aux/m4'. glibtoolize: copying file 'build-aux/m4/libtool.m4' glibtoolize: copying file 'build-aux/m4/ltoptions.m4' glibtoolize: copying file 'build-aux/m4/ltsugar.m4' glibtoolize: copying file 'build-aux/m4/ltversion.m4' glibtoolize: copying file 'build-aux/m4/lt~obsolete.m4' configure.ac:78: installing 'build-aux/compile' configure.ac:28: installing 'build-aux/config.guess' configure.ac:28: installing 'build-aux/config.sub' configure.ac:38: installing 'build-aux/install-sh' configure.ac:38: installing 'build-aux/missing' src/Makefile.am: installing 'build-aux/depcomp' parallel-tests: installing 'build-aux/test-driver'

  18. MarcoFalke commented at 4:52 PM on January 16, 2018: member

    @josephnicholas Please don't post to unrelated issues. Anyway, you could always fall back to using depends see "depends/Readme.md"

  19. MarcoFalke 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-17 15:15 UTC

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