-2

When I starting make I always get the same error. I think maybe it's have anything to do with Berkeley DB, but I'm not sure. I followed in this guide - https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md#berkeley-db

Making all in src
make[1]: Entering directory '/home/insaf/bitcoin/src'
make[2]: Entering directory '/home/insaf/bitcoin/src'
make[3]: Entering directory '/home/insaf/bitcoin'
make[3]: Leaving directory '/home/insaf/bitcoin'
  CXXLD    bitcoind
/usr/bin/ld: cannot find -ldb_cxx-4.8
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:5953: bitcoind] Error 1
make[2]: Leaving directory '/home/insaf/bitcoin/src'
make[1]: *** [Makefile:16272: all-recursive] Error 1
make[1]: Leaving directory '/home/insaf/bitcoin/src'
make: *** [Makefile:825: all-recursive] Error 1

output, when I type ./configure configure: WARNING: LRELEASE not found; bitcoin-qt frontend will not be built checking whether to build Bitcoin Core GUI... no checking for Berkeley DB C++ headers... default configure: error: Found Berkeley DB other than 4.8, required for portable BDB wallets (--with-incompatible-bdb to ignore or --without-bdb to disable BDB wallet support)

And yeah, I searched how I can install ldb_cxx, but I don't find it. When I launch ./install_db64.sh it gives next output:

db4 build complete.
  When compiling bitcoind, run `./configure` in the following way:
  export BDB_PREFIX='<PATH-TO>/db4'
  ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" ...

And I also did sudo pacman -S git base-devel And it:

./autogen.sh export BDB_PREFIX='/home/insaf/bitcoin/db4'                                                         ✔  5s  
  ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include"
0xActor
  • 614
  • 1
  • 5
  • 7
  • Did you install `libdb_cxx-4.8` and how? If you built it from source with `make install`, it's likely in `/usr/local/lib` instead of system-wide folder and that may require additional configuration. – Swift - Friday Pie Aug 03 '21 at 08:35
  • Apparently the `install_db4.sh` script gives you some guidance on how to invoke `configure`. Did you do so? Please edit your question with the arguments and output of the most recent `./configure` invocation. – Botje Aug 03 '21 at 08:37
  • I edit my question, I hope it's help you to help me xD – 0xActor Aug 03 '21 at 11:06
  • The user below has solved the problem, you did not set the BDB_PREFIX variable properly, once you do your system will link the proper ldb. – Poseidon May 05 '23 at 21:49

1 Answers1

0

I got the same error while building bitcoind using this tutorial. It was because I forgot to run export BDB_PREFIX=$(pwd)/db4 before the ./configure ... and the make.

Dharman
  • 30,962
  • 25
  • 85
  • 135
Teodor Anton
  • 835
  • 6
  • 8
  • This is literally the correct answer, anyone voting down on it has not a clue what they are on about. – Poseidon May 05 '23 at 21:47