Skip to content

Commit 7ef0874

Browse files
committed
support compilation on ubuntu-resolute
- Workaround: uutils/coreutils#11469 - Use dynamically linked libboost_program_options Current galera cmake configuration does not like static linking under resolute cmake+gcc toolchains. This avoids needing to custom patch (GPLv2) build configuration. The libboost_program_options.so is now installed under the Percona XtraDB Cluster lib/private directory similar to other MySQL vendored thirdparty libraries. This largely impacts the bin/garbd binary (currently unused by pxc-release) - Adjust Boost configuration to adapt to cmake v4.2 removing builtin FindBoost.cmake module in favor of the boost provided by modern boost v1.70.0+ - Workaround legacy libtirpc conventions by using -std=gnu17 CFLAGS - ubuntu-resolute stemcells no longer provide libicu-dev packages, so use the bundled version instead
1 parent 43c9141 commit 7ef0874

4 files changed

Lines changed: 41 additions & 4 deletions

File tree

packages/percona-xtrabackup-8.0/packaging

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
set -o errexit
44
set -o nounset
55

6+
# Workaround for uutils coreutils 0.7.0 (ubuntu-resolute): its `install -D`
7+
# replaces symlink path components with real directories instead of following
8+
# them. Resolve the real path so libaio's `make install` (which uses
9+
# `install -D`) writes to the correct location on persistent disk.
10+
# See https://github.com/uutils/coreutils/issues/11469
11+
BOSH_INSTALL_TARGET=$(readlink -f "${BOSH_INSTALL_TARGET}")
12+
613
main() {
714
install_build_dependencies
815
unpack_source

packages/percona-xtrabackup-8.4/packaging

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
set -o errexit
44
set -o nounset
55

6+
# Workaround for uutils coreutils 0.7.0 (ubuntu-resolute): its `install -D`
7+
# replaces symlink path components with real directories instead of following
8+
# them. Resolve the real path so libaio's `make install` (which uses
9+
# `install -D`) writes to the correct location on persistent disk.
10+
# See https://github.com/uutils/coreutils/issues/11469
11+
BOSH_INSTALL_TARGET=$(readlink -f "${BOSH_INSTALL_TARGET}")
12+
613
main() {
714
install_build_dependencies
815
unpack_source

packages/percona-xtradb-cluster-8.0/packaging

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ set -o errexit
44
set -o nounset
55
set -o pipefail
66

7+
# Workaround for uutils coreutils 0.7.0 (ubuntu-resolute): its `install -D`
8+
# replaces symlink path components with real directories instead of following
9+
# them. Resolve the real path so libaio's `make install` (which uses
10+
# `install -D`) writes to the correct location on persistent disk.
11+
# See https://github.com/uutils/coreutils/issues/11469
12+
BOSH_INSTALL_TARGET=$(readlink -f "${BOSH_INSTALL_TARGET}")
13+
714
main() {
815
install_build_dependencies
916
install_runtime_dependencies
@@ -26,7 +33,9 @@ install_build_dependencies() {
2633
tar -xf boost_*.tar.bz2
2734
cd boost_*/
2835
./bootstrap.sh --with-libraries=program_options,system
29-
./b2 -j "$(nproc)" link=static
36+
./b2 -j "$(nproc)" cxxstd=17 cxxflags="-fPIC" cflags="-fPIC"
37+
mkdir -p "${BOSH_INSTALL_TARGET}/lib/private"
38+
cp --preserve=all ./stage/lib/libboost_program_options.so.* "${BOSH_INSTALL_TARGET}/lib/private/"
3039
cd -
3140

3241
tar -xf check_*.tar.gz
@@ -78,7 +87,9 @@ build() {
7887
cmake .. \
7988
-DBUILD_CONFIG=mysql_release \
8089
-DBOOST_ROOT="${boost_dir}" \
90+
-DBoost_DIR="$(readlink -f "${boost_dir}"/stage/lib/cmake/Boost-*/)" \
8191
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
92+
-DCMAKE_C_FLAGS="-std=gnu17" \
8293
-DMINIMAL_RELWITHDEBINFO=OFF \
8394
-DCMAKE_CXX_COMPILER=g++ \
8495
-DCMAKE_C_COMPILER=gcc \
@@ -98,7 +109,7 @@ build() {
98109
-DWITH_AUTHENTICATION_KERBEROS=OFF \
99110
-DWITH_PERCONA_AUTHENTICATION_LDAP=OFF \
100111
-DWITH_BOOST="${boost_dir}" \
101-
-DWITH_ICU=system \
112+
-DWITH_ICU=bundled \
102113
-DWITH_READLINE=system \
103114
-DWITH_ROUTER=OFF \
104115
-DWITH_GROUP_REPLICATION=OFF \

packages/percona-xtradb-cluster-8.4/packaging

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ set -o errexit
44
set -o nounset
55
set -o pipefail
66

7+
# Workaround for uutils coreutils 0.7.0 (ubuntu-resolute): its `install -D`
8+
# replaces symlink path components with real directories instead of following
9+
# them. Resolve the real path so libaio's `make install` (which uses
10+
# `install -D`) writes to the correct location on persistent disk.
11+
# See https://github.com/uutils/coreutils/issues/11469
12+
BOSH_INSTALL_TARGET=$(readlink -f "${BOSH_INSTALL_TARGET}")
13+
714
main() {
815
install_build_dependencies
916
install_runtime_dependencies
@@ -26,7 +33,9 @@ install_build_dependencies() {
2633
tar -xf boost_*.tar.bz2
2734
cd boost_*/
2835
./bootstrap.sh --with-libraries=program_options,system
29-
./b2 -j "$(nproc)" link=static
36+
./b2 -j "$(nproc)" cxxstd=17 cxxflags="-fPIC" cflags="-fPIC"
37+
mkdir -p "${BOSH_INSTALL_TARGET}/lib/private"
38+
cp --preserve=all ./stage/lib/libboost_program_options.so.* "${BOSH_INSTALL_TARGET}/lib/private/"
3039
cd -
3140

3241
tar -xf check_*.tar.gz
@@ -78,7 +87,9 @@ build() {
7887
cmake .. \
7988
-DBUILD_CONFIG=mysql_release \
8089
-DBOOST_ROOT="${boost_dir}" \
90+
-DBoost_DIR="$(readlink -f "${boost_dir}"/stage/lib/cmake/Boost-*/)" \
8191
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
92+
-DCMAKE_C_FLAGS="-std=gnu17" \
8293
-DMINIMAL_RELWITHDEBINFO=OFF \
8394
-DCMAKE_CXX_COMPILER=g++ \
8495
-DCMAKE_C_COMPILER=gcc \
@@ -97,7 +108,8 @@ build() {
97108
-DWITH_AUTHENTICATION_FIDO=OFF \
98109
-DWITH_AUTHENTICATION_KERBEROS=OFF \
99110
-DWITH_PERCONA_AUTHENTICATION_LDAP=OFF \
100-
-DWITH_ICU=system \
111+
-DWITH_BOOST="${boost_dir}" \
112+
-DWITH_ICU=bundled \
101113
-DWITH_READLINE=system \
102114
-DWITH_ROUTER=OFF \
103115
-DWITH_GROUP_REPLICATION=OFF \

0 commit comments

Comments
 (0)