From d2feb2e6fb1a1184fce77ce11649684d7b754c95 Mon Sep 17 00:00:00 2001 From: Ross Nicoll Date: Tue, 18 Apr 2017 13:40:50 +0100 Subject: [PATCH] Update DB version to 5.1 --- doc/build-osx.md | 3 ++- doc/build-unix.md | 33 +++++++++++++++------------------ 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/doc/build-osx.md b/doc/build-osx.md index 32d7dbd69..59ee125f7 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -16,7 +16,8 @@ Then install [Homebrew](https://brew.sh). Dependencies ---------------------- - brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config protobuf qt libevent + brew install automake libtool boost --c++11 miniupnpc openssl pkg-config protobuf --c++11 qt5 libevent + 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. If you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG diff --git a/doc/build-unix.md b/doc/build-unix.md index b7eae2a63..c8e885ea7 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -42,7 +42,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) @@ -81,18 +81,15 @@ install necessary parts of boost: BerkeleyDB is required for the wallet. -**For Ubuntu only:** db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin). -You can add the repository and install using the following commands: + sudo apt-get install libdb5.1-dev libdb5.1++-dev - sudo apt-get install software-properties-common - sudo add-apt-repository ppa:bitcoin/bitcoin - sudo apt-get update - 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. -Ubuntu and Debian have their own libdb-dev and libdb++-dev packages, but these will install -BerkeleyDB 5.1 or later, which break binary wallet compatibility with the distributed executables which -are based on BerkeleyDB 4.8. If you do not care about wallet compatibility, -pass `--with-incompatible-bdb` to configure. See the section "Disable-wallet mode" to build Bitcoin Core without wallet. @@ -165,23 +162,23 @@ turned off by default. See the configure options for upnp behavior desired: 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