The build environment setup instructions in the knowledge base are seriously lacking,
especially for RHEL/CentOS, and seem to still be at the state of MariaDB 5.5 days
The list of required libraries is missing libaio for example, and the description how to install dependencies via "apt build-dep", "yum-builddep" or "zypper" is only functional when the distribution comes with the same MariaDB version you want to compile against, which in the case of CentOS and RHEL would currently limit us to building MariaDB 5.5 (and even then the CentOS 7 MariaDB source RPM does not list gcc and gcc-c++ as dependencies).
For the distribution tool shortcuts the problem even persists when using MariaDB (com or org) repositories as we don't provide source RPM or DEB packages, so the distribution tools still fetch the build dependencies from their owh source packages. (see also MDEV-1066)
The setup steps I use to build CentOS7 RPMs from source myself right now are:
With this I'm still missing the oqgraph-storage and cassandra-storage packages from my own build results.
And I'm also not sure whether my own builds are indeed similar enough to the official RPMs.