Skip to content

Commit 698f869

Browse files
committed
Merge bitcoin/bitcoin#31961: Require sqlite when building the wallet
36b6f36 build: require sqlite when building the wallet (Sjors Provoost) Pull request description: Require that sqlite is available in order to compile the wallet. Removes instances of `USE_SQLITE` since it is no longer possible to not have sqlite available. The `NO_SQLITE` option is dropped from depends. This is another step towards dropping the legacy wallet, extracted from #31250. ACKs for top commit: m3dwards: ACK 36b6f36 davidgumberg: crACK bitcoin/bitcoin@36b6f36 hebasto: re-ACK 36b6f36. Tree-SHA512: 870a0135671c80c4f28602119eb8637a1ed43b51b1673bfe88425782fb62ec6ef0f3d6baf0d5984d6a243779b0f63423fd4c4dc324ef87bffba13d63e05ad793
2 parents f4b3a58 + 36b6f36 commit 698f869

40 files changed

+34
-143
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ jobs:
171171
generate-options: '-DBUILD_GUI=ON -DWITH_BDB=ON -DWITH_ZMQ=ON -DBUILD_BENCH=ON -DWERROR=ON'
172172
job-name: 'Win64 native, VS 2022'
173173
- job-type: fuzz
174-
generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="sqlite" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
174+
generate-options: '-DVCPKG_MANIFEST_NO_DEFAULT_FEATURES=ON -DVCPKG_MANIFEST_FEATURES="wallet" -DBUILD_GUI=OFF -DBUILD_FOR_FUZZING=ON -DWERROR=ON'
175175
job-name: 'Win64 native fuzz, VS 2022'
176176

177177
steps:

CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,13 @@ option(BUILD_UTIL_CHAINSTATE "Build experimental bitcoin-chainstate executable."
102102
option(BUILD_KERNEL_LIB "Build experimental bitcoinkernel library." ${BUILD_UTIL_CHAINSTATE})
103103

104104
option(ENABLE_WALLET "Enable wallet." ON)
105-
option(WITH_SQLITE "Enable SQLite wallet support." ${ENABLE_WALLET})
106-
if(WITH_SQLITE)
105+
if(ENABLE_WALLET)
107106
if(VCPKG_TARGET_TRIPLET)
108107
# Use of the `unofficial::` namespace is a vcpkg package manager convention.
109108
find_package(unofficial-sqlite3 CONFIG REQUIRED)
110109
else()
111110
find_package(SQLite3 3.7.17 REQUIRED)
112111
endif()
113-
set(USE_SQLITE ON)
114112
endif()
115113
option(WITH_BDB "Enable Berkeley DB (BDB) wallet support." OFF)
116114
cmake_dependent_option(WARN_INCOMPATIBLE_BDB "Warn when using a Berkeley DB (BDB) version other than 4.8." ON "WITH_BDB" OFF)
@@ -652,7 +650,6 @@ message(" libbitcoinkernel (experimental) ..... ${BUILD_KERNEL_LIB}")
652650
message("Optional features:")
653651
message(" wallet support ...................... ${ENABLE_WALLET}")
654652
if(ENABLE_WALLET)
655-
message(" - descriptor wallets (SQLite) ...... ${WITH_SQLITE}")
656653
message(" - legacy wallets (Berkeley DB) ..... ${WITH_BDB}")
657654
endif()
658655
message(" external signer ..................... ${ENABLE_EXTERNAL_SIGNER}")

CMakePresets.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@
8383
"WITH_BDB": "ON",
8484
"WITH_MULTIPROCESS": "ON",
8585
"WITH_QRENCODE": "ON",
86-
"WITH_SQLITE": "ON",
8786
"WITH_USDT": "ON",
8887
"WITH_ZMQ": "ON"
8988
}

cmake/bitcoin-build-config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,4 @@
144144
/* Define if QR support should be compiled in */
145145
#cmakedefine USE_QRCODE 1
146146

147-
/* Define if sqlite support should be compiled in */
148-
#cmakedefine USE_SQLITE 1
149-
150147
#endif //BITCOIN_CONFIG_H

depends/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ NO_LIBEVENT ?=
3737
NO_QT ?=
3838
NO_QR ?=
3939
NO_BDB ?=
40-
NO_SQLITE ?=
4140
NO_WALLET ?=
4241
NO_ZMQ ?=
4342
NO_USDT ?=
@@ -160,8 +159,7 @@ qrencode_packages_$(NO_QR) = $(qrencode_$(host_os)_packages)
160159
qt_packages_$(NO_QT) = $(qt_packages) $(qt_$(host_os)_packages) $(qt_$(host_arch)_$(host_os)_packages) $(qrencode_packages_)
161160

