diff options
Diffstat (limited to 'doc/build-unix.md')
-rw-r--r-- | doc/build-unix.md | 62 |
1 files changed, 40 insertions, 22 deletions
diff --git a/doc/build-unix.md b/doc/build-unix.md index d5ddc90d40..8a76a8b2cd 100644 --- a/doc/build-unix.md +++ b/doc/build-unix.md @@ -2,6 +2,16 @@ UNIX BUILD NOTES ==================== Some notes on how to build Bitcoin in Unix. +Note +--------------------- +Always use absolute paths to configure and compile bitcoin and the dependencies, +for example, when specifying the the path of the dependency: + + ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX + +Here BDB_PREFIX must absolute path - it is defined using $(pwd) which ensures +the usage of the absolute path. + To Build --------------------- @@ -32,17 +42,13 @@ turned off by default. See the configure options for upnp behavior desired: --disable-upnp-default (the default) UPnP support turned off by default at runtime --enable-upnp-default UPnP support turned on by default at runtime -IPv6 support may be disabled by setting: - - --disable-ipv6 Disable IPv6 support - Licenses of statically linked libraries: Berkeley DB New BSD license with additional requirement that linked software must be free open source Boost MIT-like license miniupnpc New (3-clause) BSD license -- For the versions used in this release, see doc/release-process.md under *Fetch and build inputs*. +- For the versions used in the release, see doc/release-process.md under *Fetch and build inputs*. System requirements -------------------- @@ -55,10 +61,8 @@ Dependency Build Instructions: Ubuntu & Debian ---------------------------------------------- Build requirements: - sudo apt-get install build-essential - sudo apt-get install libtool autotools-dev autoconf - sudo apt-get install libssl-dev - + sudo apt-get install build-essential libtool autotools-dev autoconf pkg-config libssl-dev + for Ubuntu 12.04 and later: sudo apt-get install libboost-all-dev @@ -72,10 +76,6 @@ for Ubuntu 12.04 and later: 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. -for Ubuntu 13.10: - libboost1.54 will not work, - remove libboost1.54-all-dev and install libboost1.53-all-dev instead. - for Debian 7 (Wheezy) and later: The oldstable repository contains db4.8 packages. Add the following line to /etc/apt/sources.list, @@ -87,11 +87,9 @@ To enable the change run sudo apt-get update -for other Ubuntu & Debian: +for other Debian & Ubuntu (with ppa): - sudo apt-get install libdb4.8-dev - sudo apt-get install libdb4.8++-dev - sudo apt-get install libboost1.55-all-dev + sudo apt-get install libdb4.8-dev libdb4.8++-dev Optional: @@ -137,13 +135,33 @@ miniupnpc Berkeley DB ----------- -You need Berkeley DB 4.8. If you have to build Berkeley DB yourself: +It is recommended to use Berkeley DB 4.8. If you have to build it yourself: - cd build_unix/ - ../dist/configure --enable-cxx - make - sudo make install +```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" +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 + +# Build the library and install to our prefix +cd db-4.8.30.NC/build_unix/ +# Note: Do a static build so that it can be embedded into the exectuable, 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 +cd $BITCOIN_ROOT +./configure (other args...) LDFLAGS="-L${BDB_PREFIX}/lib/" CPPFLAGS="-I${BDB_PREFIX}/include/" +``` +**Note**: You only need Berkeley DB if the wallet is enabled (see the section *Disable-Wallet mode* below). Boost ----- |