0

I keep getting this error message after running 'make' or 'make check':

Making check in src
  CXXLD    bitcoind
Undefined symbols for architecture x86_64:
  "__ZN2Db6verifyEPKcS1_PSoj", referenced from:
      __ZN16BerkeleyDatabase6VerifyER13bilingual_str in libbitcoin_wallet.a(libbitcoin_wallet_a-bdb.o)
  "__ZN5boost10filesystem4path5imbueERKSt6locale", referenced from:
      __Z16SetupEnvironmentv in libbitcoin_util.a(libbitcoin_util_a-system.o)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[2]: *** [bitcoind] Error 1
make[1]: *** [check-recursive] Error 1
make: *** [check-recursive] Error 1

Any ideas on how to fix it?

3
  • How did you install Berkeley-DB? What compiler are you using to build Core?
    – MCCCS
    Commented Mar 15, 2021 at 19:31
  • I installed Berkeley-DB using brew (brew install berkeley-db4) and am using gcc-10. I had to explicitly configure like this though because compiling C++ on Catalina is a pain: './configure CXX=g++-10 CPP=cpp-10 CC=gcc-10' Commented Mar 15, 2021 at 19:35
  • I don't think setting CPP is needed. I set the variables with export in ~/.zprofile and configure automatically takes them from the env
    – MCCCS
    Commented Mar 15, 2021 at 19:49

1 Answer 1

1

Berkeley-db from brew which is clang compiled is GCC incompatible. Either Recompile berkeley-db4 with GCC:

HOMEBREW_CC=gcc-10 HOMEBREW_CXX=g++-10 brew reinstall --build-from-source berkeley-db4

or compile Core with clang

Discussion: https://github.com/bitcoin/bitcoin/issues/3228

7
  • Thanks for the reply - that fixed the Berkeley-DB problem but I just received this error message after running 'make check': Undefined symbols for architecture x86_64: "__ZN5boost10filesystem4path5imbueERKSt6locale", referenced from: __Z16SetupEnvironmentv in libbitcoin_util.a(libbitcoin_util_a-system.o) ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status make[2]: *** [bitcoind] Error 1 make[1]: *** [check-recursive] Error 1 make: *** [check-recursive] Error 1 . Any ideas how to fix this one? Commented Mar 15, 2021 at 20:28
  • You need to rebuild boost too similarly
    – MCCCS
    Commented Mar 15, 2021 at 20:33
  • I'm struggling to figure out the command to do that - do you know what it should be? Commented Mar 15, 2021 at 23:41
  • Running HOMEBREW_CC=gcc-10 HOMEBREW_CXX=g++-10 brew install --build-from-source boost --HEAD or brew install boost --build-from-source --HEAD leads to the following patch error: ==> Patching ==> Applying 7b3fc734242eea9af734d6cd8ccb3d8f6b64c5b2.patch patching file boost-install.jam Hunk #1 FAILED at 483. 1 out of 1 hunk FAILED -- saving rejects to file boost-install.jam.rej Commented Mar 15, 2021 at 23:58
  • Remove --HEAD
    – MCCCS
    Commented Mar 16, 2021 at 7:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.