diff options
| author | langerhans <[email protected]> | 2015-06-25 00:33:21 +0200 |
|---|---|---|
| committer | langerhans <[email protected]> | 2015-06-25 22:59:34 +0200 |
| commit | 963e237e0e501c71d6837f354dfd7a5c1de2f65e (patch) | |
| tree | 5068df8bb522890b735d2bae70bb395a7b2328b7 | |
| parent | Update dependency builder and its packages to be ready for Dogecoin specifics (diff) | |
| download | discoin-963e237e0e501c71d6837f354dfd7a5c1de2f65e.tar.xz discoin-963e237e0e501c71d6837f354dfd7a5c1de2f65e.zip | |
Upgrade bdb to 5.1
| -rw-r--r-- | build-aux/m4/dogecoin_find_bdb51.m4 (renamed from build-aux/m4/bitcoin_find_bdb48.m4) | 26 | ||||
| -rw-r--r-- | configure.ac | 4 | ||||
| -rw-r--r-- | doc/build-osx.md | 3 | ||||
| -rw-r--r-- | doc/build-unix.md | 47 |
4 files changed, 32 insertions, 48 deletions
diff --git a/build-aux/m4/bitcoin_find_bdb48.m4 b/build-aux/m4/dogecoin_find_bdb51.m4 index 0bf558d25..b17c7db6e 100644 --- a/build-aux/m4/bitcoin_find_bdb48.m4 +++ b/build-aux/m4/dogecoin_find_bdb51.m4 @@ -1,11 +1,11 @@ -AC_DEFUN([BITCOIN_FIND_BDB48],[ +AC_DEFUN([BITCOIN_FIND_BDB51],[ AC_MSG_CHECKING([for Berkeley DB C++ headers]) BDB_CPPFLAGS= BDB_LIBS= bdbpath=X - bdb48path=X + bdb51path=X bdbdirlist= - for _vn in 4.8 48 4 5 ''; do + for _vn in 5.1 51 5 ''; do for _pfx in b lib ''; do bdbdirlist="$bdbdirlist ${_pfx}db${_vn}" done @@ -15,8 +15,8 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <${searchpath}db_cxx.h> ]],[[ - #if !((DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 8) || DB_VERSION_MAJOR > 4) - #error "failed to find bdb 4.8+" + #if !((DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR >= 1) || DB_VERSION_MAJOR > 5) + #error "failed to find bdb 5.1+" #endif ]])],[ if test "x$bdbpath" = "xX"; then @@ -28,32 +28,32 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <${searchpath}db_cxx.h> ]],[[ - #if !(DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8) - #error "failed to find bdb 4.8" + #if !(DB_VERSION_MAJOR == 5 && DB_VERSION_MINOR == 1) + #error "failed to find bdb 5.1" #endif ]])],[ - bdb48path="${searchpath}" + bdb51path="${searchpath}" break ],[]) done if test "x$bdbpath" = "xX"; then AC_MSG_RESULT([no]) AC_MSG_ERROR([libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)]) - elif test "x$bdb48path" = "xX"; then + elif test "x$bdb51path" = "xX"; then BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx) AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[ - AC_MSG_WARN([Found Berkeley DB other than 4.8; wallets opened by this build will not be portable!]) + AC_MSG_WARN([Found Berkeley DB other than 5.1; wallets opened by this build will not be portable!]) ],[ - AC_MSG_ERROR([Found Berkeley DB other than 4.8, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)]) + AC_MSG_ERROR([Found Berkeley DB other than 5.1, required for portable wallets (--with-incompatible-bdb to ignore or --disable-wallet to disable wallet functionality)]) ]) else BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb48path}],db_cxx) - bdbpath="${bdb48path}" + bdbpath="${bdb51path}" fi AC_SUBST(BDB_CPPFLAGS) # TODO: Ideally this could find the library version and make sure it matches the headers being used - for searchlib in db_cxx-4.8 db_cxx; do + for searchlib in db_cxx-5.1 db_cxx; do AC_CHECK_LIB([$searchlib],[main],[ BDB_LIBS="-l${searchlib}" break diff --git a/configure.ac b/configure.ac index 7b84827c7..3c45abf8e 100644 --- a/configure.ac +++ b/configure.ac @@ -272,7 +272,7 @@ case $host in dnl the user (--without-wallet or --without-gui for example). openssl_prefix=`$BREW --prefix openssl 2>/dev/null` - bdb_prefix=`$BREW --prefix berkeley-db4 2>/dev/null` + bdb_prefix=`$BREW --prefix berkeley-db 2>/dev/null` qt5_prefix=`$BREW --prefix qt5 2>/dev/null` if test x$openssl_prefix != x; then PKG_CONFIG_PATH="$openssl_prefix/lib/pkgconfig:$PKG_CONFIG_PATH" @@ -496,7 +496,7 @@ AC_SUBST(LIBMEMENV) if test x$enable_wallet != xno; then dnl Check for libdb_cxx only if wallet enabled - BITCOIN_FIND_BDB48 + BITCOIN_FIND_BDB51 fi dnl Check for libminiupnpc (optional) diff --git a/doc/build-osx.md b/doc/build-osx.md index dc319dd1c..8a5271f73 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -32,7 +32,8 @@ Instructions: Homebrew #### Install dependencies using Homebrew - brew install autoconf automake berkeley-db4 libtool boost miniupnpc openssl pkg-config protobuf qt5 + brew install autoconf automake libtool boost miniupnpc openssl pkg-config protobuf qt5 + brew install berkeley-db # You need to make sure you install a version >= 5.1.29, but as close to 5.1.29 as possible. Check the homebrew docs to find out how to install older versions. NOTE: Building with Qt4 is still supported, however, could result in a broken UI. As such, building with Qt5 is recommended. diff --git a/doc/build-unix.md b/doc/build-unix.md index f70bf7f1f..0fe58447b 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -39,7 +39,7 @@ Optional dependencies: Library | Purpose | Description ------------|------------------|---------------------- miniupnpc | UPnP Support | Firewall-jumping support - libdb4.8 | Berkeley DB | Wallet storage (only needed when wallet enabled) + libdb5.1 | Berkeley DB | Wallet storage (only needed when wallet enabled) qt | GUI | GUI toolkit (only needed when GUI enabled) protobuf | Payments in GUI | Data interchange format used for payment protocol (only needed when GUI enabled) libqrencode | QR codes in GUI | Optional for generating QR codes (only needed when GUI enabled) @@ -61,31 +61,14 @@ Build requirements: for Ubuntu 12.04 and later or Debian 7 and later libboost-all-dev has to be installed: - sudo apt-get install libboost-all-dev + sudo apt-get install libboost-all-dev libdb5.1-dev libdb5.1++-dev - db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin). - You can add the repository using the following command: - - sudo add-apt-repository ppa:bitcoin/bitcoin - sudo apt-get update - - Ubuntu 12.04 and later have packages for libdb5.1-dev and libdb5.1++-dev, - but using these will break binary wallet compatibility, and is not recommended. - -for Debian 7 (Wheezy) and later: - The oldstable repository contains db4.8 packages. - Add the following line to /etc/apt/sources.list, - replacing [mirror] with any official debian mirror. - - deb http://[mirror]/debian/ oldstable main - -To enable the change run - - sudo apt-get update - -for other Debian & Ubuntu (with ppa): - - sudo apt-get install libdb4.8-dev libdb4.8++-dev + Note that if you have Berkeley DB 4.8 packages installed (i.e. for other + wallet software), they are incompatible with the packages for 5.1. You + will have to manually download 5.1 from + http://download.oracle.com/berkeley-db/db-5.1.29.NC.tar.gz and compile + it, install it to /usr/local where the configure script should locate it + automatically. Optional: @@ -142,23 +125,23 @@ To build: Berkeley DB ----------- -It is recommended to use Berkeley DB 4.8. If you have to build it yourself: +It is recommended to use Berkeley DB 5.1. If you have to build it yourself: ```bash BITCOIN_ROOT=$(pwd) # Pick some path to install BDB to, here we create a directory within the bitcoin directory -BDB_PREFIX="${BITCOIN_ROOT}/db4" +BDB_PREFIX="${BITCOIN_ROOT}/db5" mkdir -p $BDB_PREFIX # Fetch the source and verify that it is not tampered with -wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' -echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c -# -> db-4.8.30.NC.tar.gz: OK -tar -xzvf db-4.8.30.NC.tar.gz +wget 'http://download.oracle.com/berkeley-db/db-5.1.29.NC.tar.gz' +echo '08238e59736d1aacdd47cfb8e68684c695516c37f4fbe1b8267dde58dc3a576c db-5.1.29.NC.tar.gz' | sha256sum -c +# -> db-5.1.29.NC.tar.gz: OK +tar -xzvf db-5.1.29.NC.tar.gz # Build the library and install to our prefix -cd db-4.8.30.NC/build_unix/ +cd db-5.1.29.NC/build_unix/ # Note: Do a static build so that it can be embedded into the executable, instead of having to find a .so at runtime ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX make install |