Update build docs with Blackcoin information
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
UNIX BUILD NOTES
|
||||
====================
|
||||
Some notes on how to build Bitcoin Core in Unix.
|
||||
Some notes on how to build Blackcoin More in Unix.
|
||||
|
||||
(for OpenBSD specific instructions, see [build-openbsd.md](build-openbsd.md))
|
||||
|
||||
Note
|
||||
---------------------
|
||||
Always use absolute paths to configure and compile bitcoin and the dependencies,
|
||||
Always use absolute paths to configure and compile blackcoin and the dependencies,
|
||||
for example, when specifying the path of the dependency:
|
||||
|
||||
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
|
||||
@@ -24,7 +24,7 @@ make
|
||||
make install # optional
|
||||
```
|
||||
|
||||
This will build bitcoin-qt as well if the dependencies are met.
|
||||
This will build blackmore-qt as well if the dependencies are met.
|
||||
|
||||
Dependencies
|
||||
---------------------
|
||||
@@ -42,7 +42,7 @@ Optional dependencies:
|
||||
Library | Purpose | Description
|
||||
------------|------------------|----------------------
|
||||
miniupnpc | UPnP Support | Firewall-jumping support
|
||||
libdb4.8 | Berkeley DB | Wallet storage (only needed when wallet enabled)
|
||||
libdb6.2 | Berkeley DB | Wallet storage (only needed when wallet enabled)
|
||||
qt | GUI | GUI toolkit (only needed when GUI enabled)
|
||||
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)
|
||||
@@ -55,7 +55,7 @@ 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
|
||||
memory available when compiling Blackcoin More. On systems with less, gcc can be
|
||||
tuned to conserve memory with additional CXXFLAGS:
|
||||
|
||||
|
||||
@@ -79,20 +79,14 @@ install necessary parts of boost:
|
||||
|
||||
sudo apt-get install libboost-all-dev
|
||||
|
||||
BerkeleyDB is required for the wallet. db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin).
|
||||
You can add the repository and install using the following commands:
|
||||
BerkeleyDB 6.2 is required for the wallet.
|
||||
|
||||
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 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
|
||||
are based on BerkeleyDB 4.8. If you do not care about wallet compatibility,
|
||||
Ubuntu and Debian have their own libdb-dev and libdb++-dev packages, but these will most likely install
|
||||
BerkeleyDB 5.1, which break binary wallet compatibility with the distributed executables which
|
||||
are based on BerkeleyDB 6.2. 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.
|
||||
See the section "Disable-wallet mode" to build Blackcoin More without wallet.
|
||||
|
||||
Optional:
|
||||
|
||||
@@ -105,7 +99,7 @@ ZMQ dependencies:
|
||||
Dependencies for the GUI: Ubuntu & Debian
|
||||
-----------------------------------------
|
||||
|
||||
If you want to build Bitcoin-Qt, make sure that the required packages for Qt development
|
||||
If you want to build Blackmore-Qt, make sure that the required packages for Qt development
|
||||
are installed. Either Qt 5 or Qt 4 are necessary to build the GUI.
|
||||
If both Qt 4 and Qt 5 are installed, Qt 5 will be used. Pass `--with-gui=qt4` to configure to choose Qt4.
|
||||
To build without GUI pass `--without-gui`.
|
||||
@@ -122,7 +116,7 @@ libqrencode (optional) can be installed with:
|
||||
|
||||
sudo apt-get install libqrencode-dev
|
||||
|
||||
Once these are installed, they will be found by configure and a bitcoin-qt executable will be
|
||||
Once these are installed, they will be found by configure and a blackmore-qt executable will be
|
||||
built by default.
|
||||
|
||||
Dependency Build Instructions: Fedora
|
||||
@@ -145,7 +139,7 @@ libqrencode (optional) can be installed with:
|
||||
|
||||
Notes
|
||||
-----
|
||||
The release is built with GCC and then "strip bitcoind" to strip the debug
|
||||
The release is built with GCC and then "strip blackmored" to strip the debug
|
||||
symbols, which reduces the executable size by about 90%.
|
||||
|
||||
|
||||
@@ -163,28 +157,28 @@ turned off by default. See the configure options for upnp behavior desired:
|
||||
|
||||
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 6.2. If you have to build it yourself:
|
||||
|
||||
```bash
|
||||
BITCOIN_ROOT=$(pwd)
|
||||
|
||||
# Pick some path to install BDB to, here we create a directory within the bitcoin directory
|
||||
BDB_PREFIX="${BITCOIN_ROOT}/db4"
|
||||
# Pick some path to install BDB to, here we create a directory within the blackcoin directory
|
||||
BDB_PREFIX="${BITCOIN_ROOT}/build"
|
||||
mkdir -p $BDB_PREFIX
|
||||
|
||||
# Fetch the source and verify that it is not tampered with
|
||||
wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'
|
||||
echo '12edc0df75bf9abd7f82f821795bcee50f42cb2e5f76a6a281b85732798364ef db-4.8.30.NC.tar.gz' | sha256sum -c
|
||||
# -> db-4.8.30.NC.tar.gz: OK
|
||||
tar -xzvf db-4.8.30.NC.tar.gz
|
||||
wget 'http://download.oracle.com/berkeley-db/db-6.2.32.tar.gz'
|
||||
echo 'a9c5e2b004a5777aa03510cfe5cd766a4a3b777713406b02809c17c8e0e7a8fb db-6.2.32.tar.gz' | sha256sum -c
|
||||
# -> db-6.2.32.tar.gz: OK
|
||||
tar -xzvf db-6.2.32.tar.gz
|
||||
|
||||
# Build the library and install to our prefix
|
||||
cd db-4.8.30.NC/build_unix/
|
||||
cd db-6.2.32/build_unix/
|
||||
# Note: Do a static build so that it can be embedded into the executable, instead of having to find a .so at runtime
|
||||
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
|
||||
make install
|
||||
|
||||
# Configure Bitcoin Core to use our own-built instance of BDB
|
||||
# Configure Blackcoin More to use our own-built instance of BDB
|
||||
cd $BITCOIN_ROOT
|
||||
./autogen.sh
|
||||
./configure LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" # (other args...)
|
||||
@@ -203,7 +197,7 @@ If you need to build Boost yourself:
|
||||
|
||||
Security
|
||||
--------
|
||||
To help make your bitcoin installation more secure by making certain attacks impossible to
|
||||
To help make your blackcoin installation more secure by making certain attacks impossible to
|
||||
exploit even if a vulnerability is found, binaries are hardened by default.
|
||||
This can be disabled with:
|
||||
|
||||
@@ -227,7 +221,7 @@ Hardening enables the following features:
|
||||
|
||||
To test that you have built PIE executable, install scanelf, part of paxutils, and use:
|
||||
|
||||
scanelf -e ./bitcoin
|
||||
scanelf -e ./blackmore
|
||||
|
||||
The output should contain:
|
||||
|
||||
@@ -236,13 +230,13 @@ Hardening enables the following features:
|
||||
|
||||
* 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 should be built with a non-executable stack
|
||||
vulnerable buffers are found. By default, blackcoin 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
|
||||
executable without the non-executable stack protection.
|
||||
|
||||
To verify that the stack is non-executable after compiling use:
|
||||
`scanelf -e ./bitcoin`
|
||||
`scanelf -e ./blackmore`
|
||||
|
||||
the output should contain:
|
||||
STK/REL/PTL
|
||||
@@ -252,7 +246,7 @@ Hardening enables the following features:
|
||||
|
||||
Disable-wallet mode
|
||||
--------------------
|
||||
When the intention is to run only a P2P node without a wallet, bitcoin may be compiled in
|
||||
When the intention is to run only a P2P node without a wallet, blackcoin may be compiled in
|
||||
disable-wallet mode with:
|
||||
|
||||
./configure --disable-wallet
|
||||
@@ -274,18 +268,17 @@ Setup and Build Example: Arch Linux
|
||||
This example lists the steps necessary to setup and build a command line only, non-wallet distribution of the latest changes on Arch Linux:
|
||||
|
||||
pacman -S git base-devel boost libevent python
|
||||
git clone https://github.com/bitcoin/bitcoin.git
|
||||
cd bitcoin/
|
||||
git clone https://gitlab.com/blackcoin/blackcoin-more.git
|
||||
cd blackcoin-more/
|
||||
./autogen.sh
|
||||
./configure --disable-wallet --without-gui --without-miniupnpc
|
||||
make check
|
||||
|
||||
Note:
|
||||
Enabling wallet support requires either compiling against a Berkeley DB newer than 4.8 (package `db`) using `--with-incompatible-bdb`,
|
||||
or building and depending on a local version of Berkeley DB 4.8. The readily available Arch Linux packages are currently built using
|
||||
`--with-incompatible-bdb` according to the [PKGBUILD](https://projects.archlinux.org/svntogit/community.git/tree/bitcoin/trunk/PKGBUILD).
|
||||
As mentioned above, when maintaining portability of the wallet between the standard Bitcoin Core distributions and independently built
|
||||
node software is desired, Berkeley DB 4.8 must be used.
|
||||
Enabling wallet support requires either compiling against a Berkeley DB newer than 6.2 (package `db`) using `--with-incompatible-bdb`,
|
||||
or building and depending on a local version of Berkeley DB 6.2.
|
||||
As mentioned above, when maintaining portability of the wallet between the standard Blackcoin More distributions and independently built
|
||||
node software is desired, Berkeley DB 6.2 must be used.
|
||||
|
||||
|
||||
ARM Cross-compilation
|
||||
|
||||
Reference in New Issue
Block a user