On OS/X, configure does not detect installed Berkeley DB. #3550

issue ghost openend this issue on January 17, 2014
  1. ghost commented at 4:09 am on January 17, 2014: none

    Hi, I have built and installed Berkeley DB 6.0, which is what Oracle has made most readily available. In the bitcoin directory, I ran autogen.sh, then configure. I show where Berkeley DB is. There are two configure attempts below. First I don’t specify BDB_LIBS and BDB_CPPFLAGS, and configure doesn’t find Berkeley DB, but when I do specify them in the second attempt, it still doesn’t.

    Darkstar:bitcoin zack$ ./configure … checking stdio.h usability… yes checking stdio.h presence… yes checking for stdio.h… yes checking for stdlib.h… (cached) yes checking for unistd.h… (cached) yes checking for strings.h… (cached) yes checking for sys/types.h… (cached) yes checking for sys/stat.h… (cached) yes checking for MSG_NOSIGNAL… no checking for Berkeley DB C++ headers… no configure: error: libdb_cxx headers missing Darkstar:bitcoin zack$ Darkstar:bitcoin zack$ find /usr -name “libdb_cxx*” /usr/local/BerkeleyDB.6.0/lib/libdb_cxx-6.0.a /usr/local/BerkeleyDB.6.0/lib/libdb_cxx-6.0.dylib /usr/local/BerkeleyDB.6.0/lib/libdb_cxx-6.0.la /usr/local/BerkeleyDB.6.0/lib/libdb_cxx-6.dylib /usr/local/BerkeleyDB.6.0/lib/libdb_cxx.a /usr/local/BerkeleyDB.6.0/lib/libdb_cxx.dylib find: /usr/sbin/authserver: Permission denied Darkstar:bitcoin zack$ ls /usr/local/lib/pkgconfig jansson.pc libavfilter.pc libblkmaker_jansson-0.1.pc libevent_openssl.pc libswscale.pc libavcodec.pc libavformat.pc libcurl.pc libevent_pthreads.pc zlib.pc libavdevice.pc libavutil.pc libevent.pc libswresample.pc Darkstar:bitcoin zack$ Darkstar:bitcoin zack$ ls /usr/local/BerkeleyDB.6.0/include/ db.h db_cxx.h Darkstar:bitcoin zack$ ./configure BDB_LIBS=/usr/local/BerkeleyDB.6.0/lib BDB_CPPFLAGS=-I/usr/local/BerkeleyDB.6.0/include checking build system type… x86_64-apple-darwin13.0.0 checking host system type… x86_64-apple-darwin13.0.0 checking for a BSD-compatible install… /usr/bin/install -c checking whether build environment is sane… yes checking for a thread-safe mkdir -p… src/build-aux/install-sh -c -d checking for gawk… no checking for mawk… no checking for nawk… no checking for awk… awk checking whether make sets $(MAKE)… yes checking whether make supports nested variables… yes checking whether to enable maintainer-specific portions of Makefiles… yes checking whether make supports nested variables… (cached) yes checking for g++… g++ checking whether the C++ compiler works… yes checking for C++ compiler default output file name… a.out checking for suffix of executables… checking whether we are cross compiling… no checking for suffix of object files… o checking whether we are using the GNU C++ compiler… yes checking whether g++ accepts -g… yes checking for style of include used by make… GNU checking dependency style of g++… gcc3 checking for gcc… gcc checking whether we are using the GNU C compiler… yes checking whether gcc accepts -g… yes checking for gcc option to accept ISO C89… none needed checking whether gcc understands -c and -o together… yes checking dependency style of gcc… gcc3 checking how to run the C preprocessor… gcc -E checking how to run the C++ preprocessor… g++ -E checking for gcc… gcc checking whether we are using the GNU Objective C compiler… yes checking whether gcc accepts -g… yes checking dependency style of gcc… gcc3 checking for g++… g++ checking whether we are using the GNU Objective C++ compiler… yes checking whether g++ accepts -g… yes checking dependency style of g++… gcc3 checking for a sed that does not truncate output… /usr/bin/sed checking for ar… /usr/bin/ar checking for ranlib… /usr/bin/ranlib checking for strip… /usr/bin/strip checking for gcov… /usr/bin/gcov checking for lcov… no checking for java… /usr/bin/java checking for genhtml… no checking for git… /usr/bin/git checking for ccache… no checking for xgettext… no checking for hexdump… /usr/bin/hexdump checking for pkg-config… /usr/local/bin/pkg-config checking pkg-config is at least version 0.9.0… yes checking for port… no checking for brew… no checking for grep that handles long lines and -e… /usr/bin/grep checking for egrep… /usr/bin/grep -E checking for ANSI C header files… yes checking for sys/types.h… yes checking for sys/stat.h… yes checking for stdlib.h… yes checking for string.h… yes checking for memory.h… yes checking for strings.h… yes checking for inttypes.h… yes checking for stdint.h… yes checking for unistd.h… yes checking whether byte ordering is bigendian… no checking if compiler needs -Werror to reject unknown flags… yes checking whether pthreads work with -pthread… yes checking for joinable pthread attribute… PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads… -D_THREAD_SAFE checking for PTHREAD_PRIO_INHERIT… yes checking for special C compiler options needed for large files… no checking for _FILE_OFFSET_BITS value needed for large files… no checking whether the linker accepts -Wl,–large-address-aware… no checking whether C++ compiler accepts -Wstack-protector… yes checking whether C++ compiler accepts -fPIE… yes checking whether C++ preprocessor accepts -D_FORTIFY_SOURCE=2… yes checking whether the linker accepts -Wl,–dynamicbase… no checking whether the linker accepts -Wl,–nxcompat… no checking whether the linker accepts -Wl,-z,relro… no checking whether the linker accepts -Wl,-z,now… no checking whether C++ compiler accepts -fno-stack-protector… yes checking whether C++ compiler accepts -fstack-protector-all… yes checking whether the linker accepts -pie… yes checking whether the linker accepts -Wl,-dead_strip… yes checking stdio.h usability… yes checking stdio.h presence… yes checking for stdio.h… yes checking for stdlib.h… (cached) yes checking for unistd.h… (cached) yes checking for strings.h… (cached) yes checking for sys/types.h… (cached) yes checking for sys/stat.h… (cached) yes checking for MSG_NOSIGNAL… no checking for Berkeley DB C++ headers… no configure: error: libdb_cxx headers missing

    I’m OK with renaming a subdirectory to db60 or whatever, but if I specify a directory, shouldn’t configure find it?

  2. laanwj commented at 7:04 am on January 17, 2014: member
    Bitcoin is not compatible with BerkelyDB 6.0+. You need 4.8 (recommended) or 5.x.
  3. ghost commented at 2:15 am on January 18, 2014: none
    I have now installed Berkeley DB 4.8, and the result is the same. The default directory that it goes into is /usr/local/BerkeleyDB.4.8, which configure does not recognize, whether I specify it or not. So I renamed that to /usr/local/db48 and it is still not found, whether I specify it or not e.g. ./configure BDB_LIBS=/usr/local/db48/lib BDB_CPPFLAGS=-I/usr/local/db48/include does not work. Why has the configuration been written in a way that ignores the default installation directory?
  4. laanwj commented at 7:46 am on January 18, 2014: member
    Yes that would be better, you’d need to add support for that to src/m4/bitcoin_find_bdb48.m4. see also #2998
  5. ghost commented at 5:53 pm on January 18, 2014: none

    I had no luck modifying src/m4/bitcoin_find_bdb48.m4.

    Also I tried moving the DB 4.8 include files and libraries into locations identical to those on Slackware Linux 14, in which Bitcoin configures just fine, and this did not work either.

    ls -RF /usr/include db@ db.h db48/ db_cxx.h miniupnpc/ utarray.h uthash.h utlist.h utstring.h /usr/include/db48: db.h db_cxx.h

    ls /usr/lib/libdb* /usr/lib/libdb-4.8.a /usr/lib/libdb-4.8.la /usr/lib/libdb.a /usr/lib/libdbm.dylib /usr/lib/libdb-4.8.dylib /usr/lib/libdb-4.dylib /usr/lib/libdb.dylib

  6. coincapsig commented at 11:41 am on February 2, 2014: none
    This can be fixed by doing the following: cd ~/db-4.8.30.NC/build_unix make sudo make install Check that there is a BerkeleyDB.4.8 folder in /usr/local ls /usr/local then create a symbolic link: ln -s /usr/local/BerkeleyDB.4.8 /usr/include/db4.8 and then do: ln -s /usr/local/db4.8/include/* /usr/include ln -s /usr/local/db4.8/lib/* /usr/lib
  7. felipelalli commented at 8:04 am on May 16, 2014: none

    configure: error: libdb_cxx headers missing

    :(

  8. haxwell commented at 1:28 pm on August 26, 2014: none
    There is a section in README.md which describes building Berkeley DB 4.8 from source. That got me around the config error.
  9. Pokerkoffer commented at 2:49 pm on November 21, 2014: none

    checking for Berkeley DB C++ headers… default checking for main in -ldb_cxx-4.8… no checking for main in -ldb_cxx… no

    I followed exactly the steps in the readme, i tried all solutions mentioned above but it wont work. There are is no main function, does anyone have a solution?

  10. jonasschnelli commented at 3:13 pm on November 21, 2014: contributor

    @cheetah182 Did you try install BDB through brew with this formula where it switches to the interactive mode where you have to compile it by yourself? https://raw.github.com/mxcl/homebrew/master/Library/Formula/berkeley-db4.rb

    Have a look here https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md#installing-berkeley-db4-using-homebrew

  11. Pokerkoffer commented at 3:15 pm on November 21, 2014: none
    As is said before, i tried all steps in the readme, including the interactive mode. Still not working
  12. jonasschnelli commented at 3:20 pm on November 21, 2014: contributor
    So you did also brew link --force berkeley-db4? In which OS X version do you build?
  13. Pokerkoffer commented at 3:22 pm on November 21, 2014: none
    It says it is optional to –force link, but yes i did that, too. I’m running latest Yosemite with all available updates installed. Thanks for your help so far!
  14. jonasschnelli commented at 3:55 pm on November 21, 2014: contributor
    can you pastbin your full config.log? I’m building also on osx Yosemite without problems.
  15. Pokerkoffer commented at 4:06 pm on November 21, 2014: none

    Sure: http://pastebin.com/kE37izmR

    EDIT: Nevermind, i just updated gcc to 4.9.2 and that solved the issue. Thanks anyways!

  16. laanwj closed this on Dec 30, 2014

  17. SCDeveloper commented at 10:22 pm on July 27, 2016: none

    on osx simply:

    brew install berkeley-db4

    and then:

    brew link berkeley-db4 –force

  18. lhty24 commented at 9:48 pm on September 10, 2019: none
    bruhh you just made my day
  19. fanquake locked this on Jun 10, 2021
  20. fanquake deleted a comment on Jun 10, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-10-30 03:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me