Release 8.4.9 9 1#5967
Open
EvgeniyPatlan wants to merge 9 commits into
Open
Conversation
… DEB
Align 8.4.8 packaging with the PGO+LTO pattern introduced on
release-9.6.0-2.
build-ps/build-binary.sh:
- Three-pass tarball build: FPROFILE_GENERATE -> run-profile-suite ->
FPROFILE_USE.
- Bake -DWITH_LTO=ON into a shared CMAKE_COMMON_FLAGS array so tarball
builds are LTO-optimized unconditionally.
- Add TARBALL_WARN_SUPPRESS for GCC false positives that fire under
LTO on Bison-generated parsers (matches Oracle's INFO_BIN
suppressions; standalone tarballs don't get them via
redhat-hardened-cc1 / dpkg-buildflags).
- WITH_PGO=1 by default; forced off for --debug builds.
build-ps/percona-server-8.0_builder.sh:
- New --enable_pgo option (ENABLE_PGO=1 default).
- build_rpm: propagate via --define "with_pgo 1".
- build_deb: propagate via export DEB_PGO=1.
- build_tarball: propagate via export WITH_PGO.
- Replace hardwired gcc-toolset-12 source on EL8 with a 14->13->12->11
fallback loop, extended to EL9, in both build_rpm and build_tarball.
build-ps/percona-server.spec:
- %{?with_pgo: %global pgo 1} parsing.
- %{?pgo:-DFPROFILE_GENERATE=1} on the release cmake invocation.
- %if 0%{?pgo} ... %endif rebuild block after the release make:
run-profile-suite, scrub release/, reconfigure with FPROFILE_USE=1,
rebuild.
build-ps/debian/rules:
- ifdef DEB_PGO -> PGO_GENERATE / PGO_USE.
- $(PGO_GENERATE) on the release cmake invocation.
- ifdef DEB_PGO rebuild block after the release make.
Flip PGO opt-in to opt-out so direct rpmbuild / dpkg-buildpackage
invocations also benefit from PGO, not just runs through the
percona-server-8.0_builder.sh orchestrator.
build-ps/percona-server.spec:
- %{?with_pgo: %global pgo 1} -> %{!?without_pgo: %global pgo 1}
- PGO rebuild block is now active by default; suppress with
--define 'without_pgo 1'.
build-ps/debian/rules:
- ifdef DEB_PGO -> ifndef DEB_NO_PGO for the PGO_GENERATE/PGO_USE
macros and for the rebuild block.
- Suppress with: DEB_NO_PGO=1 dpkg-buildpackage ...
build-ps/percona-server-8.0_builder.sh:
- ENABLE_PGO=1 default unchanged.
- build_rpm: pass --define "without_pgo 1" only when ENABLE_PGO=0
(instead of --define "with_pgo 1" when ENABLE_PGO=1).
- build_deb: export DEB_NO_PGO=1 only when ENABLE_PGO=0
(instead of DEB_PGO=1 when ENABLE_PGO=1).
- build_tarball already propagates WITH_PGO=$ENABLE_PGO and
build-binary.sh defaults WITH_PGO=1, so no change there.
…ains
The existing %if 0%{?rhel} > 8 ... -DWITH_LTO=ON %endif blocks in the
spec only *added* the flag on EL9+; they didn't *forbid* it on EL8.
That is dangerous in the PGO rebuild block: cmake/fprofile.cmake
auto-promotes WITH_LTO_DEFAULT=ON whenever FPROFILE_USE=1, so an
omitted -DWITH_LTO would let LTO fire on EL8 during the PGO rebuild
and break the build.
Add explicit %else -DWITH_LTO=OFF branches to all three LTO blocks in
the spec (debug build, release first pass, PGO rebuild pass). Same
for the tarball: detect the host distro in build-binary.sh and emit
-DWITH_LTO=OFF on EL8 and below, Amazon Linux < 2023, Ubuntu focal,
and Debian bullseye, mirroring the per-distro LTO_FLAG already in
debian/rules. LTO=ON elsewhere (EL9+, Amazon 2023+, jammy/noble,
bookworm/trixie, etc.).
build-ps/debian/rules already used $(LTO_FLAG) in both PGO passes, so
no change needed there.
run-profile-suite invocation lists thread_pool, but the suite directory mysql-test/suite/thread_pool/ does not exist in this tree -- thread_pool is a commercial-only plugin and its test suite is not part of the GPL/community Percona Server build. mtr aborts with: mysql-test-run: *** ERROR: Could not find 'thread_pool' or 'mtr' in scanned directories which fails the PGO instrumentation run and breaks the build. Trim the suite to the entries that actually exist on disk in this tree (matches the pruned list already in use on release-9.6.0-2).
Match the run-profile-suite target on release-9.6.0-2: set --max-test-fail=0 so a few flaky tests in the train suite don't abort PGO data collection mid-run, leaving the .gcda set incomplete. The training pass intentionally runs with --accept-test-fail; capping the failure tolerance defeats the point.
The 8.4.9-9-1 deb build fails at override_dh_auto_configure:
CMake Error at .../CMakeDetermineCCompiler.cmake:48 (message):
Could not find compiler set in environment variable CC: gcc-4.8.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
make[1]: *** [debian/rules:69: override_dh_auto_configure] Error 1
Root cause is a pre-existing block in build_deb() (present in the
release-8.4.9-9 base, NOT introduced by the cherry-picked PGO/LTO
packaging commits):
if [ ${DEBIAN_VERSION} != trusty -a ... != trixie ]; then
gcc47=$(which gcc-4.7 ...)
if [ -x "${gcc47}" ]; then export CC=gcc-4.7 ...
else export CC=gcc-4.8 ...
fi
It forces an ancient gcc for any DEBIAN_VERSION not in a hardcoded
allowlist. The ps8.0-autobuild agent runs a codename not in that
list, so it falls through to `export CC=gcc-4.8`, which:
* is not installed on modern build agents, and
* could not build MySQL 8.4 anyway (8.4 requires a C++20 toolchain,
gcc >= 10).
This is a MySQL 5.6/5.7-era relic. Key observations:
* Every distro IN the allowlist already builds successfully with
the system default compiler (the block is skipped for them),
proving the system-default path is correct.
* The USE_THIS_GCC_VERSION variable the block exported is never
consumed anywhere in build-ps/.
* The allowlist has been band-aided repeatedly (most recently
`2a3bef88ee6 PKG-1141 Add support for Debian 13` just added
trixie); the approach is structurally broken — every new distro
re-breaks it.
Remove the block entirely and let dpkg-buildpackage / cmake use the
agent's default toolchain, exactly as the allowlisted distros
already do.
NOTE: the identical block also exists in
percona-server-9.0_builder.sh (release-9.7.0-1-1 line). It will hit
the same failure whenever that line's deb build runs on a
non-allowlisted agent and should get the same fix in a separate
commit on that branch.
Bump extra/libkmip gitlink 44607d8 -> 27c5898 to pick up Percona-Lab/libkmip PR #30 ("PS-10970 fix oracle8 compilation"). 27c5898 sits directly on top of the previously-pinned 44607d8 (44607d8 is its parent), so this brings exactly one commit and nothing else: kmipclient/CMakeLists.txt | 3 ++- kmipclient/src/NetClientOpenSSL.cpp | 35 ++++++++++++++++-- kmipcore/include/kmipcore/kmipcore_version.hpp | 2 +- The libkmip change adds OpenSSL-version-guarded helpers so the KMIP TLS client compiles on Oracle Linux 8 (OpenSSL 1.1.1, which lacks TLS_method()/SSL_get0_peer_certificate() — these are 1.1.0 / 3.0 APIs respectively) and links Threads::Threads. Compile-time guards only; no behavior change on newer OpenSSL. INTERIM PIN: 27c5898 is the head of the still-OPEN PR branch PS-10970-fix-oracle8-compilation, not a commit on libkmip master. Once PR #30 merges, re-bump this gitlink to the resulting master commit (merge/squash SHA will differ). The PR branch is a real branch on Percona-Lab/libkmip so `git submodule update` can fetch the SHA in CI.
The 8.4.9-9-1 deb build (aarch64 agent) fails at
override_dh_auto_configure:
Package 'libtirpc' not found
CMake Error at cmake/rpc.cmake:108 (MESSAGE):
Could not find rpc/rpc.h in /usr/include or /usr/include/tirpc
install_deps only installed libtirpc-dev inside a noble/trixie
guard:
if [ x"${DIST}" = xnoble -o x"${DIST}" = xtrixie ]; then
apt-get -y install libtirpc-dev gsasl-common
fi
That guard is wrong. glibc >= 2.26 removed the built-in Sun RPC
implementation, so EVERY modern Debian/Ubuntu (focal, jammy,
bookworm, noble, trixie, ...) needs libtirpc for rpc/rpc.h.
cmake/rpc.cmake hard-FATAL_ERRORs when system rpc/rpc.h is absent
— it has no bundled-tirpc fallback even though extra/tirpc/
libtirpc-1.3.5 ships in the source tree. So any non-noble/trixie
agent (here an aarch64 one) failed configure.
Hoist `apt-get -y install libtirpc-dev` out of the guard into the
unconditional deb dependency list. The noble/trixie block is left
intact (it also installs gsasl-common); the duplicate libtirpc-dev
install there is a harmless idempotent apt no-op.
This only fixes the builder's install_deps. libtirpc-dev is also
absent from debian/control Build-Depends; adding it there too would
be the more correct long-term fix so `dpkg-buildpackage` /
`apt build-dep` enforces it independently of this script. Left for
a follow-up since the immediate blocker is install_deps coverage.
… files
The 8.4.9-9-1 EL8 RPM build failed with two rpmbuild check errors:
1. Duplicate build-ids
~40 libabsl_*.so + libprotobuf-lite.so installed identically under
both /usr/lib64/mysql/private/ and /usr/lib64/mysqlrouter/private/
share one build-id; rpm's default build-id link mode rejects the
collision. percona-server-8.0_builder.sh only patches
find-debuginfo.sh (apply_workaround_bug_304121) inside the
`[ "x${RHEL}" = "x7" ]` guard, so EL8+ gets no mitigation.
Add `%define _build_id_links none` (the release-9.6.0 baseline
value, proven on the PXC line): suppresses per-file build-id
symlink generation so the duplicates coexist, while still
shipping the debuginfo payloads.
2. Installed (but unpackaged) file(s)
a) /usr/lib/libkmipclient.a, /usr/lib/libkmipcore.a
libkmip PR #30 (PS-10970), picked up via the extra/libkmip
submodule bump, restructured the library into kmipclient +
kmipcore. The %install cleanup only rm'd the old
libkmip.a / libkmippp.a. Add the two new static-lib names
next to the existing removals (build-only artifacts).
b) component_test_server_telemetry_logs_{client,export}.so
(+ debug/ variants)
Newer source ships these test components; the 8.4 .spec
%files lists every other component_test_* but not these.
The battle-tested 9.7 percona-server.spec.in already lists
all four (lines 1123-1124, 1178-1179). Port the same four
lines into the 8.4 %files (2 regular + 2 debug), right after
component_test_server_telemetry_traces.so.
Fix 2a is a direct consequence of the libkmip submodule bump
(commit 9ae68f0); without it the bump would break the EL8 RPM.
adivinho
requested changes
May 25, 2026
Contributor
There was a problem hiding this comment.
Could you remove the kmip changes
Comment on lines
+833
to
+837
| # libkmip PR #30 (PS-10970, picked up via the extra/libkmip submodule | ||
| # bump) restructured the library into kmipclient + kmipcore, which | ||
| # install libkmipclient.a / libkmipcore.a instead of the old | ||
| # libkmip.a / libkmippp.a. These static libs are build-only; drop them | ||
| # so they don't trip the unpackaged-files check. |
Contributor
There was a problem hiding this comment.
Could the comment be dropped?
Comment on lines
+974
to
+987
| # NOTE: a legacy block here used to force CC=gcc-4.7 / gcc-4.8 for any | ||
| # DEBIAN_VERSION not present in a hardcoded allowlist (trusty, xenial, | ||
| # ..., trixie). It was a MySQL 5.6/5.7-era relic and is actively | ||
| # harmful for the 8.4/9.x line: | ||
| # * MySQL 8.4 requires a C++20 toolchain (gcc >= 10); gcc-4.x cannot | ||
| # build it even if present. | ||
| # * Modern build agents don't ship gcc-4.7/4.8, so cmake aborts with | ||
| # Could not find compiler set in environment variable CC: gcc-4.8. | ||
| # * Every distro IN the allowlist already builds with the system | ||
| # default compiler (the block was skipped for them), so they prove | ||
| # the system-default path is correct. | ||
| # * USE_THIS_GCC_VERSION it exported was never consumed anywhere. | ||
| # The block has been removed; let dpkg-buildpackage / cmake use the | ||
| # agent's default toolchain like the allowlisted distros already do. |
Contributor
There was a problem hiding this comment.
Could the comment be dropped?
| # fallback despite extra/tirpc/ existing in the tree). Previously this | ||
| # was only installed for noble/trixie, so every other distro/arch agent | ||
| # (e.g. aarch64) failed override_dh_auto_configure with | ||
| # "Could not find rpc/rpc.h". Install it unconditionally. |
Contributor
There was a problem hiding this comment.
Could the comment be dropped?
Comment on lines
+310
to
+316
| # Suppress GCC false positives that fire during LTO link on Bison-generated | ||
| # parsers (sql_hints.yy.cc, pars0grm.cc, etc.) and on bundled libs. | ||
| # Distro-built RPMs/DEBs get these via redhat-hardened-cc1 / dpkg-buildflags; | ||
| # the standalone tarball build doesn't, so add them explicitly. Matches the | ||
| # suppressions Oracle uses in their official MySQL RPM/DEB INFO_BIN. | ||
| # Parameterized warnings (-Walloc-size-larger-than=N etc.) require -Wno- form, | ||
| # not -Wno-error= form, in GCC 14+. |
Contributor
There was a problem hiding this comment.
Could the comment be dropped?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.