Skip to content

Commit 1f86040

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 4f1bd3a commit 1f86040

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
@@ -29,7 +36,9 @@ install_build_dependencies() {
2936
tar -xf boost_*.tar.bz2
3037
cd boost_*/
3138
./bootstrap.sh --with-libraries=program_options,system
32-
./b2 -j "$(nproc)" link=static
39+
./b2 -j "$(nproc)" cxxstd=17 cxxflags="-fPIC" cflags="-fPIC"
40+
mkdir -p "${BOSH_INSTALL_TARGET}/lib/private"
41+
cp --preserve=all ./stage/lib/libboost_program_options.so.* "${BOSH_INSTALL_TARGET}/lib/private/"
3342
cd -
3443

3544
tar -xf check_*.tar.gz
@@ -81,7 +90,9 @@ build() {
8190
cmake .. \
8291
-DBUILD_CONFIG=mysql_release \
8392
-DBOOST_ROOT="${boost_dir}" \
93+
-DBoost_DIR="$(readlink -f "${boost_dir}"/stage/lib/cmake/Boost-*/)" \
8494
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
95+
-DCMAKE_C_FLAGS="-std=gnu17" \
8596
-DMINIMAL_RELWITHDEBINFO=OFF \
8697
-DCMAKE_CXX_COMPILER=g++ \
8798
-DCMAKE_C_COMPILER=gcc \
@@ -101,7 +112,7 @@ build() {
101112
-DWITH_AUTHENTICATION_KERBEROS=OFF \
102113
-DWITH_PERCONA_AUTHENTICATION_LDAP=OFF \
103114
-DWITH_BOOST="${boost_dir}" \
104-
-DWITH_ICU=system \
115+
-DWITH_ICU=bundled \
105116
-DWITH_READLINE=system \
106117
-DWITH_ROUTER=OFF \
107118
-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
@@ -29,7 +36,9 @@ install_build_dependencies() {
2936
tar -xf boost_*.tar.bz2
3037
cd boost_*/
3138
./bootstrap.sh --with-libraries=program_options,system
32-
./b2 -j "$(nproc)" link=static
39+
./b2 -j "$(nproc)" cxxstd=17 cxxflags="-fPIC" cflags="-fPIC"
40+
mkdir -p "${BOSH_INSTALL_TARGET}/lib/private"
41+
cp --preserve=all ./stage/lib/libboost_program_options.so.* "${BOSH_INSTALL_TARGET}/lib/private/"
3342
cd -
3443

3544
tar -xf check_*.tar.gz
@@ -81,7 +90,9 @@ build() {
8190
cmake .. \
8291
-DBUILD_CONFIG=mysql_release \
8392
-DBOOST_ROOT="${boost_dir}" \
93+
-DBoost_DIR="$(readlink -f "${boost_dir}"/stage/lib/cmake/Boost-*/)" \
8494
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
95+
-DCMAKE_C_FLAGS="-std=gnu17" \
8596
-DMINIMAL_RELWITHDEBINFO=OFF \
8697
-DCMAKE_CXX_COMPILER=g++ \
8798
-DCMAKE_C_COMPILER=gcc \
@@ -100,7 +111,8 @@ build() {
100111
-DWITH_AUTHENTICATION_FIDO=OFF \
101112
-DWITH_AUTHENTICATION_KERBEROS=OFF \
102113
-DWITH_PERCONA_AUTHENTICATION_LDAP=OFF \
103-
-DWITH_ICU=system \
114+
-DWITH_BOOST="${boost_dir}" \
115+
-DWITH_ICU=bundled \
104116
-DWITH_READLINE=system \
105117
-DWITH_ROUTER=OFF \
106118
-DWITH_GROUP_REPLICATION=OFF \

0 commit comments

Comments
 (0)