v4.0.4.0 on CentOS 7.x

The CentOS Linux is a stable, predictable, manageable and reproducible platform derived from the sources of Red Hat Enterprise Linux (RHEL). Two of our full nodes are currently running on CentOS 7. This release is coming by default with GCC 4.8.5 and Boost C++ Libraries 1.53.

Since the release v4.0.4.0 we build Gridcoin Research using GCC 8.x and Boost C++ Libraries 1.69.

Prerequisites

GNU Compiler Collection

GCC 8.x for CentOS 7.x comes as a Development Toolset from Software Collections.

# yum -y install centos-release-scl;

Install GCC version 8, C++ support for GCC version 8, header files and libraries for C++ development and a GNU make with all their dependencies.

# yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++;
# yum -y install devtoolset-8-make;

Switch to a shell with GCC 8 and verify version.

# scl enable devtoolset-8 -- bash;
# gcc -v;
[...]
gcc version 8.2.1 20180905 (Red Hat 8.2.1-3) (GCC)

Boost C++ Libraries

Install the C++ source libraries, cross platform build system for C++ projects and the Boost C++ headers and shared development libraries.

# wget https://dl.bintray.com/boostorg/release/1.69.0/source/boost_1_69_0.tar.gz;
# tar -xzf boost_1_*;
# cd boost_1_*;
# ./bootstrap.sh --prefix=/opt/boost-1.69
# ./b2 install --prefix=/opt/boost-1.69 --with=all;
# echo "/opt/boost-1.69/lib" > /etc/ld.so.conf.d/boost-1.69.conf;
# ldconfig;

The Boost C++ packages can be installed from SCL too but I could not find valid options to have successful build.

# yum -y install boost169 boost169-build boost169-devel;

Gridcoin Research Daemon

Build and install the Gridcoin Research from source configured with "--with-boost".

# ./autogen.sh;
# ./configure --without-gui --without-miniupnpc --with-incompatible-bdb --with-boost=/opt/boost-1.69 --disable-tests --disable-bench;
# gmake;

Print shared object dependencies.

# ldd ./src/gridcoinresearchd;
  linux-vdso.so.1 =>  (0x00007ffd297fc000)
  libcurl.so.4 => /lib64/libcurl.so.4 (0x00007fa733aa2000)
  libboost_system.so.1.69.0 => /opt/boost-1.69/lib/libboost_system.so.1.69.0 (0x00007fa73389f000)
  libboost_filesystem.so.1.69.0 => /opt/boost-1.69/lib/libboost_filesystem.so.1.69.0 (0x00007fa733673000)
  libboost_iostreams.so.1.69.0 => /opt/boost-1.69/lib/libboost_iostreams.so.1.69.0 (0x00007fa733458000)
  libboost_program_options.so.1.69.0 => /opt/boost-1.69/lib/libboost_program_options.so.1.69.0 (0x00007fa7331be000)
  libboost_thread.so.1.69.0 => /opt/boost-1.69/lib/libboost_thread.so.1.69.0 (0x00007fa732f87000)
  libboost_chrono.so.1.69.0 => /opt/boost-1.69/lib/libboost_chrono.so.1.69.0 (0x00007fa732d6b000)
  libdb_cxx-5.3.so => /lib64/libdb_cxx-5.3.so (0x00007fa732988000)
  libssl.so.10 => /lib64/libssl.so.10 (0x00007fa732715000)
  libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007fa7322b3000)
  librt.so.1 => /lib64/librt.so.1 (0x00007fa7320ab000)
  libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007fa731da3000)
  libm.so.6 => /lib64/libm.so.6 (0x00007fa731aa1000)
  libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa73188b000)
  libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa73166e000)
  libc.so.6 => /lib64/libc.so.6 (0x00007fa7312a1000)
  libidn.so.11 => /lib64/libidn.so.11 (0x00007fa73106e000)
  libssh2.so.1 => /lib64/libssh2.so.1 (0x00007fa730e43000)
  libssl3.so => /lib64/libssl3.so (0x00007fa730bf1000)
  libsmime3.so => /lib64/libsmime3.so (0x00007fa7309ca000)
  libnss3.so => /lib64/libnss3.so (0x00007fa73069c000)
  libnssutil3.so => /lib64/libnssutil3.so (0x00007fa73046c000)
  libplds4.so => /lib64/libplds4.so (0x00007fa730268000)
  libplc4.so => /lib64/libplc4.so (0x00007fa730062000)
  libnspr4.so => /lib64/libnspr4.so (0x00007fa72fe24000)
  libdl.so.2 => /lib64/libdl.so.2 (0x00007fa72fc20000)
  libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007fa72f9d2000)
  libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007fa72f6e9000)
  libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007fa72f4b6000)
  libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fa72f2b1000)
  liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007fa72f0a2000)
  libldap-2.4.so.2 => /lib64/libldap-2.4.so.2 (0x00007fa72ee4d000)
  libz.so.1 => /lib64/libz.so.1 (0x00007fa72ec36000)
  liblzma.so.5 => /lib64/liblzma.so.5 (0x00007fa72ea10000)
  /lib64/ld-linux-x86-64.so.2 (0x0000559021d5f000)
  libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007fa72e7ff000)
  libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fa72e5fb000)
  libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fa72e3e1000)
  libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007fa72e1c4000)
  libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fa72df9c000)
  libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fa72dd65000)
  libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fa72db03000)
  libfreebl3.so => /lib64/libfreebl3.so (0x00007fa72d8ff000)

Disclaimer

This guide might be incomplete as it has been prepared as a reference. Be familiar with the build process before using it. Consideer joining the Gricoin Community's channel "#packaging" for comments and further discussion.