Details
Description
I am trying to build mariadb(v10.4.6) from source on rhel 8.0 and Observed build failure as below:
Scanning dependencies of target abi_check
|
CMake Error at /home/test/server-mariadb-10.4.6/cmake/do_abi_check.cmake:81 (MESSAGE):
|
ABI check found difference between
|
/home/test/server-mariadb-10.4.6/include/mysql/plugin_audit.h.pp and
|
/home/test/build_mariadb/abi_check.out
|
|
make[2]: *** [CMakeFiles/abi_check.dir/build.make:57: CMakeFiles/abi_check] Error 1
|
make[1]: *** [CMakeFiles/Makefile2:168: CMakeFiles/abi_check.dir/all] Error 2
|
make: *** [Makefile:163: all] Error 2
|
I have followed below steps :
export SOURCE_ROOT=$PWD && sudo yum install -y git gcc bison gcc-c++ make wget tar cmake openssl-devel ncurses-devel python2 boost-devel check-devel perl-Test-Simple perl-Time-HiRes openssl pcre-devel pam-devel |
|
wget https://github.com/MariaDB/server/archive/mariadb-10.4.6.tar.gz |
tar xzf mariadb-10.4.6.tar.gz |
cd $SOURCE_ROOT |
git clone https://github.com/MariaDB/mariadb-connector-c.git |
cd mariadb-connector-c |
git checkout v3.1.2
|
cp -r $SOURCE_ROOT/mariadb-connector-c/* $SOURCE_ROOT/server-mariadb-10.4.6/libmariadb/ |
cd $SOURCE_ROOT |
git clone https://github.com/codership/wsrep-lib.git |
cd wsrep-lib |
git checkout fd66bdef0bbcdeb3a5189c7f93319cb5f9d77ea7
|
git submodule update --init --recursive
|
cp -r $SOURCE_ROOT/wsrep-lib/* $SOURCE_ROOT/server-mariadb-10.4.6/wsrep-lib/ |
mkdir $SOURCE_ROOT/build_mariadb |
cd $SOURCE_ROOT/build_mariadb |
cmake $SOURCE_ROOT/server-mariadb-10.4.6 |
make |
Please help me to resolve this failure. Also let me know if i missed anything ?
I am reopening the "bug", or rather usability error. This is still happening on latest MariaDB and googling on the error brings up thousands of pages where people complain about it.
The root cause is that the binary 'diff' is missing from the system, and CMake gets an exit code which it thinks was from diff, but in reality it was that diff was not even found.
Workaround: apt/yum install diffutils
Proper fix: extend CMake code to check for binary diff and emit a proper error message if it was not found at all