Skip to content

Commit

Permalink
Various textual improvements in build docs
Browse files Browse the repository at this point in the history
  • Loading branch information
merland committed Oct 28, 2018
1 parent 754a00d commit 36c8e68
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 30 deletions.
2 changes: 1 addition & 1 deletion doc/build-freebsd.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ git clone https://github.com/bitcoin/bitcoin

## 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
Expand Down
4 changes: 2 additions & 2 deletions doc/build-openbsd.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
in contrib/](/contrib/install_db4.sh) like so
in contrib/](/contrib/install_db4.sh) like so:

```shell
./contrib/install_db4.sh `pwd` CC=cc CXX=c++
Expand Down Expand Up @@ -94,7 +94,7 @@ The standard ulimit restrictions in OpenBSD are very strict:

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)).
If your user is in the `staff` group the limit can be raised with:

Expand Down
12 changes: 6 additions & 6 deletions doc/build-osx.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@ Dependencies

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

Berkeley DB
-----------
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)
like so
like so:

```shell
./contrib/install_db4.sh .
```

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
------------------------

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
cd bitcoin
Expand Down Expand Up @@ -80,13 +80,13 @@ Running

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"

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:

Expand Down
22 changes: 10 additions & 12 deletions doc/build-unix.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Some notes on how to build Bitcoin Core in Unix.

Note
---------------------
Always use absolute paths to configure and compile Bitcoin Core and the dependencies,
for example, when specifying the path of the dependency:
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

Expand All @@ -24,7 +24,7 @@ make
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
---------------------
Expand Down Expand Up @@ -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

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,
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):

Expand Down Expand Up @@ -161,15 +162,15 @@ Berkeley DB
-----------
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)
like so
like so:

```shell
./contrib/install_db4.sh `pwd`
```

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
-----
Expand All @@ -193,9 +194,7 @@ Hardening Flags:


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
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
Expand All @@ -213,8 +212,7 @@ Hardening enables the following features:
TYPE
ET_DYN

* Non-executable Stack
If the stack is executable then trivial stack-based buffer overflow exploits are possible if
* _Non-executable Stack_: 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,
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
Expand Down
18 changes: 9 additions & 9 deletions doc/build-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

* 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.
* 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.

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 native compiler tool chain such as [Visual Studio](https://www.visualstudio.com).
* 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).

Installing Windows Subsystem for Linux
---------------------------------------
Expand Down Expand Up @@ -69,7 +69,7 @@ See also: [dependencies.md](dependencies.md).

## 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

Expand All @@ -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
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:

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
cd depends
Expand Down Expand Up @@ -142,9 +142,9 @@ way. This will install to `c:\workspace\bitcoin`, for example:
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
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
modifying headers in the Bitcoin Core source code).

0 comments on commit 36c8e68

Please sign in to comment.