162161
bdb_packages_$(NO_BDB) = $(bdb_packages)
163-
sqlite_packages_$(NO_SQLITE) = $(sqlite_packages)
164-
wallet_packages_$(NO_WALLET) = $(bdb_packages_) $(sqlite_packages_)
162+
wallet_packages_$(NO_WALLET) = $(bdb_packages_) $(sqlite_packages)
165163

166164
zmq_packages_$(NO_ZMQ) = $(zmq_packages)
167165
multiprocess_packages_$(MULTIPROCESS) = $(multiprocess_packages)
@@ -233,7 +231,6 @@ $(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(fina
233231
-e 's|@zmq_packages@|$(zmq_packages_)|' \
234232
-e 's|@wallet_packages@|$(wallet_packages_)|' \
235233
-e 's|@bdb_packages@|$(bdb_packages_)|' \
236-
-e 's|@sqlite_packages@|$(sqlite_packages_)|' \
237234
-e 's|@usdt_packages@|$(usdt_packages_)|' \
238235
-e 's|@multiprocess@|$(MULTIPROCESS)|' \
239236
$< > $@

depends/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,8 @@ The following can be set when running make: `make FOO=bar`
115115
- `NO_QT`: Don't download/build/cache Qt and its dependencies
116116
- `NO_QR`: Don't download/build/cache packages needed for enabling qrencode
117117
- `NO_ZMQ`: Don't download/build/cache packages needed for enabling ZeroMQ
118-
- `NO_WALLET`: Don't download/build/cache libs needed to enable the wallet
118+
- `NO_WALLET`: Don't download/build/cache libs needed to enable the wallet (SQLite)
119119
- `NO_BDB`: Don't download/build/cache BerkeleyDB
120-
- `NO_SQLITE`: Don't download/build/cache SQLite
121120
- `NO_USDT`: Don't download/build/cache packages needed for enabling USDT tracepoints
122121
- `MULTIPROCESS`: Build libmultiprocess (experimental)
123122
- `DEBUG`: Disable some optimizations and enable more runtime checking

depends/toolchain.cmake.in

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,6 @@ else()
132132
set(WITH_BDB ON CACHE BOOL "")
133133
endif()
134134

135-
set(sqlite_packages @sqlite_packages@)
136-
if("${wallet_packages}" STREQUAL "" OR "${sqlite_packages}" STREQUAL "")
137-
set(WITH_SQLITE OFF CACHE BOOL "")
138-
else()
139-
set(WITH_SQLITE ON CACHE BOOL "")
140-
endif()
141-
142135
set(usdt_packages @usdt_packages@)
143136
if("${usdt_packages}" STREQUAL "")
144137
set(WITH_USDT OFF CACHE BOOL "")

doc/build-freebsd.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ from ports. However, you can build DB 4.8 yourself [using depends](/depends).
4242

4343
```bash
4444
pkg install gmake
45-
gmake -C depends NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_SQLITE=1 NO_ZMQ=1 NO_USDT=1
45+
gmake -C depends NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_ZMQ=1 NO_USDT=1
4646
```
4747

4848
When the build is complete, the Berkeley DB installation location will be displayed:

doc/build-openbsd.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ from ports. However you can build it yourself, [using depends](/depends).
4444
Refer to [depends/README.md](/depends/README.md) for detailed instructions.
4545

4646
```bash
47-
gmake -C depends NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_SQLITE=1 NO_ZMQ=1 NO_USDT=1
47+
gmake -C depends NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_ZMQ=1 NO_USDT=1
4848
...
4949
to: /path/to/bitcoin/depends/*-unknown-openbsd*
5050
```
@@ -103,7 +103,7 @@ There are many ways to configure Bitcoin Core, here are a few common examples:
103103
This enables descriptor wallet support and the GUI, assuming SQLite and Qt 5 are installed.
104104

105105
```bash
106-
cmake -B build -DWITH_SQLITE=ON -DBUILD_GUI=ON
106+
cmake -B build -DBUILD_GUI=ON
107107
```
108108

109109
Run `cmake -B build -LH` to see the full list of available options.

doc/build-unix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ The legacy wallet uses Berkeley DB. To ensure backwards compatibility it is
145145
recommended to use Berkeley DB 4.8. If you have to build it yourself, and don't
146146
want to use any other libraries built in depends, you can do:
147147
```bash
148-
make -C depends NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_SQLITE=1 NO_ZMQ=1 NO_USDT=1
148+
make -C depends NO_BOOST=1 NO_LIBEVENT=1 NO_QT=1 NO_ZMQ=1 NO_USDT=1
149149
...
150150
to: /path/to/bitcoin/depends/x86_64-pc-linux-gnu
151151
```

0 commit comments

Comments
 (0)