Building from source

When building Bitcoin Core from source, there are some platform-dependant instructions to follow.

To learn how to build for your platform, visit the Bitcoin Core bitcoin/doc directory, and read the file named "build-*.md", where "*" is the name of your platform. For windows this is "", for macOS this is "" and for most linux distributions this is "".

There is also a guide by Jon Atack on how to compile and test Bitcoin Core.

Finally, Blockchain Commons also offer a guide to building from source.

Cleaner builds

It can be helpful to use a separate build directory e.g. build/ when compiling from source. This can help avoid spurious Linker errors without requiring you to run make clean often.

From within your Bitcoin Core source directory you can run:

# Clean current source dir in case it was already configured
make distclean

# Make new build dir
mkdir build && cd build

# Run normal build sequence with amended path
../configure --your-normal-options-here
make -j `nproc`
make check

To run individual functional tests using the bitcoind binary built in an out-of-source build change directory back to the root source and specify the config.ini file from within the build directory:

$ pwd
$ cd ..
$ test/functional/ --configfile build/test/config.ini