Skip to content

Commit d1e63aa

Browse files
committed
Merge bitcoin/bitcoin#23168: build: no-longer fail default configure if BDB isn't available
747cd17 build: no-longer fail default configure if BDB isn't available (fanquake) Pull request description: Inline with moving to descriptor (sqlite) wallets by default for 0.23, this adapts the build system so that a default `./configure` invocation no-longer fails if BDB isn't present. Currently, if configure is run with no options, and no BDB is present, we'll fail with: ```bash checking for Berkeley DB C++ headers... no configure: error: libdb_cxx headers missing, Bitcoin Core requires this library for BDB wallet support (--without-bdb to disable BDB wallet support) ``` If descriptor wallets are to be the default, this behaviour no longer makes sense, as a builder should be able to configure and build, to use a wallet, without BDB installed, and without passing additional arguments, i.e `--without-bdb` or `--with-incompatible-bdb`, to configure. With this change, running configure will no-longer fail, but will instead print: ```bash checking for Berkeley DB C++ headers... no configure: WARNING: libdb_cxx headers missing configure: WARNING: Bitcoin Core requires this library for BDB (legacy) wallet support configure: WARNING: Passing --without-bdb will suppress this warning checking for sqlite3 >= 3.7.17... yes checking whether to build wallet with support for sqlite... yes ``` ACKs for top commit: hebasto: ACK 747cd17, tested on Linux Mint 20.2 (x86_64) with the (un)installed system packages `libdb-dev` and `libdb++-dev`. Tree-SHA512: ae316d71ad0803c9d4b02a5fedcade08242650d987cc047840493ba4a881e71ff48b099075bb7c325307d44744fcdeccb57f7fa8db4135c81a5835841f562afa
2 parents 15587b4 + 747cd17 commit d1e63aa

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

build-aux/m4/bitcoin_find_bdb48.m4

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,15 +48,22 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
4848
if test "x$bdbpath" = "xX"; then
4949
use_bdb=no
5050
AC_MSG_RESULT([no])
51-
AC_MSG_ERROR([libdb_cxx headers missing, ]AC_PACKAGE_NAME[ requires this library for BDB wallet support (--without-bdb to disable BDB wallet support)])
51+
AC_MSG_WARN([libdb_cxx headers missing])
52+
AC_MSG_WARN(AC_PACKAGE_NAME[ requires this library for BDB (legacy) wallet support])
53+
AC_MSG_WARN([Passing --without-bdb will suppress this warning])
5254
elif test "x$bdb48path" = "xX"; then
5355
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx)
5456
AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 4.8])],[
55-
AC_MSG_WARN([Found Berkeley DB other than 4.8; BDB wallets opened by this build will not be portable!])
57+
AC_MSG_WARN([Found Berkeley DB other than 4.8])
58+
AC_MSG_WARN([BDB (legacy) wallets opened by this build will not be portable!])
59+
use_bdb=yes
5660
],[
57-
AC_MSG_ERROR([Found Berkeley DB other than 4.8, required for portable BDB wallets (--with-incompatible-bdb to ignore or --without-bdb to disable BDB wallet support)])
61+
AC_MSG_WARN([Found Berkeley DB other than 4.8])
62+
AC_MSG_WARN([BDB (legacy) wallets opened by this build would not be portable!])
63+
AC_MSG_WARN([If this is intended, pass --with-incompatible-bdb])
64+
AC_MSG_WARN([Passing --without-bdb will suppress this warning])
65+
use_bdb=no
5866
])
59-
use_bdb=yes
6067
else
6168
BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdb48path}],db_cxx)
6269
bdbpath="${bdb48path}"
@@ -78,7 +85,9 @@ AC_DEFUN([BITCOIN_FIND_BDB48],[
7885
])
7986
done
8087
if test "x$BDB_LIBS" = "x"; then
81-
AC_MSG_ERROR([libdb_cxx missing, ]AC_PACKAGE_NAME[ requires this library for BDB wallet support (--without-bdb to disable BDB wallet support)])
88+
AC_MSG_WARN([libdb_cxx headers missing])
89+
AC_MSG_WARN(AC_PACKAGE_NAME[ requires this library for BDB (legacy) wallet support])
90+
AC_MSG_WARN([Passing --without-bdb will suppress this warning])
8291
fi
8392
fi
8493
if test "x$use_bdb" != "xno"; then

0 commit comments

Comments
 (0)