Skip to content

Commit 483a4bb

Browse files
committed
Merge bitcoin/bitcoin#26834: contrib: remove install_db4.sh
44f3c7d contrib: remove install_db4.sh (fanquake) 14ce843 doc: add new NO_* options from #26833 (fanquake) Pull request description: Now that we can build a bdb-only depends prefix (#26833), there is no need to maintain a bdb-building bash script, that does the same thing as depends, except worse, as it's missing patches and workarounds. i.e #26623. Someone that wants to compile bdb themselves, but doesn't want to use other depends built libs, can do: ```bash make -C depends NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_SQLITE=1 NO_NATPMP=1 NO_UPNP=1 NO_ZMQ=1 NO_USDT=1 ... to: /path/to/bitcoin/depends/x86_64-pc-linux-gnu ``` which gives them a BDB only prefix, and then compile using: ```bash export BDB_PREFIX="/path/to/bitcoin/depends/x86_64-pc-linux-gnu" ./autogen.sh ./configure \ BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \ BDB_CFLAGS="-I${BDB_PREFIX}/include" ``` Wondering if we should extract the build bdb/legacy wallet docs somewhere, to avoid the repetition? ACKs for top commit: TheCharlatan: ACK 44f3c7d achow101: ACK 44f3c7d hebasto: ACK 44f3c7d jarolrod: ACK 44f3c7d Tree-SHA512: 50b33ae9df2ab94a1bd114e846cec16f647a61023b72f0d3e547a18db09c01d60bb7b42a04758212f4930314df03016feb6ebc96962dd8a8e26eb8cd4e0d167d
2 parents 9a28843 + 44f3c7d commit 483a4bb

File tree

4 files changed

+20
-271
lines changed

4 files changed

+20
-271
lines changed

contrib/install_db4.sh

Lines changed: 0 additions & 259 deletions
This file was deleted.

depends/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ The following can be set when running make: `make FOO=bar`
9898
- `FALLBACK_DOWNLOAD_PATH`: If a source file can't be fetched, try here before giving up
9999
- `C_STANDARD`: Set the C standard version used. Defaults to `c11`.
100100
- `CXX_STANDARD`: Set the C++ standard version used. Defaults to `c++17`.
101+
- `NO_BOOST`: Don't download/build/cache Boost
102+
- `NO_LIBEVENT`: Don't download/build/cache Libevent
101103
- `NO_QT`: Don't download/build/cache Qt and its dependencies
102104
- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode
103105
- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ

doc/build-openbsd.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,18 @@ pkg_add sqlite3
4141
BerkeleyDB is only required to support legacy wallets.
4242

4343
It is recommended to use Berkeley DB 4.8. You cannot use the BerkeleyDB library
44-
from ports. However you can build it yourself, [using the installation script included in contrib/](/contrib/install_db4.sh), like so, from the root of the repository.
44+
from ports. However you can build it yourself, [using depends](/depends).
4545

4646
```bash
47-
./contrib/install_db4.sh `pwd`
47+
gmake -C depends NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_SQLITE=1 NO_NATPMP=1 NO_UPNP=1 NO_ZMQ=1 NO_USDT=1
48+
...
49+
to: /path/to/bitcoin/depends/x86_64-unknown-openbsd
4850
```
4951

5052
Then set `BDB_PREFIX`:
5153

5254
```bash
53-
export BDB_PREFIX="$PWD/db4"
55+
export BDB_PREFIX="/path/to/bitcoin/depends/x86_64-unknown-openbsd"
5456
```
5557

5658
#### GUI Dependencies

doc/build-unix.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -197,17 +197,21 @@ Berkeley DB
197197
-----------
198198

199199
The legacy wallet uses Berkeley DB. To ensure backwards compatibility it is
200-
recommended to use Berkeley DB 4.8. If you have to build it yourself, you can
201-
use [the installation script included in contrib/](/contrib/install_db4.sh)
202-
like so:
203-
204-
```shell
205-
./contrib/install_db4.sh `pwd`
200+
recommended to use Berkeley DB 4.8. If you have to build it yourself, and don't
201+
want to use any other libraries built in depends, you can do:
202+
```bash
203+
make -C depends NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_SQLITE=1 NO_NATPMP=1 NO_UPNP=1 NO_ZMQ=1 NO_USDT=1
204+
...
205+
to: /path/to/bitcoin/depends/x86_64-pc-linux-gnu
206206
```
207+
and configure using the following:
208+
```bash
209+
export BDB_PREFIX="/path/to/bitcoin/depends/x86_64-pc-linux-gnu"
207210

208-
from the root of the repository.
209-
210-
Otherwise, you can build Bitcoin Core from self-compiled [depends](/depends/README.md).
211+
./configure \
212+
BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" \
213+
BDB_CFLAGS="-I${BDB_PREFIX}/include"
214+
```
211215

212216
**Note**: You only need Berkeley DB if the legacy wallet is enabled (see [*Disable-wallet mode*](#disable-wallet-mode)).
213217

0 commit comments

Comments
 (0)