Search notes:

Building Bitcoin-Core

Some hints …

Building Berkley DB

Berkley DB is needed to access the wallet.
Get Berkley DB from Oracle. Make sure you get version 4.8 (as of 2017-06-21)
Build it:
tar xfvz db-4.8.30.tar.gz
cd db-4.8.30
cd build_unix
../dist/configure --enable-cxx --disable-shared --with-pic
make
sudo make install
By default, the headers and the library are installed under /usr/local into the directory BerkeleyDB.4.8.
To choose another destination, use --prefix=/path/to/desired/location/ in the configure line.

Boost

Boost version 1.47 or higher is also needed (as of 2017-06-21)
Ubuntu:
sudo apt-get install libboost-all-dev
Arch-Linux:
sudo pacman -S boost boost-libs

libprotobuf

Apparently, libprotobuf is needed for the frontend (bitcoin-qt).
sudo apt-get install protobuf-compiler

libevent

Not sure what libevent is needed for …
sudo apt-get install libevent-dev

Qt

Getting Qt
On arch linux:
sudo pacman -S qt5
This installs quite a lot. Possibly, a smaller subset would be sufficient.
On Ubuntu
sudo apt-get install qtdeclarative5-dev

Building bitcoin itself

Get the sources from github:
cd /path/of/building/directory
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin
./autogen.sh

configuring

Note the specific declaration of the location of Berkeley DB:
# ./configure LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib/" CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include/"
./configure LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib/" CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include/" --with-gui=qt5
Also seen: configure … --with-qt
The executables can also be configured for debugging:
./configure … --enable-debug
or
./configure CXXFLAGS="-g -ggdb -O0" …
Alternatively, also consider using the executable's -debug=… flag.

making

make -s -j5

output

The following executables should have been built:
src/bitcoind
src/bitcoin-cli
src/bitcoin-tx
src/qt/bitcoin-qt

TODO

Doxygen documentation can apparently be created from the root directory by executing
$ doxygen doc/Doxygen
The generated documentation then goes to doc/doxygen/html.

Links

This github gist was useful.

See also

Bitcoin core

Index