mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
Merge bitcoin/bitcoin#27685: doc: Rework build-unix.md
fa29651c3f
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: ACKfa29651c3f
TheCharlatan: ACKfa29651c3f
Tree-SHA512: 5348ddf3fa094c630d80b63033ca7b40ec0356427856f9a1075b31244f6bf8ec65cb2a738366e1174ef2fe7e0bf5cc249a62c58f458bbaf50668aceeac954820
This commit is contained in:
commit
5f70cd3997
2 changed files with 16 additions and 38 deletions
|
@ -15,6 +15,7 @@ For example:
|
|||
**Bitcoin Core's `configure` script by default will ignore the depends output.** In
|
||||
order for it to pick up libraries, tools, and settings from the depends build,
|
||||
you must set the `CONFIG_SITE` environment variable to point to a `config.site` settings file.
|
||||
Make sure that `CONFIG_SITE` is an absolute path.
|
||||
In the above example, a file named `depends/x86_64-w64-mingw32/share/config.site` will be
|
||||
created. To use it during compilation:
|
||||
|
||||
|
|
|
@ -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 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.
|
||||
|
||||
See [dependencies.md](dependencies.md) 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%.
|
||||
## Dependencies
|
||||
|
||||
miniupnpc
|
||||
---------
|
||||
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.
|
||||
|
||||
[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.
|
||||
|
||||
libnatpmp
|
||||
---------
|
||||
|
||||
[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
|
||||
|
|
Loading…
Reference in a new issue