Skip to content

util-{util,wallet}: undefined reference to `evhttp_uridecode' #29654

Closed

Description

@luke-jr
...
  CXXLD    libbitcoinconsensus.la
  AR       libbitcoin_util.a
  CXXLD    bitcoin-cli
  CXXLD    bitcoin-tx
  CXXLD    bitcoin-util
/usr/bin/ld: libbitcoin_common.a(libbitcoin_common_a-url.o): in function `urlDecode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/hassen/Workspace/OpenSource/bitcoin/src/common/url.cpp:15:(.text+0x61): undefined reference to `evhttp_uridecode'
/usr/bin/ld: libbitcoin_common.a(libbitcoin_common_a-url.o): in function `urlDecode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/home/hassen/Workspace/OpenSource/bitcoin/src/common/url.cpp:15:(.text+0x61): undefined reference to `evhttp_uridecode'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:7407: bitcoin-util] Error 1
make[2]: *** Waiting for unfinished jobs....
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:7403: bitcoin-tx] Error 1
make[2]: Leaving directory '/home/hassen/Workspace/OpenSource/bitcoin/src'
make[1]: *** [Makefile:20138: all-recursive] Error 1
make[1]: Leaving directory '/home/hassen/Workspace/OpenSource/bitcoin/src'
make: *** [Makefile:814: all-recursive] Error 1

https://bitcoin.stackexchange.com/questions/121257/build-phase-fails-with-undefined-reference-to-evhttp-uridecode/122293#122293

Activity

  1. added this to the 26.1 milestone on Mar 15, 2024
  2. maflcko commented on Mar 15, 2024

    @maflcko
    Member

    What are the exact steps to reproduce on a fresh install? I tried on mantic with the steps provided and it passed:

    export DEBIAN_FRONTEND=noninteractive && apt update && apt install git vim ccache -y && git clone https://github.com/bitcoin/bitcoin.git --branch=26.x  --depth=1 ./bitcoin-core && cd bitcoin-core && apt install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3-zmq systemtap-sdt-dev     libevent-dev libboost-dev   -y   &&  ./autogen.sh && ./configure --disable-bench --disable-fuzz-binary --enable-debug --without-gui             --enable-suppress-external-warnings --disable-wallet   && make -j $(nproc)
    
  3. removed this from the 26.1 milestone on Mar 15, 2024
  4. hebasto commented on Mar 18, 2024

    @hebasto
    Member
  5. laanwj commented on Apr 11, 2024

    @laanwj
    Member

    bitcoin-util doesn't seem to be linked against libevent. It also doesn't actually use that function. Normally, the linker would drop unused object files, but somehow it doesn't in this user's case. It shouldn't be linking in that object (common/url.o) in the first place.

  6. added a commit that references this issue on Apr 25, 2024
    16a6174
  7. locked and limited conversation to collaborators on Apr 25, 2025
  8. added a commit that references this issue on Jun 21, 2026
    4c48c1a
  9. added a commit that references this issue on Sep 10, 2026
    52a506d
  10. added a commit that references this issue on Sep 23, 2026
    161233f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions