Compile latest GnuCash 3 source with latest AqBanking on CentOS 8 (PSD2 support)

Documentation date: 2019-09-26.

New to the collection: CentOS 8 documentation!

GnuCash is currently not available for CentOS 8. These instructions will guide you through the compilation from source. Unfortunately, some prerequisites have been decommissioned from Red Hat 8 or are otherwise not available. So you also have to build those first. This makes it a bit of a tedious job.

I am making an effort to keep changes to the core OS at a minimum so you can easily update or revert back to stock packages, should packages become available. Therefore, I am using the /tmp folder. Installations should be put to /usr/local as these are not distribution packages. Do feel free to deviate from the tmp folder to make your installation more permanent.

This setup will allow you to connect to your bank using the latest FinTS/HBCI protocol using PSD2 features.

Let me know, if this article has helped you and/or saved you tons of time. I am also happy to hear any improvement suggestions (


- GnuCash Maintenance branch (Version higher than 3.7) with MySQL support and Python Bindings.
- AqBanking Master branch (Version higher than 5.99) with PSD2 support.
- Tons of other packages like gmock, gtest, libunistring, guile, libofx, gwenhyfar, bdw-gc, opensp, texinfo, xmlsec1-gnutls

Assumption: "Workstation" module is installed

### Let's get going:

dnf -y update
CPU_CORES=$((`nproc` - 1 | bc)) # This will use all but 1 CPU core in conjunction with make -j
if [ "$CPU_CORES" -lt "1" ]; then CPU_CORES=1; fi

# Starting off with Aqbanking

## Gwenhyfer
dnf -y install gnutls-devel libgcrypt-devel libtool automake autoconf qt5-qtbase-devel  gcc-c++ gtk3-devel qt5-linguist openssl-devel

sudo ln -s /usr/bin/moc-qt5 /usr/bin/moc
sudo ln -s /usr/bin/lrelease-qt5 /usr/bin/lrelease
sudo ln -s /usr/bin/lupdate-qt5 /usr/bin/lupdate
sudo ln -s /usr/bin/uic-qt5 /usr/bin/uic
sudo ln -s /usr/bin/qmake-qt5 /usr/bin/qmake

cd /tmp
wget --content-disposition${GWEN_VERSION}
unzip gwenhywfar-${GWEN_VERSION}
cd gwenhywfar-${GWEN_VERSION}
autoreconf -i
./configure --with-guis="gtk3 qt5"
make -j${CPU_CORES}
make install # installs gwenhywfar to /usr/lib/cmake/${GWEN_VERSION}

# Aqbanking

## Install xmlsec1-gnutls. At time of writing, this was only part of the Red Hat Code Builder repository so we have to build it ourselves.
dnf -y install libxml2-devel libtool-ltdl-devel
cd /tmp
tar xf xmlsec1-${XMLSEC_VERSION}.tar.gz
cd xmlsec1-${XMLSEC_VERSION}
make -j${CPU_CORES}
sudo make install
export XMLSEC_CFLAGS=-I/usr/local/include/xmlsec1
export XMLSEC_LIBS=-lxmlsec1

#Building AqBanking
dnf -y install autoconf libtool automake gmp-devel gnutls-devel libgcrypt-devel gcc-c++ libtool-ltdl-devel libxslt-devel bzip2
cd /tmp
wget --content-disposition${AQ_VERSION}
unzip aqbanking-${AQ_VERSION}.zip
cd aqbanking-${AQ_VERSION}
export LD_LIBRARY_PATH=/usr/lib
autoreconf -i
./configure  # we are intentionally leaving the aqebics backend out as compilation is buggy"
make install


# Google Mock
cd /tmp
wget --content-disposition${GMOCK_VERSION}
unzip googletest-${GMOCK_VERSION}
cd googletest-${GMOCK_VERSION}
export GTEST_ROOT=`pwd`/googletest
export GMOCK_ROOT=`pwd`/googlemock


# Guile
## Starting off with libunistring
dnf -y install gcc-c++
cd /tmp
tar -xf libunistring-${LIBUNISTRING_VERSION}.tar.gz
cd libunistring-${LIBUNISTRING_VERSION}
make -j${CPU_CORES}
make install

## bdw-gc
dnf -y install gcc-c++
cd /tmp
tar -xf gc-${GC_VER}.tar.gz
cd gc-${GC_VER}
make -j${CPU_CORES}
make install

# Building Guile
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig # to find bdw-gc
dnf -y install libffi-devel libtool-ltdl-devel gcc-c++ gmp-devel
cd /tmp
tar -xf guile-${GUILE_VERSION}.tar.gz
cd guile-${GUILE_VERSION}
make -j${CPU_CORES} # Takes a long time
make install


# Libofx
## Starting with OpenSP
dnf -y install xmlto gcc-c++
cd /tmp
tar xf  OpenSP-${OPENSP_VER}.tar.gz
make #does not compile multicore
make install

## Gengetopt
### Texinfo
dnf -y install gcc-c++ ncurses-devel
cd /tmp
tar xf texinfo-${TEXINFO_VER}.tar.xz
cd texinfo-${TEXINFO_VER}
make -j${CPU_CORES}
make install

## Building Gengetopt
dnf -y install gcc-c++
cd /tmp
tar xf gengetopt-${GENGETOPT_VER}.tar.xz
cd gengetopt-${GENGETOPT_VER}
make -j${CPU_CORES}
make install

# Building Libofx
dnf -y install autoconf libtool automake
cd /tmp
tar xf ${LIBOFX_VERSION}.tar.gz
cd libofx-${LIBOFX_VERSION}
autoreconf -i
export LD_LIBRARY_PATH=/usr/local/lib
make -j${CPU_CORES}
make install


# now off to compile gnucash (yeah, finally)

export GTEST_ROOT=/tmp/googletest-${GMOCK_VERSION}/googletest
export GMOCK_ROOT=/tmp/googletest-${GMOCK_VERSION}/googlemock
export LD_LIBRARY_PATH=/usr/local/lib
#export PKG_CONFIG_PATH=/tmp/gwenhywfar-${GWEN_VERSION}:/tmp/aqbanking-${AQ_VERSION}:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

cd /tmp
export GNUCASH_VERSION=maint
#sudo yum -y install # install EPEL
dnf -y install webkit2gtk3-devel swig  libdbi-devel libdbi-dbd-mysql python3-devel libsecret-devel libxslt-devel boost-devel

git clone # You have to use the git repo or CMake will fail. The repository information is required to add version information.
cd gnucash
git checkout ${GNUCASH_VERSION}
cd ..
mkdir build-gnucash-${GNUCASH_VERSION}
cd build-gnucash-${GNUCASH_VERSION}
cmake -DWITH_PYTHON=ON ../gnucash
make -j${CPU_CORES}
sudo make install/strip # strip removes all debug info on installing
sed -i "s#Exec=#Exec=env LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib#" /usr/local/share/applications/gnucash.desktop # This adds LD_LIBRARY_PATH to the GnuCash application icon. This command line has not been tested yet


# To start gnucash (or just open the application icon)
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib