Skip to content

Commit fa29651

Browse files
author
MarcoFalke
committed
doc: Rework build-unix.md
1 parent 594f05d commit fa29651

File tree

2 files changed

+16
-38
lines changed

2 files changed

+16
-38
lines changed

depends/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ For example:
1515
**Bitcoin Core's `configure` script by default will ignore the depends output.** In
1616
order for it to pick up libraries, tools, and settings from the depends build,
1717
you must set the `CONFIG_SITE` environment variable to point to a `config.site` settings file.
18+
Make sure that `CONFIG_SITE` is an absolute path.
1819
In the above example, a file named `depends/x86_64-w64-mingw32/share/config.site` will be
1920
created. To use it during compilation:
2021

doc/build-unix.md

Lines changed: 15 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,6 @@ Some notes on how to build Bitcoin Core in Unix.
44

55
(For BSD specific instructions, see `build-*bsd.md` in this directory.)
66

7-
Note
8-
---------------------
9-
Always use absolute paths to configure and compile Bitcoin Core and the dependencies.
10-
For example, when specifying the path of the dependency:
11-
12-
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
13-
14-
Here BDB_PREFIX must be an absolute path - it is defined using $(pwd) which ensures
15-
the usage of the absolute path.
16-
177
To Build
188
---------------------
199

@@ -24,12 +14,11 @@ make # use "-j N" for N parallel jobs
2414
make install # optional
2515
```
2616

27-
This will build bitcoin-qt as well, if the dependencies are met.
28-
29-
See [dependencies.md](dependencies.md) for a complete overview.
17+
See below for instructions on how to [install the dependencies on popular Linux
18+
distributions](#linux-distribution-specific-instructions), or the
19+
[dependencies](#dependencies) section for a complete overview.
3020

31-
Memory Requirements
32-
--------------------
21+
## Memory Requirements
3322

3423
C++ compilers are memory-hungry. It is recommended to have at least 1.5 GB of
3524
memory available when compiling Bitcoin Core. On systems with less, gcc can be
@@ -57,15 +46,15 @@ Build requirements:
5746

5847
sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3
5948

60-
Now, you can either build from self-compiled [depends](/depends/README.md) or install the required dependencies:
49+
Now, you can either build from self-compiled [depends](#dependencies) or install the required dependencies:
6150

6251
sudo apt-get install libevent-dev libboost-dev
6352

6453
SQLite is required for the descriptor wallet:
6554

6655
sudo apt install libsqlite3-dev
6756

68-
Berkeley DB is required for the legacy wallet. Ubuntu and Debian have their own `libdb-dev` and `libdb++-dev` packages,
57+
Berkeley DB is only required for the legacy wallet. Ubuntu and Debian have their own `libdb-dev` and `libdb++-dev` packages,
6958
but these will install Berkeley DB 5.1 or later. This will break binary wallet compatibility with the distributed
7059
executables, which are based on BerkeleyDB 4.8. If you do not care about wallet compatibility, pass
7160
`--with-incompatible-bdb` to configure. Otherwise, you can build Berkeley DB [yourself](#berkeley-db).
@@ -114,7 +103,7 @@ Build requirements:
114103

115104
sudo dnf install gcc-c++ libtool make autoconf automake python3
116105

117-
Now, you can either build from self-compiled [depends](/depends/README.md) or install the required dependencies:
106+
Now, you can either build from self-compiled [depends](#dependencies) or install the required dependencies:
118107

119108
sudo dnf install libevent-devel boost-devel
120109

@@ -126,7 +115,7 @@ Berkeley DB is required for the legacy wallet:
126115

127116
sudo dnf install libdb4-devel libdb4-cxx-devel
128117

129-
Newer Fedora releases, since Fedora 33, have only `libdb-devel` and `libdb-cxx-devel` packages, but these will install
118+
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
130119
Berkeley DB 5.3 or later. This will break binary wallet compatibility with the distributed executables, which
131120
are based on Berkeley DB 4.8. If you do not care about wallet compatibility,
132121
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:
166155
Once these are installed, they will be found by configure and a bitcoin-qt executable will be
167156
built by default.
168157

169-
Notes
170-
-----
171-
The release is built with GCC and then "strip bitcoind" to strip the debug
172-
symbols, which reduces the executable size by about 90%.
173-
174-
miniupnpc
175-
---------
176-
177-
[miniupnpc](https://miniupnp.tuxfamily.org) may be used for UPnP port mapping. It can be downloaded from [here](
178-
https://miniupnp.tuxfamily.org/files/). UPnP support is compiled in and
179-
turned off by default.
158+
## Dependencies
180159

181-
libnatpmp
182-
---------
160+
See [dependencies.md](dependencies.md) for a complete overview, and
161+
[depends](/depends/README.md) on how to compile them yourself, if you wish to
162+
not use the packages of your Linux distribution.
183163

184-
[libnatpmp](https://miniupnp.tuxfamily.org/libnatpmp.html) may be used for NAT-PMP port mapping. It can be downloaded
185-
from [here](https://miniupnp.tuxfamily.org/files/). NAT-PMP support is compiled in and
186-
turned off by default.
187-
188-
Berkeley DB
189-
-----------
164+
### Berkeley DB
190165

191166
The legacy wallet uses Berkeley DB. To ensure backwards compatibility it is
192167
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"
205180
BDB_CFLAGS="-I${BDB_PREFIX}/include"
206181
```
207182

183+
**Note**: Make sure that `BDB_PREFIX` is an absolute path.
184+
208185
**Note**: You only need Berkeley DB if the legacy wallet is enabled (see [*Disable-wallet mode*](#disable-wallet-mode)).
209186

210187
Security

0 commit comments

Comments
 (0)