From 9c5879322a39bbc2a05af21362c2f57781e4cbc1 Mon Sep 17 00:00:00 2001 From: Patrick Lodder Date: Mon, 9 May 2022 22:33:16 +0200 Subject: [PATCH] doc: replace bdb4.8 instructions with bdb5.3 --- doc/build-freebsd.md | 2 +- doc/build-netbsd.md | 4 ++-- doc/build-openbsd.md | 7 +++---- doc/build-osx.md | 6 ------ doc/build-unix.md | 22 ++++++++-------------- doc/dependencies.md | 2 +- doc/productivity.md | 2 +- 7 files changed, 16 insertions(+), 29 deletions(-) diff --git a/doc/build-freebsd.md b/doc/build-freebsd.md index 16412977b..9ffc3fcca 100644 --- a/doc/build-freebsd.md +++ b/doc/build-freebsd.md @@ -42,7 +42,7 @@ With wallet: ```bash ./autogen.sh ./configure --with-gui=no \ - BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \ + BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-5.3" \ BDB_CFLAGS="-I${BDB_PREFIX}/include" \ MAKE=gmake ``` diff --git a/doc/build-netbsd.md b/doc/build-netbsd.md index 5b37f19ee..cd9da9449 100644 --- a/doc/build-netbsd.md +++ b/doc/build-netbsd.md @@ -32,7 +32,7 @@ See [dependencies.md](dependencies.md) for a complete overview. BerkeleyDB is only necessary for the wallet functionality. To skip this, pass `--disable-wallet` to `./configure` and skip to the next section. -It is recommended to use Berkeley DB 4.8. You cannot use the BerkeleyDB library +It is recommended to use Berkeley DB 5.3. You cannot use the BerkeleyDB library from ports, for the same reason as boost above (g++/libstd++ incompatibility). If you have to build it yourself, you can use [the installation script included in contrib/](/contrib/install_db5.sh) like so: @@ -58,7 +58,7 @@ With wallet: LDFLAGS="-L/usr/pkg/lib" \ BOOST_CPPFLAGS="-I/usr/pkg/include" \ BOOST_LDFLAGS="-L/usr/pkg/lib" \ - BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \ + BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-5.3" \ BDB_CFLAGS="-I${BDB_PREFIX}/include" \ MAKE=gmake ``` diff --git a/doc/build-openbsd.md b/doc/build-openbsd.md index c2dd349df..c170fb4f0 100644 --- a/doc/build-openbsd.md +++ b/doc/build-openbsd.md @@ -32,7 +32,7 @@ compilers within the same executable will result in errors. BerkeleyDB is only necessary for the wallet functionality. To skip this, pass `--disable-wallet` to `./configure` and skip to the next section. -It is recommended to use Berkeley DB 4.8. You cannot use the BerkeleyDB library +It is recommended to use Berkeley DB 5.3. You cannot use the BerkeleyDB library from ports, for the same reason as boost above (g++/libstd++ incompatibility). If you have to build it yourself, you can use [the installation script included in contrib/](/contrib/install_db5.sh) like so: @@ -69,7 +69,7 @@ Make sure `BDB_PREFIX` is set to the appropriate path from the above steps. To configure with wallet: ```bash ./configure --with-gui=no CC=cc CXX=c++ \ - BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \ + BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-5.3" \ BDB_CFLAGS="-I${BDB_PREFIX}/include" \ MAKE=gmake ``` @@ -82,7 +82,7 @@ To configure without wallet: To configure with GUI: ```bash ./configure --with-gui=yes CC=cc CXX=c++ \ - BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \ + BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-5.3" \ BDB_CFLAGS="-I${BDB_PREFIX}/include" \ MAKE=gmake ``` @@ -112,4 +112,3 @@ If your user is in the `staff` group the limit can be raised with: The change will only affect the current shell and processes spawned by it. To make the change system-wide, change `datasize-cur` and `datasize-max` in `/etc/login.conf`, and reboot. - diff --git a/doc/build-osx.md b/doc/build-osx.md index c165d6abc..0efd2483c 100644 --- a/doc/build-osx.md +++ b/doc/build-osx.md @@ -56,12 +56,6 @@ like so: from the root of the repository. -Also, the Homebrew package could be installed: - -```shell -brew install berkeley-db5 -``` - ## Build Bitcoin Core 1. Clone the Bitcoin Core source code: diff --git a/doc/build-unix.md b/doc/build-unix.md index 12d19e72b..e9f89020e 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -85,12 +85,14 @@ Now, you can either build from self-compiled [depends](/depends/README.md) or in BerkeleyDB is required for the wallet. - 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.3. You - will have to manually download 5.3 from - http://download.oracle.com/berkeley-db/db-5.3.28.NC.tar.gz and compile - it, install it to /usr/local where the configure script should locate it - automatically. +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.3. You +may have to manually install 5.3, for which you can use +[the installation script included in contrib/](/contrib/install_db5.sh), like so: + +```shell +./contrib/install_db5.sh `pwd` +``` If you do not care about wallet compatibility, pass `--with-incompatible-bdb` to configure. @@ -273,14 +275,6 @@ This example lists the steps necessary to setup and build a command line only, n ./configure --disable-wallet --without-gui --without-miniupnpc make check -Note: -Enabling wallet support requires either compiling against a Berkeley DB newer than 5.3 (package `db`) using `--with-incompatible-bdb`, -or building and depending on a local version of Berkeley DB 5.3. 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 5.3 must be used. - - ARM Cross-compilation ------------------- These steps can be performed on, for example, an Ubuntu VM. The depends system diff --git a/doc/dependencies.md b/doc/dependencies.md index d1bf4b3a8..f633da348 100644 --- a/doc/dependencies.md +++ b/doc/dependencies.md @@ -5,7 +5,7 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct | Dependency | Version used | Minimum required | CVEs | Shared | [Bundled Qt library](https://doc.qt.io/qt-5/configure-options.html#third-party-libraries) | | --- | --- | --- | --- | --- | --- | -| Berkeley DB | [4.8.30](https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html) | 4.8.x | No | | | +| Berkeley DB | [5.3.28](https://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index.html) | 5.3.x | No | | | | Boost | [1.70.0](https://www.boost.org/users/download/) | [1.58.0](https://github.com/bitcoin/bitcoin/pull/19667) | No | | | | Clang | | [3.3+](https://releases.llvm.org/download.html) (C++11 support) | | | | | Expat | [2.2.7](https://libexpat.github.io/) | | No | Yes | | diff --git a/doc/productivity.md b/doc/productivity.md index 555f0afe3..ed3129df2 100644 --- a/doc/productivity.md +++ b/doc/productivity.md @@ -56,7 +56,7 @@ After running `./autogen.sh`, which generates the `./configure` file, use `./con --without-gui ``` -If you do need the wallet enabled, it is common for devs to add `--with-incompatible-bdb`. This uses your system bdb version for the wallet, so you don't have to find a copy of bdb 4.8. Wallets from such a build will be incompatible with any release binary (and vice versa), so use with caution on mainnet. +If you do need the wallet enabled, it is common for devs to add `--with-incompatible-bdb`. This uses your system bdb version for the wallet, so you don't have to find a copy of bdb 5.3. Wallets from such a build will be incompatible with any release binary (and vice versa), so use with caution on mainnet. ### Make use of your threads with `make -j`