Skip to content

Commit

Permalink
Merge bitcoin#816: [Doc] Update build-unix.md
Browse files Browse the repository at this point in the history
867d1b5 [Doc] Update build-unix.md (Fuzzbawls)

Tree-SHA512: fcb195491a46328908146b26588595d3d93bfab8ceb658fb960dd9364fdb7f1c462c888b9cca74364344786722f208ff2f59d31b1fe820c0b8bf5b33a1546c64
  • Loading branch information
Mrs-X committed Feb 23, 2019
2 parents a611a7f + 867d1b5 commit 51e7b2c
Showing 1 changed file with 79 additions and 26 deletions.
105 changes: 79 additions & 26 deletions doc/build-unix.md
Expand Up @@ -29,11 +29,12 @@ Dependencies

These dependencies are required:

Library | Purpose | Description
------------|------------------|----------------------
libssl | SSL Support | Secure communications
libboost | Boost | C++ Library
libevent | Events | Asynchronous event notification
Library | Purpose | Description
------------|--------------------|----------------------
libssl | SSL Support | Secure communications
libboost | Boost | C++ Library
libevent | Events | Asynchronous event notification
libgmp | Bignum Arithmetic | Precision arithmetic

Optional dependencies:

Expand All @@ -45,6 +46,7 @@ Optional dependencies:
protobuf | Payments in GUI | Data interchange format used for payment protocol (only needed when GUI enabled)
libqrencode | QR codes in GUI | Optional for generating QR codes (only needed when GUI enabled)
univalue | Utility | JSON parsing and encoding (bundled version will be used unless --with-system-univalue passed to configure)
libzmq3 | ZMQ notification | Optional, allows generating ZMQ notifications (requires ZMQ version >= 4.0.0)

For the versions used in the release, see [release-process.md](release-process.md) under *Fetch and build inputs*.

Expand All @@ -55,37 +57,53 @@ C++ compilers are memory-hungry. It is recommended to have at least 1 GB of
memory available when compiling PIVX Core. With 512MB of memory or less
compilation will take much longer due to swap thrashing.

Dependency Build Instructions: Ubuntu & Debian
----------------------------------------------
Build requirements:
## Linux Distribution Specific Instructions

### Ubuntu & Debian

#### Dependency Build Instructions

sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev libevent-dev automake
Build Requirements:

For Ubuntu 12.04 and later or Debian 7 and later libboost-all-dev has to be installed:
sudo apt-get install build-essential libtool bsdmainutils autotools-dev autoconf pkg-config automake python3

sudo apt-get install libboost-all-dev
Now, you can either build from self-compiled [depends](/depends/README.md) or install the required dependencies:

db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin).
sudo apt-get install libssl-dev libgmp-dev libevent-dev libboost-all-dev

**Note:** For Ubuntu versions starting with Bionic (18.04), or Debian versions starting with Stretch, use `libssl1.0-dev`
above instead of `libssl-dev`. PIVX Core does not support the use of OpenSSL 1.1, though compilation is still possible
by passing `--with-incompatible-ssl` to configure (NOT RECOMMENDED!).

BerkeleyDB is required for the wallet.

**For Ubuntu only:** db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin).
You can add the repository using the following command:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install libdb4.8-dev libdb4.8++-dev

Ubuntu 12.04 and later have packages for libdb5.1-dev and libdb5.1++-dev,
but using these will break binary wallet compatibility, and is not recommended.
Ubuntu and Debian have their own libdb-dev and libdb++-dev packages, but these will install
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.

For other Debian & Ubuntu (with ppa):
To build Bitcoin Core without wallet, see [*Disable-wallet mode*](/doc/build-unix.md#disable-wallet-mode)

sudo apt-get install libdb4.8-dev libdb4.8++-dev
Optional (see --with-miniupnpc and --enable-upnp-default):

Optional:
sudo apt-get install libminiupnpc-dev

sudo apt-get install libminiupnpc-dev (see --with-miniupnpc and --enable-upnp-default)
ZMQ dependencies (provides ZMQ API):

Dependencies for the GUI: Ubuntu & Debian
-----------------------------------------
sudo apt-get install libzmq3-dev

If you want to build PIVX-Qt, make sure that the required packages for Qt development
GUI dependencies:


If you want to build pivx-qt, make sure that the required packages for Qt development
are installed. Qt 5 is necessary to build the GUI.
If both Qt 4 and Qt 5 are installed, Qt 5 will be used.
To build without GUI pass `--without-gui`.
Expand All @@ -101,6 +119,27 @@ libqrencode (optional) can be installed with:
Once these are installed, they will be found by configure and a pivx-qt executable will be
built by default.

### Fedora

#### Dependency Build Instructions

Build requirements:

sudo dnf install which gcc-c++ libtool make autoconf automake compat-openssl10-devel libevent-devel boost-devel libdb4-devel libdb4-cxx-devel gmp-devel python3

Optional:

sudo dnf install miniupnpc-devel zeromq-devel

To build with Qt 5 you need the following:

sudo dnf install qt5-qttools-devel qt5-qtbase-devel protobuf-devel

libqrencode (optional) can be installed with:

sudo dnf install qrencode-devel


Notes
-----
The release is built with GCC and then "strip pivxd" to strip the debug
Expand Down Expand Up @@ -177,11 +216,9 @@ Hardening Flags:
./configure --enable-hardening
./configure --disable-hardening


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. An attacker who is able to cause execution of code at an arbitrary
memory location is thwarted if he doesn'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 @@ -198,8 +235,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, pivx 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 All @@ -213,3 +249,20 @@ Hardening enables the following features:
RW- R-- RW-

The STK RW- means that the stack is readable and writeable but not executable.

Disable-wallet mode
--------------------
**Note:** This functionality is not yet completely implemented, and compilation using the below option will currently fail.

When the intention is to run only a P2P node without a wallet, PIVX Core may be compiled in
disable-wallet mode with:

./configure --disable-wallet

In this case there is no dependency on Berkeley DB 4.8.

Additional Configure Flags
--------------------------
A list of additional configure flags can be displayed with:

./configure --help

0 comments on commit 51e7b2c

Please sign in to comment.