diff --git a/doc/build-openbsd.md b/doc/build-openbsd.md --- a/doc/build-openbsd.md +++ b/doc/build-openbsd.md @@ -70,23 +70,22 @@ BerkeleyDB is only necessary for the wallet functionality. To skip this, pass `--disable-wallet` to `./configure`. -See "Berkeley DB" in [build_unix.md](build_unix.md) for instructions on how to build BerkeleyDB 4.8. You cannot use the BerkeleyDB library from ports, for the same reason as boost above (g++/libstd++ incompatibility). ```bash # Pick some path to install BDB to, here we create a directory within the bitcoin directory BITCOIN_ROOT=$(pwd) -BDB_PREFIX="${BITCOIN_ROOT}/db4" +BDB_PREFIX="${BITCOIN_ROOT}/db6" mkdir -p $BDB_PREFIX # Fetch the source and verify that it is not tampered with -curl -o db-4.8.30.NC.tar.gz 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz' -echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256 -c -# MUST output: (SHA256) db-4.8.30.NC.tar.gz: OK -tar -xzf db-4.8.30.NC.tar.gz +curl -o db-6.2.32.NC.tar.gz 'http://download.oracle.com/berkeley-db/db-6.2.32.NC.tar.gz' +echo 'd86cf1283c519d42dd112b4501ecb2db11ae765b37a1bdad8f8cb06b0ffc69b8 db-6.2.32.NC.tar.gz' | sha256sum -c +# MUST output: (SHA256) db-6.2.32.NC.tar.gz: OK +tar -xzf db-6.2.32.NC.tar.gz # Build the library and install to specified prefix -cd db-4.8.30.NC/build_unix/ +cd db-6.2.32.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 CC=egcc CXX=eg++ CPP=ecpp make install # do NOT use -jX, this is broken @@ -124,7 +123,7 @@ ```bash ./configure --with-gui=no --with-boost=$BOOST_PREFIX \ CC=egcc CXX=eg++ CPP=ecpp \ - BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" + BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-6.2" BDB_CFLAGS="-I${BDB_PREFIX}/include" ``` To configure without wallet: diff --git a/doc/build-osx.md b/doc/build-osx.md --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -23,7 +23,7 @@ Install dependencies: - brew install automake berkeley-db4 libtool boost --c++11 miniupnpc openssl pkg-config protobuf --c++11 qt5 libevent + brew install automake berkeley-db libtool boost --c++11 miniupnpc openssl pkg-config protobuf --c++11 qt5 libevent In case 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 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -42,7 +42,7 @@ Library | Purpose | Description ------------|------------------|---------------------- miniupnpc | UPnP Support | Firewall-jumping support - libdb4.8 | Berkeley DB | Wallet storage (only needed when wallet enabled) + libdb | 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) @@ -79,22 +79,10 @@ sudo apt-get install libboost-all-dev -BerkeleyDB is required for the wallet. +BerkeleyDB 5.3 or later is required for the wallet. This can be installed with: -**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 software-properties-common - sudo add-apt-repository ppa:bitcoin/bitcoin - sudo apt-get update - sudo apt-get install libdb4.8-dev libdb4.8++-dev - -For Debian, BerkeleyDB 4.8 can be installed by following the instructions in the “Berkeley DB” section below. - -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. + sudo apt-get install libdb-dev + sudo apt-get install libdb++-dev See the section "Disable-wallet mode" to build Bitcoin ABC without wallet. @@ -133,7 +121,7 @@ ------------------------------------- Build requirements: - sudo dnf install gcc-c++ libtool make autoconf automake openssl-devel libevent-devel boost-devel libdb4-devel libdb4-cxx-devel + sudo dnf install gcc-c++ libtool make autoconf automake openssl-devel libevent-devel boost-devel libdb-devel libdb-cxx-devel Optional: @@ -164,40 +152,6 @@ --disable-upnp-default (the default) UPnP support turned off by default at runtime --enable-upnp-default UPnP support turned on by default at runtime - -Berkeley DB ------------ -It is recommended to use Berkeley DB 4.8. If you have to build it yourself: - -```bash -BITCOIN_ROOT=$(pwd) - -# Pick some path to install BDB to, here we install in /usr/local/db4 -BDB_PREFIX="/usr/local/db4" -sudo mkdir -p $BDB_PREFIX - -cd $BDB_PREFIX/.. - -# Fetch the source and verify that it is not tampered with -sudo 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 -sudo tar -xzvf db-4.8.30.NC.tar.gz - -# Build the library and install to our prefix -cd db-4.8.30.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 -sudo ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX -sudo make install - -# Configure Bitcoin ABC to use our own-built instance of BDB -cd $BITCOIN_ROOT -./autogen.sh -./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" # (other args...) -``` - -**Note**: You only need Berkeley DB if the wallet is enabled (see the section *Disable-Wallet mode* below). - Boost ----- For documentation on building Boost look at their official documentation: http://www.boost.org/build/doc/html/bbv2/installation.html @@ -258,8 +212,6 @@ ./configure --disable-wallet -In this case there is no dependency on Berkeley DB 4.8. - Mining is also possible in disable-wallet mode, but only using the `getblocktemplate` RPC call not `getwork`. @@ -281,13 +233,6 @@ ./configure --disable-wallet --without-gui --without-miniupnpc make check -Note: -Enabling wallet support requires either compiling against a Berkeley DB newer than 4.8 (package `db`) using `--with-incompatible-bdb`, -or building and depending on a local version of Berkeley DB 4.8. The readily available Arch Linux packages are currently built using -`--with-incompatible-bdb` according to the [PKGBUILD](https://projects.archlinux.org/svntogit/community.git/tree/bitcoin/trunk/PKGBUILD). -As mentioned above, when maintaining portability of the wallet between the standard Bitcoin Core distributions and independently built -node software is desired, Berkeley DB 4.8 must be used. - ARM Cross-compilation ------------------- diff --git a/doc/release-notes.md b/doc/release-notes.md --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -7,3 +7,4 @@ - Remove deprecated `estimatesmartpriority` RPC. - Remove support for `-sendfreetransactions`. - Remove unstable `estimatesmartfee` RPC. + - Update berkley DB to 5.3 minimum. Developers should update their build environment accordingly.