Some notes on how to build Ion Core based on the depends build system.
In the past, the build documentation contained instructions on how to build Ion with system-wide installed dependencies
like BerkeleyDB 4.8, boost and Qt. Building this way is considered deprecated and only building with the depends
prefix
is supported today.
Building the dependencies and Ion Core requires some essential build tools to be installed before. Please see build-unix, build-osx and build-windows for details.
Ion inherited the depends
folder from Bitcoin, which contains all dependencies required to build Ion. These
dependencies must be built before Ion can actually be built. To do so, perform the following:
cd depends
make -j4 # Choose a good -j value, depending on the number of CPU cores available
cd ..
This will download and build all dependencies required to build Ion Core. Caching of build results will ensure that only the packages are rebuilt which have changed since the last depends build.
It is required to re-run the above commands from time to time when dependencies have been updated or added. If this is not done, build failures might occur when building Ion.
Please read the depends documentation for more details on supported hosts and configuration
options. If no host is specified (as in the above example) when calling make
, the depends system will default to your
local host system.
./autogen.sh
./configure --prefix=`pwd`/depends/<host>
make
make install # optional
Please replace <host>
with your local system's host-platform-triplet
. The following triplets are usually valid:
i686-w64-mingw32
for Win32x86_64-w64-mingw32
for Win64x86_64-apple-darwin16
for MacOSXi686-pc-linux-gnu
for Linux PC 32-Bitx86_64-pc-linux-gnu
for Linux PC 64-Bitarm-linux-gnueabihf
for Linux ARM 32 bitaarch64-linux-gnu
for Linux ARM 64 bitpowerpc-linux-gnu
for Linux PPC 32 bitpowerpc64-linux-gnu
for Linux PPC64 64 bitpowerpc64el-linux-gnu
for Linux PPC64EL 64 bitmipsel-linux-gnu
for Linux MIPSEL 32 bitmips-linux-gnu
for Linux MIPS 32 bits390x-linux-gnu
for Linux s390x
If you want to cross-compile for another platform, choose the appropriate <host>
and make sure to build the
dependencies with the same host before.
If you want to build for the same host but different distro, add --enable-glibc-back-compat
when calling ./configure
.
./configure
of Ion Core will autodetect the presence of ccache and enable use of it. To disable ccache, use
./configure --prefix=<prefix> --disable-ccache
. When installed and enabled, ccache will
cache build results on source->object level.
The default maximum cache size is 5G, which might not be enough to cache multiple builds when switching Git branches very often. It is advised to increase the maximum cache size:
ccache -M20G
A list of additional configure flags can be displayed with:
./configure --help