Bitcoin-abc: configure: error: libdb_cxx headers missing when installing on mac

Created on 7 Sep 2018  Â·  11Comments  Â·  Source: Bitcoin-ABC/bitcoin-abc

Describe the issue

That error as title occurred when installing on mac following build-osx.md

Specifically it occurs after executing ./configure

Many say brew link berkeley-db4 --force is required though it's not mentioned on build-osx.md and I did it.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

brew install automake berkeley-db libtool boost --c++11 miniupnpc openssl pkg-config protobuf --c++11 qt5 libevent

git clone https://github.com/Bitcoin-ABC/bitcoin-abc.git
cd bitcoin-abc

./autogen.sh

brew link berkeley-db4 --force
./configure

Expected behaviour

Installation is done without error

Actual behaviour

checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing, Bitcoin ABC requires this library for wallet functionality (--disable-wallet to disable wallet functionality)

What version of bitcoin-abc are you using?

Latest version as of September 7th

Machine specs:

  • OS: macOS 10.13.6
  • CPU: 2.2 GHz Intel Core i7
  • RAM: 16 GB 1600 MHz DDR3
  • Disk size: 256GB
  • Disk Type (HD/SDD): SDD

Any extra information that might be useful in the debugging process.

This is normally the contents of a debug.log or config.log file. Raw text or a link to a pastebin type site are preferred.

help wanted

Most helpful comment

Works on Debian with DB 4.8
../configure BDB_CFLAGS="-I${BDB_PREFIX}/include/" BDB_LIBS="-L${BDB_PREFIX}/lib/ -ldb_cxx-4.8"

All 11 comments

I have the same issue on Ubuntu 16.04

I'm not sure about OSX, so I've marked the ticket as Help Wanted for those with OSX machines. For Linux, following the libdb install instructions in doc/build-unix.md should work.

After fighting with this issue for a while, @matiu helped me finally get to the bottom if it.

First – Bitcoin ABC uses the latest version of Berkeley DB, so if you're looking at this issue, it's likely because you've tried to build another Satoshi fork which hasn't made this upgrade yet. (Unlimited, Core, etc.) If you have installed berkeley-db@4, it might take some unwinding to get it cleaned out.

  • Make sure you don't have any references to berkeley-db@4 in ~/.bash_profile or equivalent (it shouldn't be exported into PATH, LDFLAGS, or CPPFLAGS)
  • brew unlink berkeley-db@4 && brew unlink berkeley-db && brew uninstall berkeley-db@4 && brew uninstall berkeley-db
  • brew install berkeley-db
  • Clean the bitcoin-abc directory to make sure none of the previous configuration sticks around: git clean -dfx (this deletes all of your uncommitted files)
  • then build the project again ./autogen.sh && mkdir build && cd build && ../configure && make

For me the problem was actually the version of my libdb_cxx.h – even after I installed the latest version of berkeley-db with brew, brew didn't replace the header file (I had the berkeley-db@4 header, but the latest version of the .dylib).

Once I cleaned out all the previous berkeley-db installations and reinstalled, it worked immediately. (It might be a bug in brew, but I'm not confident enough about that to report it – probably just something I broke.)

If you're still having trouble, check the config.log for the full error and post it here.

I cannot get brew to work on Ubuntu properly nor can I compile Bitcoin ABC after downloading the Berkeley DB manually. This is so frustrating.

Same issue as above - I have been fighting this for a while but nothing works.

@axelay @Gerryrulz after running ./configure, check for configure.log for the precise error.

also, search your filesystem for the file 'libdb_cxx.h' and check its location

@matiu thanks that put me on the right track.
I had the Berkeley DB 4.8 installed whereas the new code requires the latest version. I installed version 5.3.28 and it now compiles perfectly fine.

@axelay you are welcome! I am glad you made it work, have fun!

I came across the same issue. I tried many times but I am not able to get over this issue. So what I did instead is to ignore this as a warning. It worked fine. Majority of the times the problem is with the configuration of berkeleydb.

Works on Debian with DB 4.8
../configure BDB_CFLAGS="-I${BDB_PREFIX}/include/" BDB_LIBS="-L${BDB_PREFIX}/lib/ -ldb_cxx-4.8"

Works on Debian with DB 4.8
../configure BDB_CFLAGS="-I${BDB_PREFIX}/include/" BDB_LIBS="-L${BDB_PREFIX}/lib/ -ldb_cxx-4.8"

Thanks! This works on Ubuntu too!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

prusnak picture prusnak  Â·  4Comments

erasmospunk picture erasmospunk  Â·  9Comments

NickTh1 picture NickTh1  Â·  7Comments

jjz picture jjz  Â·  6Comments

TheBlueMatt picture TheBlueMatt  Â·  9Comments