15th March 2018

Howto build from source multichain 1.x on debian 8 x64 (jessie)

Alpcoin’s network is currently based upon multichain 1.x. This is a small howto to build it from source on a Debian 8 host.

# download Berkeley DB 4.8
https://download.oracle.com/berkeley-db/db-4.8.30.tar.gz
# unzip
tar -xvzf db-4.8.30.tar.gz
# configure and compile
cd db-4.8.30/build_unix
../dist/configure --disable-static --enable-cxx
make -j6
# install libraries and headers
su
make install
# update linker
echo "/usr/local/BerkeleyDB.4.8/lib" > /etc/ld.so.conf.d/berkeleydb.conf
ldconfig
exit
#download and unzip multichain
wget https://github.com/MultiChain/multichain/archive/1.0.x-release.zip
unzip 1.0.x-release.zip
# configure and build multichain
cd 1.0.x-release
./autogen.sh
env CPPFLAGS='-I/usr/local/BerkeleyDB.4.8/include' ./configure
make -j 6
# DONE, your executables are in src
# doing an ldd we can see if they are linked against the right libs
francesco@freeside:~/playground/multichain-1.0.x-release/src$ ldd multichaind
        linux-vdso.so.1 (0x00007fffedfeb000)
        libboost_system.so.1.55.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.55.0 (0x00007f33bdea6000)
        libboost_filesystem.so.1.55.0 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.55.0 (0x00007f33bdc8e000)
        libboost_program_options.so.1.55.0 => /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.55.0 (0x00007f33bda16000)
        libboost_thread.so.1.55.0 => /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.55.0 (0x00007f33bd7fb000)
        libboost_chrono.so.1.55.0 => /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.55.0 (0x00007f33bd5f3000)
        libdb_cxx-4.8.so => /usr/local/BerkeleyDB.4.8/lib/libdb_cxx-4.8.so (0x00007f33bd252000)
        libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f33bcff1000)
        libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f33bcbf5000)
        libminiupnpc.so.10 => /usr/lib/x86_64-linux-gnu/libminiupnpc.so.10 (0x00007f33bc9e9000)
        libanl.so.1 => /lib/x86_64-linux-gnu/libanl.so.1 (0x00007f33bc7e5000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f33bc4da000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f33bc1d9000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f33bbfc3000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f33bbda6000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f33bb9fb000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f33bb7f3000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f33bb5ef000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f33be990000)