aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2023-05-18 12:07:44 +0100
committerfanquake <fanquake@gmail.com>2023-05-18 12:07:57 +0100
commit5f70cd39974dcb966f2a7913dda216258c2d24c1 (patch)
treee91c749cfc33f34c8882f63155581c7459ba82d2 /doc
parent87d6f6c29dbb011c85d6a1c191d13acd5522a2c6 (diff)
parentfa29651c3ff3e13a42d6505b14971265562f088a (diff)
downloadbitcoin-5f70cd39974dcb966f2a7913dda216258c2d24c1.tar.xz
Merge bitcoin/bitcoin#27685: doc: Rework build-unix.md
fa29651c3ff3e13a42d6505b14971265562f088a doc: Rework build-unix.md (MarcoFalke) Pull request description: The doc has many issues: * The fist section contains outdated non-existing and confusing configure flags like `--enable-cxx` and `--disable-shared`, as well as edge-case expert options such as `BDB_PREFIX`. Fix that by removing the section and adding notes elsewhere, if applicable. * There are links to the depends system before instructions on how to simply build from system packages. Fix that by moving that later. * Also, remove sections that are duplicate with other depends READMEs. ACKs for top commit: fanquake: ACK fa29651c3ff3e13a42d6505b14971265562f088a TheCharlatan: ACK fa29651c3ff3e13a42d6505b14971265562f088a Tree-SHA512: 5348ddf3fa094c630d80b63033ca7b40ec0356427856f9a1075b31244f6bf8ec65cb2a738366e1174ef2fe7e0bf5cc249a62c58f458bbaf50668aceeac954820
Diffstat (limited to 'doc')
-rw-r--r--doc/build-unix.md53
1 files changed, 15 insertions, 38 deletions
diff --git a/doc/build-unix.md b/doc/build-unix.md
index 0960ae1577..0c761d9043 100644
--- a/doc/build-unix.md
+++ b/doc/build-unix.md
@@ -4,16 +4,6 @@ Some notes on how to build Bitcoin Core in Unix.
(For BSD specific instructions, see `build-*bsd.md` in this directory.)
-Note
----------------------
-Always use absolute paths to configure and compile Bitcoin Core and the dependencies.
-For example, when specifying the path of the dependency:
-
- ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
-
-Here BDB_PREFIX must be an absolute path - it is defined using $(pwd) which ensures
-the usage of the absolute path.
-
To Build
---------------------
@@ -24,12 +14,11 @@ make # use "-j N" for N parallel jobs
make install # optional
```
-This will build bitcoin-qt as well, if the dependencies are met.
-
-See [dependencies.md](dependencies.md) for a complete overview.
+See below for instructions on how to [install the dependencies on popular Linux
+distributions](#linux-distribution-specific-instructions), or the
+[dependencies](#dependencies) section for a complete overview.
-Memory Requirements
---------------------
+## Memory Requirements
C++ compilers are memory-hungry. It is recommended to have at least 1.5 GB of
memory available when compiling Bitcoin Core. On systems with less, gcc can be
@@ -57,7 +46,7 @@ Build requirements:
sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3
-Now, you can either build from self-compiled [depends](/depends/README.md) or install the required dependencies:
+Now, you can either build from self-compiled [depends](#dependencies) or install the required dependencies:
sudo apt-get install libevent-dev libboost-dev
@@ -65,7 +54,7 @@ SQLite is required for the descriptor wallet:
sudo apt install libsqlite3-dev
-Berkeley DB is required for the legacy wallet. Ubuntu and Debian have their own `libdb-dev` and `libdb++-dev` packages,
+Berkeley DB is only required for the legacy wallet. Ubuntu and Debian have their own `libdb-dev` and `libdb++-dev` packages,
but these will install Berkeley DB 5.1 or later. This will break binary wallet compatibility with the distributed
executables, which are based on BerkeleyDB 4.8. If you do not care about wallet compatibility, pass
`--with-incompatible-bdb` to configure. Otherwise, you can build Berkeley DB [yourself](#berkeley-db).
@@ -114,7 +103,7 @@ Build requirements:
sudo dnf install gcc-c++ libtool make autoconf automake python3
-Now, you can either build from self-compiled [depends](/depends/README.md) or install the required dependencies:
+Now, you can either build from self-compiled [depends](#dependencies) or install the required dependencies:
sudo dnf install libevent-devel boost-devel
@@ -126,7 +115,7 @@ Berkeley DB is required for the legacy wallet:
sudo dnf install libdb4-devel libdb4-cxx-devel
-Newer Fedora releases, since Fedora 33, have only `libdb-devel` and `libdb-cxx-devel` packages, but these will install
+Berkeley DB is only required for the legacy wallet. Newer Fedora releases have only `libdb-devel` and `libdb-cxx-devel` packages, but these will install
Berkeley DB 5.3 or later. This will break binary wallet compatibility with the distributed executables, which
are based on Berkeley DB 4.8. If you do not care about wallet compatibility,
pass `--with-incompatible-bdb` to configure. Otherwise, you can build Berkeley DB [yourself](#berkeley-db).
@@ -166,27 +155,13 @@ libqrencode (optional) can be installed with:
Once these are installed, they will be found by configure and a bitcoin-qt executable will be
built by default.
-Notes
------
-The release is built with GCC and then "strip bitcoind" to strip the debug
-symbols, which reduces the executable size by about 90%.
-
-miniupnpc
----------
-
-[miniupnpc](https://miniupnp.tuxfamily.org) may be used for UPnP port mapping. It can be downloaded from [here](
-https://miniupnp.tuxfamily.org/files/). UPnP support is compiled in and
-turned off by default.
+## Dependencies
-libnatpmp
----------
+See [dependencies.md](dependencies.md) for a complete overview, and
+[depends](/depends/README.md) on how to compile them yourself, if you wish to
+not use the packages of your Linux distribution.
-[libnatpmp](https://miniupnp.tuxfamily.org/libnatpmp.html) may be used for NAT-PMP port mapping. It can be downloaded
-from [here](https://miniupnp.tuxfamily.org/files/). NAT-PMP support is compiled in and
-turned off by default.
-
-Berkeley DB
------------
+### Berkeley DB
The legacy wallet uses Berkeley DB. To ensure backwards compatibility it is
recommended to use Berkeley DB 4.8. If you have to build it yourself, and don't
@@ -205,6 +180,8 @@ export BDB_PREFIX="/path/to/bitcoin/depends/x86_64-pc-linux-gnu"
BDB_CFLAGS="-I${BDB_PREFIX}/include"
```
+**Note**: Make sure that `BDB_PREFIX` is an absolute path.
+
**Note**: You only need Berkeley DB if the legacy wallet is enabled (see [*Disable-wallet mode*](#disable-wallet-mode)).
Security