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

Build from 10.2-10.4 srpm fails on RHEL8 family due to discrepancy in jemalloc requirements




      Currently for RHEL8-like systems RPMs are built with the explicit -DWITH_JEMALLOC=no option.

      cmake . -DBUILD_CONFIG=mysql_release -DCMAKE_COMMAND_DEP=cmake -DRPM=rocky84 -DWITH_JEMALLOC=no

      It was added to the buildbot config by this commit

      commit 57e294e278c59573dd01d72cff4e7db175d35ea1
      Author: Sergei Golubchik
      Date:   Wed Aug 25 22:41:29 2021 +0200
          buildbot: centos8/rhel8 don't have jemalloc

      Technically it is true, jemalloc is not provided by default repos on RHEL8 and alike, although it can be fetched from the EPEL repo. However, it is not important for this ticket.

      Thus the packages are built without jemalloc dependency.
      But the spec file in the resulting source rpm doesn't have this option, it contains the cmake command as

      '/usr/bin/cmake'  -DRPM=rocky84 -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DWITH_SSL=system -DCPACK_PACKAGING_INSTALL_PREFIX=/ ../mariadb-10.4.23

      So, when we build from srpm on RHEL8-s, there is no jemalloc in BuildRequires, and it doesn't attempt to install jemalloc along with its dependencies, regardless whether we enable EPEL or not; but when it comes to compiling, it fails because TokuDB wants jemalloc and cannot find it.

      CMake Error at cmake/jemalloc.cmake:38 (MESSAGE):
        jemalloc is not found
      Call Stack (most recent call first):
        storage/tokudb/CMakeLists.txt:53 (CHECK_JEMALLOC)

      It can be circumvented by installing jemalloc[-devel] from EPEL manually before building from srpm. But then, the srpm test in buildbot fails at the end, because it compares requirements of the rebuilt packages with the original ones and finds the extra jemalloc in the new ones.

      + diff -u requires-rebuilt.txt requires-vendor.txt
      --- requires-rebuilt.txt	2021-12-26 05:03:30.100166826 +0000
      +++ requires-vendor.txt	2021-12-26 05:03:29.665166847 +0000
      @@ -16,7 +16,6 @@

      I don't suppose there is any point in installing jemalloc now on build machines and getting rid of WITH_JEMALLOC=NO, it would only add an extra dependency to old maintenance versions without any gain. So, the choice is between suppressing the test failure above, or making srpms inherit build options from the original build. Patching the test is easy, but building from srpms the same way as the original packages were built (if possible and unless it contradicts some normal practices) sounds like a more valid approach.




            serg Sergei Golubchik
            elenst Elena Stepanova
            0 Vote for this issue
            2 Start watching this issue



              Git Integration

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