@@ -14,8 +14,7 @@ You can now fetch the latest Percona Server for MySQL {{vers}} sources.
1414git clone https://github.com/percona/percona-server.git
1515cd percona-server
1616git checkout {{vers}}
17- git submodule init
18- git submodule update
17+ git submodule update --init
1918```
2019
2120If you are going to be making changes to Percona Server for MySQL {{vers}} and wanting
@@ -34,26 +33,51 @@ configure and build Percona Server for MySQL.
3433First, run CMake to configure the build. Here you can specify all the normal
3534build options as you do for a normal MySQL build. Depending on what
3635options you wish to compile Percona Server for MySQL with, you may need other
37- libraries installed on your system. Here is an example using a
38- configure line similar to the options that Percona uses to produce
39- binaries:
36+ libraries installed on your system.
37+
38+ Note: ` -DFEATURE_SET=community ` is not supported in {{vers}}. If you use
39+ ` -DFEATURE_SET=community ` , CMake will report: * Manually-specified variables were not used by the project:
40+ FEATURE_SET* .
41+
42+ Recommended — out-of-source build:
43+
44+ ``` shell
45+ mkdir build
46+ cd build
47+ cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release
48+ ```
49+
50+ On newer platforms or distros, if you hit compilation errors that are
51+ Linux-distro dependent, add ` -DWITH_PACKAGE_FLAGS=OFF ` :
4052
4153``` shell
42- cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFEATURE_SET=community
54+ cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DWITH_PACKAGE_FLAGS=OFF
55+ ```
56+
57+ Alternative — in-source build (quick one-time build only):
58+
59+ For a one-off build you can use in-source configuration with
60+ ` -DFORCE_INSOURCE_BUILD=1 ` instead of ` FEATURE_SET ` . The in-source build is a workaround;
61+ prefer the out-of-source build above.
62+
63+ ``` shell
64+ cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_CONFIG=mysql_release -DFORCE_INSOURCE_BUILD=1
4365```
4466
4567## Compile from source
4668
47- Now, compile using make:
69+ Compile using make with parallel jobs (run from the build directory if you used the out-of-source build) :
4870
4971``` shell
50- make
72+ make -j $( nproc )
5173```
5274
5375Install:
5476
5577``` shell
56- make install
78+ make -j $( nproc ) install
5779```
5880
81+ ` make ` by default uses a single thread; using ` -j$(nproc) ` speeds up the build significantly.
82+
5983Percona Server for MySQL {{vers}} is installed on your system.
0 commit comments