Various textual improvements in build docs
This commit is contained in:
parent
754a00d55f
commit
36c8e68585
5 changed files with 28 additions and 30 deletions
|
@ -29,7 +29,7 @@ git clone https://github.com/bitcoin/bitcoin
|
||||||
|
|
||||||
## Building Bitcoin Core
|
## Building Bitcoin Core
|
||||||
|
|
||||||
**Important**: Use `gmake` (the non-GNU `make` will exit with an error).
|
**Important**: Use `gmake` (the non-GNU `make` will exit with an error):
|
||||||
|
|
||||||
```
|
```
|
||||||
./autogen.sh
|
./autogen.sh
|
||||||
|
|
|
@ -36,7 +36,7 @@ BerkeleyDB is only necessary for the wallet functionality. To skip this, pass
|
||||||
It is recommended to use Berkeley DB 4.8. You cannot use the BerkeleyDB library
|
It is recommended to use Berkeley DB 4.8. You cannot use the BerkeleyDB library
|
||||||
from ports, for the same reason as boost above (g++/libstd++ incompatibility).
|
from ports, for the same reason as boost above (g++/libstd++ incompatibility).
|
||||||
If you have to build it yourself, you can use [the installation script included
|
If you have to build it yourself, you can use [the installation script included
|
||||||
in contrib/](/contrib/install_db4.sh) like so
|
in contrib/](/contrib/install_db4.sh) like so:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./contrib/install_db4.sh `pwd` CC=cc CXX=c++
|
./contrib/install_db4.sh `pwd` CC=cc CXX=c++
|
||||||
|
@ -94,7 +94,7 @@ The standard ulimit restrictions in OpenBSD are very strict:
|
||||||
|
|
||||||
data(kbytes) 1572864
|
data(kbytes) 1572864
|
||||||
|
|
||||||
This, unfortunately, in some cases not enough to compile some `.cpp` files in the project,
|
This is, unfortunately, in some cases not enough to compile some `.cpp` files in the project,
|
||||||
(see issue [#6658](https://github.com/bitcoin/bitcoin/issues/6658)).
|
(see issue [#6658](https://github.com/bitcoin/bitcoin/issues/6658)).
|
||||||
If your user is in the `staff` group the limit can be raised with:
|
If your user is in the `staff` group the limit can be raised with:
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ Dependencies
|
||||||
|
|
||||||
See [dependencies.md](dependencies.md) for a complete overview.
|
See [dependencies.md](dependencies.md) for a complete overview.
|
||||||
|
|
||||||
If you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG
|
If you want to build the disk image with `make deploy` (.dmg / optional), you need RSVG:
|
||||||
|
|
||||||
brew install librsvg
|
brew install librsvg
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ Berkeley DB
|
||||||
-----------
|
-----------
|
||||||
It is recommended to use Berkeley DB 4.8. If you have to build it yourself,
|
It is recommended to use Berkeley DB 4.8. If you have to build it yourself,
|
||||||
you can use [the installation script included in contrib/](/contrib/install_db4.sh)
|
you can use [the installation script included in contrib/](/contrib/install_db4.sh)
|
||||||
like so
|
like so:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./contrib/install_db4.sh .
|
./contrib/install_db4.sh .
|
||||||
|
@ -36,12 +36,12 @@ like so
|
||||||
|
|
||||||
from the root of the repository.
|
from the root of the repository.
|
||||||
|
|
||||||
**Note**: You only need Berkeley DB if the wallet is enabled (see the section *Disable-Wallet mode* below).
|
**Note**: You only need Berkeley DB if the wallet is enabled (see [*Disable-wallet mode*](/doc/build-osx.md#disable-wallet-mode)).
|
||||||
|
|
||||||
Build Bitcoin Core
|
Build Bitcoin Core
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
1. Clone the Bitcoin Core source code and cd into `bitcoin`
|
1. Clone the Bitcoin Core source code:
|
||||||
|
|
||||||
git clone https://github.com/bitcoin/bitcoin
|
git clone https://github.com/bitcoin/bitcoin
|
||||||
cd bitcoin
|
cd bitcoin
|
||||||
|
@ -80,13 +80,13 @@ Running
|
||||||
|
|
||||||
Bitcoin Core is now available at `./src/bitcoind`
|
Bitcoin Core is now available at `./src/bitcoind`
|
||||||
|
|
||||||
Before running, it's recommended that you create an RPC configuration file.
|
Before running, it's recommended that you create an RPC configuration file:
|
||||||
|
|
||||||
echo -e "rpcuser=bitcoinrpc\nrpcpassword=$(xxd -l 16 -p /dev/urandom)" > "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
|
echo -e "rpcuser=bitcoinrpc\nrpcpassword=$(xxd -l 16 -p /dev/urandom)" > "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
|
||||||
|
|
||||||
chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
|
chmod 600 "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"
|
||||||
|
|
||||||
The first time you run bitcoind, it will start downloading the blockchain. This process could take several hours.
|
The first time you run bitcoind, it will start downloading the blockchain. This process could take many hours, or even days on slower than average systems.
|
||||||
|
|
||||||
You can monitor the download process by looking at the debug.log file:
|
You can monitor the download process by looking at the debug.log file:
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ Some notes on how to build Bitcoin Core in Unix.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
---------------------
|
---------------------
|
||||||
Always use absolute paths to configure and compile Bitcoin Core and the dependencies,
|
Always use absolute paths to configure and compile Bitcoin Core and the dependencies.
|
||||||
for example, when specifying the path of the dependency:
|
For example, when specifying the path of the dependency:
|
||||||
|
|
||||||
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
|
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ make
|
||||||
make install # optional
|
make install # optional
|
||||||
```
|
```
|
||||||
|
|
||||||
This will build bitcoin-qt as well if the dependencies are met.
|
This will build bitcoin-qt as well, if the dependencies are met.
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
---------------------
|
---------------------
|
||||||
|
@ -87,11 +87,12 @@ You can add the repository and install using the following commands:
|
||||||
sudo apt-get install libdb4.8-dev libdb4.8++-dev
|
sudo apt-get install libdb4.8-dev libdb4.8++-dev
|
||||||
|
|
||||||
Ubuntu and Debian have their own libdb-dev and libdb++-dev packages, but these will install
|
Ubuntu and Debian have their own libdb-dev and libdb++-dev packages, but these will install
|
||||||
BerkeleyDB 5.1 or later, which break binary wallet compatibility with the distributed executables which
|
BerkeleyDB 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,
|
are based on BerkeleyDB 4.8. If you do not care about wallet compatibility,
|
||||||
pass `--with-incompatible-bdb` to configure.
|
pass `--with-incompatible-bdb` to configure.
|
||||||
|
|
||||||
See the section "Disable-wallet mode" to build Bitcoin Core without wallet.
|
To build Bitcoin Core without wallet, see [*Disable-wallet mode*](/doc/build-unix.md#disable-wallet-mode)
|
||||||
|
|
||||||
|
|
||||||
Optional (see --with-miniupnpc and --enable-upnp-default):
|
Optional (see --with-miniupnpc and --enable-upnp-default):
|
||||||
|
|
||||||
|
@ -161,7 +162,7 @@ Berkeley DB
|
||||||
-----------
|
-----------
|
||||||
It is recommended to use Berkeley DB 4.8. If you have to build it yourself,
|
It is recommended to use Berkeley DB 4.8. If you have to build it yourself,
|
||||||
you can use [the installation script included in contrib/](/contrib/install_db4.sh)
|
you can use [the installation script included in contrib/](/contrib/install_db4.sh)
|
||||||
like so
|
like so:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./contrib/install_db4.sh `pwd`
|
./contrib/install_db4.sh `pwd`
|
||||||
|
@ -169,7 +170,7 @@ like so
|
||||||
|
|
||||||
from the root of the repository.
|
from the root of the repository.
|
||||||
|
|
||||||
**Note**: You only need Berkeley DB if the wallet is enabled (see the section *Disable-Wallet mode* below).
|
**Note**: You only need Berkeley DB if the wallet is enabled (see [*Disable-wallet mode*](/doc/build-unix.md#disable-wallet-mode)).
|
||||||
|
|
||||||
Boost
|
Boost
|
||||||
-----
|
-----
|
||||||
|
@ -193,9 +194,7 @@ Hardening Flags:
|
||||||
|
|
||||||
|
|
||||||
Hardening enables the following features:
|
Hardening enables the following features:
|
||||||
|
* _Position Independent Executable_: Build position independent code to take advantage of Address Space Layout Randomization
|
||||||
* Position Independent Executable
|
|
||||||
Build position independent code to take advantage of Address Space Layout Randomization
|
|
||||||
offered by some kernels. Attackers who can cause execution of code at an arbitrary memory
|
offered by some kernels. Attackers who can cause execution of code at an arbitrary memory
|
||||||
location are thwarted if they don't know where anything useful is located.
|
location are thwarted if they don't know where anything useful is located.
|
||||||
The stack and heap are randomly located by default, but this allows the code section to be
|
The stack and heap are randomly located by default, but this allows the code section to be
|
||||||
|
@ -213,8 +212,7 @@ Hardening enables the following features:
|
||||||
TYPE
|
TYPE
|
||||||
ET_DYN
|
ET_DYN
|
||||||
|
|
||||||
* Non-executable Stack
|
* _Non-executable Stack_: If the stack is executable then trivial stack-based buffer overflow exploits are possible if
|
||||||
If the stack is executable then trivial stack-based buffer overflow exploits are possible if
|
|
||||||
vulnerable buffers are found. By default, Bitcoin Core should be built with a non-executable stack,
|
vulnerable buffers are found. By default, Bitcoin Core should be built with a non-executable stack,
|
||||||
but if one of the libraries it uses asks for an executable stack or someone makes a mistake
|
but if one of the libraries it uses asks for an executable stack or someone makes a mistake
|
||||||
and uses a compiler extension which requires an executable stack, it will silently build an
|
and uses a compiler extension which requires an executable stack, it will silently build an
|
||||||
|
|
|
@ -5,15 +5,15 @@ Below are some notes on how to build Bitcoin Core for Windows.
|
||||||
|
|
||||||
The options known to work for building Bitcoin Core on Windows are:
|
The options known to work for building Bitcoin Core on Windows are:
|
||||||
|
|
||||||
* On Linux using the [Mingw-w64](https://mingw-w64.org/doku.php) cross compiler tool chain. Ubuntu Bionic 18.04 is required
|
* On Linux, using the [Mingw-w64](https://mingw-w64.org/doku.php) cross compiler tool chain. Ubuntu Bionic 18.04 is required
|
||||||
and is the platform used to build the Bitcoin Core Windows release binaries.
|
and is the platform used to build the Bitcoin Core Windows release binaries.
|
||||||
* On Windows using [Windows
|
* On Windows, using [Windows
|
||||||
Subsystem for Linux (WSL)](https://msdn.microsoft.com/commandline/wsl/about) and the Mingw-w64 cross compiler tool chain.
|
Subsystem for Linux (WSL)](https://msdn.microsoft.com/commandline/wsl/about) and the Mingw-w64 cross compiler tool chain.
|
||||||
|
|
||||||
Other options which may work, but which have not been extensively tested are (please contribute instructions):
|
Other options which may work, but which have not been extensively tested are (please contribute instructions):
|
||||||
|
|
||||||
* On Windows using a POSIX compatibility layer application such as [cygwin](http://www.cygwin.com/) or [msys2](http://www.msys2.org/).
|
* On Windows, using a POSIX compatibility layer application such as [cygwin](http://www.cygwin.com/) or [msys2](http://www.msys2.org/).
|
||||||
* On Windows using a native compiler tool chain such as [Visual Studio](https://www.visualstudio.com).
|
* On Windows, using a native compiler tool chain such as [Visual Studio](https://www.visualstudio.com).
|
||||||
|
|
||||||
Installing Windows Subsystem for Linux
|
Installing Windows Subsystem for Linux
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
@ -69,7 +69,7 @@ See also: [dependencies.md](dependencies.md).
|
||||||
|
|
||||||
## Building for 64-bit Windows
|
## Building for 64-bit Windows
|
||||||
|
|
||||||
The first step is to install the mingw-w64 cross-compilation tool chain.
|
The first step is to install the mingw-w64 cross-compilation tool chain:
|
||||||
|
|
||||||
sudo apt install g++-mingw-w64-x86-64
|
sudo apt install g++-mingw-w64-x86-64
|
||||||
|
|
||||||
|
@ -81,13 +81,13 @@ Once the toolchain is installed the build steps are common:
|
||||||
|
|
||||||
Note that for WSL the Bitcoin Core source path MUST be somewhere in the default mount file system, for
|
Note that for WSL the Bitcoin Core source path MUST be somewhere in the default mount file system, for
|
||||||
example /usr/src/bitcoin, AND not under /mnt/d/. If this is not the case the dependency autoconf scripts will fail.
|
example /usr/src/bitcoin, AND not under /mnt/d/. If this is not the case the dependency autoconf scripts will fail.
|
||||||
This means you cannot use a directory that located directly on the host Windows file system to perform the build.
|
This means you cannot use a directory that is located directly on the host Windows file system to perform the build.
|
||||||
|
|
||||||
Acquire the source in the usual way:
|
Acquire the source in the usual way:
|
||||||
|
|
||||||
git clone https://github.com/bitcoin/bitcoin.git
|
git clone https://github.com/bitcoin/bitcoin.git
|
||||||
|
|
||||||
Once the source code is ready the build steps are below.
|
Once the source code is ready the build steps are below:
|
||||||
|
|
||||||
PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g') # strip out problematic Windows %PATH% imported var
|
PATH=$(echo "$PATH" | sed -e 's/:\/mnt.*//g') # strip out problematic Windows %PATH% imported var
|
||||||
cd depends
|
cd depends
|
||||||
|
@ -142,9 +142,9 @@ way. This will install to `c:\workspace\bitcoin`, for example:
|
||||||
Footnotes
|
Footnotes
|
||||||
---------
|
---------
|
||||||
|
|
||||||
<a name="footnote1">1</a>: Starting from Ubuntu Xenial 16.04 both the 32 and 64 bit Mingw-w64 packages install two different
|
<a name="footnote1">1</a>: Starting from Ubuntu Xenial 16.04, both the 32 and 64 bit Mingw-w64 packages install two different
|
||||||
compiler options to allow a choice between either posix or win32 threads. The default option is win32 threads which is the more
|
compiler options to allow a choice between either posix or win32 threads. The default option is win32 threads which is the more
|
||||||
efficient since it will result in binary code that links directly with the Windows kernel32.lib. Unfortunately, the headers
|
efficient since it will result in binary code that links directly with the Windows kernel32.lib. Unfortunately, the headers
|
||||||
required to support win32 threads conflict with some of the classes in the C++11 standard library in particular std::mutex.
|
required to support win32 threads conflict with some of the classes in the C++11 standard library, in particular std::mutex.
|
||||||
It's not possible to build the Bitcoin Core code using the win32 version of the Mingw-w64 cross compilers (at least not without
|
It's not possible to build the Bitcoin Core code using the win32 version of the Mingw-w64 cross compilers (at least not without
|
||||||
modifying headers in the Bitcoin Core source code).
|
modifying headers in the Bitcoin Core source code).
|
||||||
|
|
Loading…
Reference in a new issue