Bitcoin

bitcoin core – Build step fails due to undefined reference to `evhttp_uridecode`.

I tried to build Bitcoin Core on an Ubuntu 23.10 system using the “Build Unix” documentation page, but it fails due to an undefined reference to: evhttp_uridecode.

Here are the details:

First I cloned the repository locally and used the v26.0 tag.

git clone (email protected):bitcoin/bitcoin.git
cd bitcoin
git checkout v26.0

Then I installed the required packages.

sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential libtool autotools-dev automake pkg-config bsdmainutils python3
sudo apt install -y libevent-dev libboost-dev
sudo apt install -y libzmq3-dev systemtap-sdt-dev

I’m not interested in creating a wallet, just the P2P protocol, so I skipped the other installations.

Then we start the build phase.

./autogen.sh
./configure --disable-bench --disable-fuzz-binary --enable-debug --without-gui \
            --enable-suppress-external-warnings --disable-wallet
make -j 4

this last make The command returns an error after a while.

...
  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

That seems to be the problem. evhttp_uridecode Can’t find it. But I’m pretty sure I installed all the required packages.

If this may help, run: uname -a On my machine this returns:

Linux XPS-machine 6.5.0-14-generic #14-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 14 14:59:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Thanks for your help.

Related Articles

Back to top button