Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-20392

Build Failure on rhel 8.0: CMake Error at /build/cmake/do_abi_check.cmake:82

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 ?

      Attachments

        Activity

          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

          otto Otto Kekäläinen added a comment - 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

          serg Fix available at https://github.com/MariaDB/server/pull/1846, please merge.

          otto Otto Kekäläinen added a comment - serg Fix available at https://github.com/MariaDB/server/pull/1846 , please merge.

          otto, how did you know that the root cause was missing diff? I wasn't able to find it any hints in the logs.

          serg Sergei Golubchik added a comment - otto , how did you know that the root cause was missing diff ? I wasn't able to find it any hints in the logs.
          otto Otto Kekäläinen added a comment - - edited

          serg Because Vittal posted his exact steps and nothing in them installs diffutils. He tried to compile MariaDB out of pristine sources and this is what happens 100% of the time if one does so without diffutils. See my PR for proof.

          Vittal never replied to your request to diff the files. It would have most likely shown that there is no diff, but diff itself was missing.

          This error message has 1600 hits on Google, it is very common. But it is fixed now from 10.6 onwards if you approve my PR.

          otto Otto Kekäläinen added a comment - - edited serg Because Vittal posted his exact steps and nothing in them installs diffutils. He tried to compile MariaDB out of pristine sources and this is what happens 100% of the time if one does so without diffutils. See my PR for proof. Vittal never replied to your request to diff the files. It would have most likely shown that there is no diff, but diff itself was missing. This error message has 1600 hits on Google, it is very common. But it is fixed now from 10.6 onwards if you approve my PR.

          Pushed. Thanks, otto!

          serg Sergei Golubchik added a comment - Pushed. Thanks, otto !

          People

            serg Sergei Golubchik
            vitthal_bagal Vitthal Bagal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.