Skip to content

Commit 9084ede

Browse files
kwvgPastaPastaPasta
authored andcommitted
merge bitcoin#20527: Do not ignore Homebrew's SQLite on macOS
1 parent 343e272 commit 9084ede

File tree

2 files changed

+32
-11
lines changed

2 files changed

+32
-11
lines changed

configure.ac

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -716,16 +716,19 @@ case $host in
716716
dnl It's safe to add these paths even if the functionality is disabled by
717717
dnl the user (--without-wallet or --without-gui for example).
718718

719-
qt5_prefix=$($BREW --prefix qt5 2>/dev/null)
720-
if $BREW list --versions berkeley-db4 >/dev/null && test "x$BDB_CFLAGS" = "x" && test "x$BDB_LIBS" = "x" && test "$use_bdb" != "no"; then
719+
if test "x$use_bdb" != xno && $BREW list --versions berkeley-db4 >/dev/null && test "x$BDB_CFLAGS" = "x" && test "x$BDB_LIBS" = "x"; then
721720
bdb_prefix=$($BREW --prefix berkeley-db4 2>/dev/null)
722721
dnl This must precede the call to BITCOIN_FIND_BDB48 below.
723722
BDB_CFLAGS="-I$bdb_prefix/include"
724723
BDB_LIBS="-L$bdb_prefix/lib -ldb_cxx-4.8"
725724
fi
726-
if test x$qt5_prefix != x; then
727-
PKG_CONFIG_PATH="$qt5_prefix/lib/pkgconfig:$PKG_CONFIG_PATH"
728-
export PKG_CONFIG_PATH
725+
726+
if test "x$use_sqlite" != xno && $BREW list --versions sqlite3 >/dev/null; then
727+
export PKG_CONFIG_PATH="$($BREW --prefix sqlite3 2>/dev/null)/lib/pkgconfig:$PKG_CONFIG_PATH"
728+
fi
729+
730+
if $BREW list --versions qt5 >/dev/null; then
731+
export PKG_CONFIG_PATH="$($BREW --prefix qt5 2>/dev/null)/lib/pkgconfig:$PKG_CONFIG_PATH"
729732
fi
730733

731734
gmp_prefix=$($BREW --prefix gmp 2>/dev/null)

doc/build-osx.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,27 @@ Then install [Homebrew](https://brew.sh).
1919

2020
## Dependencies
2121
```shell
22-
brew install automake berkeley-db4 libtool boost gmp miniupnpc pkg-config python qt libevent libnatpmp qrencode sqlite
22+
brew install automake libtool boost gmp miniupnpc pkg-config python qt libevent libnatpmp qrencode
2323
```
2424

2525
If you run into issues, check [Homebrew's troubleshooting page](https://docs.brew.sh/Troubleshooting).
2626
See [dependencies.md](dependencies.md) for a complete overview.
2727

28-
## Berkeley DB
28+
The wallet support requires one or both of the dependencies ([*SQLite*](#sqlite) and [*Berkeley DB*](#berkeley-db)) in the sections below.
29+
To build Dash Core without wallet, see [*Disable-wallet mode*](#disable-wallet-mode).
30+
31+
#### SQLite
32+
33+
Usually, macOS installation already has a suitable SQLite installation.
34+
Also, the Homebrew package could be installed:
35+
36+
```shell
37+
brew install sqlite
38+
```
39+
40+
In that case the Homebrew package will prevail.
41+
42+
#### Berkeley DB
2943

3044
It is recommended to use Berkeley DB 4.8. If you have to build it yourself,
3145
you can use [the installation script included in contrib/](contrib/install_db4.sh)
@@ -37,7 +51,11 @@ like so:
3751

3852
from the root of the repository.
3953

40-
**Note**: You only need Berkeley DB if the wallet is enabled (see the section *Disable-Wallet mode* below).
54+
Also, the Homebrew package could be installed:
55+
56+
```shell
57+
brew install berkeley-db4
58+
```
4159

4260
## Build Dash Core
4361

@@ -68,14 +86,14 @@ from the root of the repository.
6886
make deploy
6987
```
7088

71-
## `disable-wallet` mode
89+
## Disable-wallet mode
7290
When the intention is to run only a P2P node without a wallet, Dash Core may be
73-
compiled in `disable-wallet` mode with:
91+
compiled in disable-wallet mode with:
7492
```shell
7593
./configure --disable-wallet
7694
```
7795

78-
In this case there is no dependency on Berkeley DB 4.8 and SQLite.
96+
In this case there is no dependency on [*Berkeley DB*](#berkeley-db) and [*SQLite*](#sqlite).
7997

8098
Mining is also possible in disable-wallet mode using the `getblocktemplate` RPC call.
8199

0 commit comments

Comments
 (0)