Skip to content

Commit f16edf2

Browse files
committed
PXC-5133 [DOCS] - [feedback] investigate PXC Compile 8.4
modified: docs/compile.md
1 parent 39b1165 commit f16edf2

File tree

1 file changed

+66
-50
lines changed

1 file changed

+66
-50
lines changed

docs/compile.md

Lines changed: 66 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
# Compile and install from source code
22

3-
If you want to compile Percona XtraDB Cluster, you can find the source code on
4-
[GitHub :octicons-link-external-16:](https://github.com/percona/percona-xtradb-cluster).
5-
Before you begin, make sure that the following packages are installed:
6-
7-
| | apt| yum|
8-
| --- | ----- | --- |
9-
| Git| `git` | `git`|
10-
| SCons | `scons` | `scons`|
11-
| GCC| `gcc` | `gcc` |
12-
| g++ | `g++` | `gcc-c++` |
13-
| OpenSSL| `openssl` | `openssl`|
14-
| Check| `check`| `check` |
15-
| CMake| `cmake` | `cmake` |
16-
| Bison| `bison` | `bison`|
17-
| Boost | `libboost-all-dev` | `boost-devel` |
18-
| Asio| `libasio-dev`| `asio-devel` |
19-
| Async I/O| `libaio-dev` | `libaio-devel`|
20-
| ncurses | `libncurses5-dev` | `ncurses-devel`|
21-
| Readline| `libreadline-dev`| `readline-devel`|
22-
| PAM | `libpam-dev`| `pam-devel`|
23-
| socat| `socat` | `socat`|
24-
| curl | `libcurl-dev` | `libcurl-devel`|
25-
26-
## Check packages
27-
28-
You may have already installed most of the packages. Run one of the following commands to install any missing
29-
dependencies:
3+
For routine deployments, prefer [official packages or a binary tarball](tarball.md). Follow this page to compile Percona XtraDB Cluster when you package it yourself, ship custom patches, or develop the server locally.
4+
5+
Clone the source from [GitHub :octicons-link-external-16:](https://github.com/percona/percona-xtradb-cluster), then install the build packages in the table.
6+
7+
| Package | apt | yum |
8+
| --------- | ------------------- | ----------------- |
9+
| Git | `git` | `git` |
10+
| SCons | `scons` | `scons` |
11+
| GCC | `gcc` | `gcc` |
12+
| g++ | `g++` | `gcc-c++` |
13+
| OpenSSL | `openssl` | `openssl` |
14+
| Check | `check` | `check` |
15+
| CMake | `cmake` | `cmake` |
16+
| Bison | `bison` | `bison` |
17+
| Boost | `libboost-all-dev` | `boost-devel` |
18+
| Asio | `libasio-dev` | `asio-devel` |
19+
| Async I/O | `libaio-dev` | `libaio-devel` |
20+
| ncurses | `libncurses5-dev` | `ncurses-devel` |
21+
| Readline | `libreadline-dev` | `readline-devel` |
22+
| PAM | `libpam-dev` | `pam-devel` |
23+
| socat | `socat` | `socat` |
24+
| curl | `libcurl-dev` | `libcurl-devel` |
25+
26+
## Install dependencies
27+
28+
Fill any gaps with one of these commands:
3029

3130
=== "on Debian or Ubuntu"
3231

@@ -46,30 +45,26 @@ dependencies:
4645

4746
### glibc version
4847

49-
The glibc (GNU C Library) version can differ across software builds due to several key factors:
48+
Percona XtraBackup tarballs encode glibc in the filename as `glibc2.xx`. Replace that token with the suffix from your actual file (for example `glibc2.28`). Choose archives built for the glibc you compile and run against. Inspect the library version with:
5049

51-
| Reason | Description |
52-
|---------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
53-
| Operating system variation | When you build software on different Linux distributions or versions, each may ship with a different default glibc version. For example, Red Hat Enterprise Linux or Ubuntu might have distinct system library versions that impact compilation. |
54-
| Backward compatibility considerations | Some applications are compiled to support multiple glibc versions. <br> - Developers often create builds that can run on older systems. <br> - This means intentionally targeting a slightly older glibc version for wider compatibility. |
55-
| System architecture differences | 32-bit and 64-bit systems might require different glibc implementations. <br> - ARM, x86, and other processor architectures can have unique library requirements. |
56-
| Security and patch levels | Distributions backport security patches at different rates. <br> - A system's glibc version reflects its current security update status. <br> - Critical security updates can prompt version changes. |
57-
| Compilation environment | The specific development environment and build tools used can directly influence which glibc version gets linked during compilation. Container environments, cross-compilation setups, and build servers might have unique library configurations. |
50+
```shell
51+
ldd --version
52+
```
5853

59-
Practical Tip: Use `ldd --version` to check your current glibc version and understand potential compatibility constraints in your software ecosystem.
54+
When build hosts and deployment hosts differ, keep the CPU architecture aligned and match glibc, or compile on a host that mirrors production.
6055

6156
## Compile
6257

63-
To compile Percona XtraDB Cluster from source code:
58+
Compile Percona XtraDB Cluster from source:
6459
{.power-number}
6560

66-
1. Clone the latest repository or update it to the latest state. The old codebase may not be compatible with the build script. Clone the Percona XtraDB Cluster repository:
61+
1. Clone a fresh tree—stale checkouts can break the build scripts:
6762

6863
```shell
6964
git clone https://github.com/percona/percona-xtradb-cluster.git
7065
```
7166

72-
2. Check out the `{{vers}}` branch and initialize submodules:
67+
2. Check out the `{{vers}}` branch and pull submodules:
7368

7469
```shell
7570
cd percona-xtradb-cluster
@@ -78,34 +73,55 @@ To compile Percona XtraDB Cluster from source code:
7873
```
7974

8075

81-
3. Download **both** Percona XtraBackup {{vers}} and Percona XtraBackup 8.0 tarballs (*.tar.gz) for your operating system from [Percona Software Downloads :octicons-link-external-16:](https://www.percona.com/downloads/).
76+
3. Fetch Percona XtraBackup {{vers}} and Percona XtraBackup 8.4 `*.tar.gz` files for your OS from [Percona Software Downloads :octicons-link-external-16:](https://www.percona.com/downloads/).
8277

83-
Both XtraBackup versions are required:
78+
Git omits XtraBackup binaries; `build-binary.sh` copies them from `pxc-build/pxc_extra`. It expects two distinct install trees under fixed names—`pxb-{{vers_major}}` for backup and restore tooling, `pxb-8.4` for State Snapshot Transfer (SST):
8479

85-
* Percona XtraBackup {{vers}} is used for backup and restore operations
86-
* Percona XtraBackup 8.0 is required for State Snapshot Transfer (SST)
80+
* Percona XtraBackup {{vers}} backs up and restores data through the integrated tooling.
8781

88-
Extract the tarballs into the `pxc-build/pxc_extra` directory and ensure the directories are named exactly as shown below:
82+
* Percona XtraBackup 8.4 drives SST.
83+
84+
You need two separate directory trees, not always two different releases. When one build satisfies both roles (same version, glibc, and architecture), unpack once, then duplicate the folder so both `pxb-*` paths exist, or run the extract steps twice against the same archive.
85+
86+
The shell snippets assume `Linux-x86_64`. On ARM64, substitute filenames that match your CPU (`aarch64`, `arm64`, and so on); do not reuse paths that do not match your downloads.
87+
88+
Unpack into `pxc-build/pxc_extra` and rename directories to match the `mv` targets in the example block. Swap `glibc2.xx` for the segment from each tarball name. Swap `8.4.x` for the version string on the XtraBackup 8.4 file (for example `8.4.0-3`). Point `tar` and `mv` at the real top-level directory each archive creates.
8989

9090
```shell
9191
mkdir -p ./pxc-build/pxc_extra
9292
9393
tar -xvf percona-xtrabackup-{{vers}}-Linux-x86_64.glibc2.xx.tar.gz -C ./pxc-build
9494
mv ./pxc-build/percona-xtrabackup-{{vers}}-Linux-x86_64.glibc2.xx ./pxc-build/pxc_extra/pxb-{{vers_major}}
9595
96-
tar -xvf percona-xtrabackup-8.0.x-Linux-x86_64.glibc2.xx.tar.gz -C ./pxc-build
97-
mv ./pxc-build/percona-xtrabackup-8.0.x-Linux-x86_64.glibc2.xx ./pxc-build/pxc_extra/pxb-8.0
96+
tar -xvf percona-xtrabackup-8.4.x-Linux-x86_64.glibc2.xx.tar.gz -C ./pxc-build
97+
mv ./pxc-build/percona-xtrabackup-8.4.x-Linux-x86_64.glibc2.xx ./pxc-build/pxc_extra/pxb-8.4
9898
```
9999

100-
4. Run the build script `./build-ps/build-binary.sh`. By default, it attempts to build into the current directory. Specify the target output directory, such as `./pxc-build`:
100+
4. Invoke `./build-ps/build-binary.sh` with an explicit output directory (it defaults to the current directory):
101101

102102
```shell
103-
mkdir ./pxc-build
103+
mkdir -p ./pxc-build
104104
./build-ps/build-binary.sh ./pxc-build
105105
```
106106

107-
When the compilation completes, `pxc-build` contains a tarball, such as `Percona-XtraBackup-{{vers}}.tar.gz`, that you can deploy on your system.
107+
On success, `pxc-build` holds a new archive named like `Percona-XtraDB-Cluster_<version-number>-Linux.x86_64.glibc2.xx.tar.gz` (full and minimal builds may both appear). Read `<version-number>` and `glibc2.xx` from the filename the script emits.
108108

109109
!!! note
110110

111-
The exact version and release numbers may differ.
111+
Published version strings, glibc tags, and archive names vary by release.
112+
113+
## Install and next steps
114+
115+
Your artifact matches a [binary tarball](tarball.md#install-from-binary-tarball): one base directory bundles binaries, libraries, and support files, as summarized in the version and archive table on that page.
116+
117+
1. Unpack it on every node at the path you will treat as `basedir`.
118+
119+
2. Layer in runtime OS packages from the Debian, Ubuntu, or Red Hat lists in [Install from Binary Tarball](tarball.md).
120+
121+
3. Create `datadir` and a MySQL option file, point `basedir` and `datadir` at your paths, and layer [Galera and cluster settings](configure-nodes.md#configure-nodes-for-write-set-replication) into the file.
122+
123+
4. Initialize the data directory before the first boot (for example `./bin/mysqld --initialize` from the unpacked tree, using the account and permissions your policy requires).
124+
125+
5. Start the cluster: [bootstrap the first node](bootstrap.md#bootstrap-the-first-node), then [join the rest](add-node.md#add-nodes-to-cluster).
126+
127+
Most tutorials assume RPM/DEB paths under `/usr` and `systemctl`. Tarball and hand-built trees live elsewhere, yet the same `wsrep` flow applies. For the full picture, read [Get started with Percona XtraDB Cluster](get-started-cluster.md#get-started-with-percona-xtradb-cluster) and [Install Percona XtraDB Cluster](install-index.md#install-percona-xtradb-cluster).

0 commit comments

Comments
 (0)