Percona Server for MySQL 8.4 source installation prerequisites¶
This document lists the prerequisites for building Percona Server for MySQL 8.4 from source. The list extends the MySQL 8.4 Source Installation Prerequisites with requirements for Percona-specific features (for example, XtraDB, MyRocks, and custom components).
Reading this page: Use this document together with Compile Percona Server for MySQL from source. Install packages in this order:
-
Foundation (toolchain)
-
Baseline (system libraries)
-
Percona layer (optional features you need)
By building from source you become your own release engineer. Forgetting to re-pull and re-patch when CVEs are released leaves you running known-vulnerable software; official packages receive security updates automatically. See Maintaining a source build in the compile guide.
Dependency hierarchy¶
Prerequisites fall into three layers. Install the foundation and baseline first; add the Percona layer according to the features you enable.
-
Foundation — Toolchain: CMake 3.15 or newer, GCC 11.3 or newer (or a Clang version supported by the source), Bison. Without these minimum versions, the build can fail immediately.
-
Baseline — System libraries: OpenSSL, ncurses, libudev, libaio. These are required for a basic build.
-
Percona layer — Feature libraries: zstd, lz4, snappy, gflags, and others for MyRocks/XtraDB and optional features. Install the development packages for the components you enable; CMake may need explicit flags (for example,
-DWITH_ZSTD=system) to use system libraries instead of bundling or skipping the feature.
You must install development packages (-devel on RHEL, -dev on Debian/Ubuntu), which provide headers and libraries needed for compilation. The lists below may not include every package for every storage engine or option. Run CMake and fix any missing-dependency messages before starting a long build.
Hardware requirements¶
A full source build of Percona Server 8.4 needs a lot of CPU and memory. Each parallel compile job can use about 2–4 GB RAM. The final link step can use several GB at once. If the machine has too little RAM (for example, a 2 GB VPS), the compiler or linker may run out of memory and produce “Internal Compiler Error” or similar failures. Use at least 8 GB RAM for a parallel build (for example, make -j4). If RAM is limited, use a single-threaded build (make) and a large swap file. The source tree, build directory, and install can use tens of GB of disk space; ensure you have enough free space before starting.
Toolchain (foundation)¶
Percona Server 8.4 uses modern C++ and requires minimum versions; the default packages on older stable distros (for example, RHEL 8, Ubuntu 20.04) can be too old and the build will fail. Verify versions before building:
-
CMake 3.15 or newer. Run
cmake --version. If the distro package is older, install a newer CMake (for example, from a module, a kit, or the upstream installer). -
GCC 11.3 or newer (or a Clang version documented for 8.4). Run
gcc --versionorg++ --version. If the distro provides an older GCC, use a newer toolchain (for example, Software Collections, or a newer distro) and ensure the linker (binutils) is also updated; an old system linker with a new GCC can cause late link failures. -
A minimum glibc version. Run
ldd --versionand compare to the version required for 8.4 (see release notes or build documentation). On older LTS distros, glibc can be too old and the build fails in the link phase. -
A modern linker (binutils). Run
ld --versionorld.bfd --versionand ensure the linker meets the requirement for 8.4.
Use a distribution and full toolchain that Percona documents as supported for 8.4.
Pointing the build at a newer toolchain: If the system default compiler is too old but you have a newer GCC or Clang elsewhere (for example, from Software Collections or a custom install), set CC and CXX before running CMake so the build uses that compiler. Example:
export CC=/opt/rh/gcc-toolset-11/root/usr/bin/gcc
export CXX=/opt/rh/gcc-toolset-11/root/usr/bin/g++
CMake will use these for configuration and compilation. If the linker is also in a non-default path, set LDFLAGS or the appropriate CMake variable so the correct linker is used.
Required packages (baseline)¶
Install the following development packages before running CMake so that configuration and compilation succeed without discovering missing libraries one at a time. Development packages provide headers and link libraries; the runtime-only packages are not enough for building.
RHEL, Rocky Linux, AlmaLinux (package manager: dnf or yum):
dnf install cmake gcc gcc-c++ ncurses-devel openssl-devel libudev-devel libaio-devel bison wget curl
Debian, Ubuntu (package manager: apt):
apt install cmake gcc g++ libncurses-dev libssl-dev libudev-dev libaio-dev bison wget curl
-
cmake — Build system generator. Minimum 3.15; verify with
cmake --version. Default packages on RHEL 8 or Ubuntu 20.04 may be older; upgrade if needed. -
gcc / g++ — C and C++ compiler. Minimum GCC 11.3 for 8.4; verify with
gcc --version. Use a newer toolchain on older distros if the default is too old. -
ncurses — Terminal library (ncurses-devel / libncurses-dev).
-
openssl — SSL/TLS (openssl-devel / libssl-dev).
-
libudev — Device manager library (libudev-devel / libudev-dev).
-
libaio — Asynchronous I/O (libaio-devel / libaio-dev).
-
bison — Parser generator.
-
wget, curl — Only if you choose the “CMake downloads Boost” option below; at least one must be installed and the build machine must have network access during CMake configuration.
Full feature set (all Percona features)¶
To avoid discovering missing libraries one at a time during CMake, you can install a complete set of packages that covers the baseline plus common optional and Percona-specific features (PAM, zlib, zstd, lz4, gflags, snappy). Run one of the following commands, then run CMake. You can still enable or disable features via CMake options.
RHEL, Rocky Linux, AlmaLinux:
dnf install cmake gcc gcc-c++ ncurses-devel openssl-devel libudev-devel libaio-devel bison wget curl pam-devel zlib-devel libzstd-devel lz4-devel gflags-devel snappy-devel
Debian, Ubuntu:
apt install cmake gcc g++ libncurses-dev libssl-dev libudev-dev libaio-dev bison wget curl libpam0g-dev zlib1g-dev libzstd-dev liblz4-dev libgflags-dev libsnappy-dev
If CMake still reports a missing dependency, add the corresponding -devel or -dev package for your distribution and re-run CMake.
Boost¶
Percona Server 8.4 requires a specific Boost version (defined in the source tree). Choose one approach only; do not combine them or you risk a version mismatch and “missing header” errors partway through the build.
-
Option A — CMake downloads Boost: add
-DDOWNLOAD_BOOST=1to the CMake command. CMake will download the correct Boost during configuration. You need wget or curl and network access on the build machine. Use Option A when the build machine has internet access and you do not want to install Boost yourself. -
Option B — You provide Boost: install the required Boost version (via the system package manager or a manual install) and pass
-DWITH_BOOST=/path/to/boostto CMake. Use Option B when the build machine has no network access or you already have the correct Boost. Do not set both options; use either Option A or Option B.
Check the source or CMake output for the exact Boost version required; do not rely on a single hardcoded version in documentation.
Optional features and Percona-specific components (Percona layer)¶
Depending on the CMake options you enable, additional development packages may be required. Install the -devel (RHEL) or -dev (Debian/Ubuntu) packages so CMake can find headers and libraries.
System vs. bundled libraries: For some components (for example, zstd, lz4), CMake can use either the system-installed library or a bundled copy. Use the system version (for example, -DWITH_ZSTD=system, -DWITH_LZ4=system) when the distro package is compatible and you want one version managed by the OS and updated with your system. Using the system version can help with security and compliance. Use the bundled default when the system library is too old or missing, or when you need the exact version the source expects. CMake does not always find system libraries automatically; without the explicit flag, the build may skip the feature or use a bundled version. Check the Percona Server source and CMake options for the flags that apply to your build.
-
PAM authentication — Building with the PAM plugin (
-DWITH_PAM=ON) typically requires the PAM development package (for example,pam-develon RHEL,libpam0g-devon Debian/Ubuntu). -
zlib — Required for compression support. Often already satisfied by the baseline list; if CMake reports a missing zlib, install the development package (for example,
zlib-develon RHEL,zlib1g-devon Debian/Ubuntu). -
zstd, lz4 — Compression libraries used by Percona features. Install the development packages (for example,
libzstd-devel,lz4-develon RHEL;libzstd-dev,liblz4-devon Debian/Ubuntu). Use CMake flags such as-DWITH_ZSTD=systemand-DWITH_LZ4=systemif the build expects to use system libraries. -
MyRocks (RocksDB) — Building with RocksDB/MyRocks can require extra libraries (for example, libgflags, libsnappy). Package names vary by distribution (for example,
gflags-devel,snappy-develon RHEL;libgflags-dev,libsnappy-devon Debian/Ubuntu). The exact set is defined in the Percona Server source; if CMake reports a “library not found” or similar error for a component not listed here, check the source repository or CMake configuration for that component.
The list above may not include every package for every storage engine or option. Run CMake once and fix any missing-dependency or configuration messages before starting a long build. The MySQL 8.4 upstream prerequisites page lists more optional dependencies. The final list for your build is in the Percona Server source tree and the CMake output.
See also¶
-
Compile Percona Server for MySQL from source — Configure, build, and install steps.
-
MySQL 8.4 Source Installation Prerequisites — Upstream baseline reference.