[MDEV-31291] Update KB page building MariaDB on CentOS Created: 2023-05-16  Updated: 2023-06-18

Status: Open
Project: MariaDB Server
Component/s: Documentation
Affects Version/s: None
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Anel Husakovic Assignee: Ian Gilfillan
Resolution: Unresolved Votes: 0
Labels: None
Environment:

centos


Issue Links:
Relates
relates to MDEV-16758 opensuse 15.0 builds fail with cpack ... Closed

 Description   

The page Building MariaDB on CentOS is missing couple of important things:

  • Add wget as dependency
  • By default cmake version installed from yum base repo is 2.8 that is not supported for MariaDB server to be built, we need version 3.1+. This fact is introduced in 2018 with commit d9613b750c6d.
    Task: Add instruction for cmake latest to be built:

    $ yum remove cmake
    $ wget https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3.tar.gz
    $ tar zxvf cmake-3.*
    $ cd cmake-3.*
    $ ./bootstrap --prefix=/usr/local
    $ make -j$(nproc)
    $ make install
    $ yum remove cmake # removes 2.8
    $ ln -s /usr/local/bin/cmake /usr/bin/cmake # make symbolic link
    $ ln -s /usr/local/bin/cpack /usr/bin/cpack
    

  • Based on MDEV-16758 we need to have source directory as well as build directory longer than default path determined with CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX with default path: /usr/src/debug/${CPACK_PACKAGE_FILE_NAME}<component>, with while testing I found as /usr/src/debug/MariaDB/<source_path>.
    Task: Indicate to user to create build directory as well as source directory (like in case of containers to map volume) to longer path than default 25 characters.

    $ mkdir <my_long_path_source_directory> # this may be a  volume on container
    $ mkdir <my_long_path_build_directory>
    

  • Use -j($nproc} for make package

Generated at Thu Feb 08 10:22:44 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.