mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-17 14:49:30 -07:00
sys-cluster/ceph: fix issue under parallel builds
fix build failures caused by legacy-option-headers not being available during parallel builds Signed-off-by: Z. Liu <zhixu.liu@gmail.com> Part-of: https://github.com/gentoo/gentoo/pull/45459 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -243,6 +243,7 @@ PATCHES=(
|
||||
"${FILESDIR}/ceph-19.2.2-ipv6.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-QATAPP-Fix-clang-16-compiling-issue.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-common-add-dependency-on-legacy-option-headers.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rbd-make-enums-statically-castable.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rgw-remove-FMT_STRING-to-fix-clang-20-build-failure.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rgw-update-to-latest-zpp_bits.h.patch"
|
||||
|
||||
@@ -242,6 +242,7 @@ PATCHES=(
|
||||
"${FILESDIR}/ceph-19.2.2-gcc15.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-QATAPP-Fix-clang-16-compiling-issue.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-common-add-dependency-on-legacy-option-headers.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rbd-make-enums-statically-castable.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rgw-remove-FMT_STRING-to-fix-clang-20-build-failure.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rgw-update-to-latest-zpp_bits.h.patch"
|
||||
|
||||
@@ -220,6 +220,7 @@ PATCHES=(
|
||||
"${FILESDIR}/ceph-19.2.1-isa-l.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-QATAPP-Fix-clang-16-compiling-issue.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-common-add-dependency-on-legacy-option-headers.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rbd-make-enums-statically-castable.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rgw-remove-FMT_STRING-to-fix-clang-20-build-failure.patch"
|
||||
# https://bugs.gentoo.org/960812
|
||||
|
||||
@@ -220,6 +220,7 @@ PATCHES=(
|
||||
"${FILESDIR}/ceph-19.2.1-isa-l.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-QATAPP-Fix-clang-16-compiling-issue.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-add-option-to-build-agains-system-opentelemetry.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-common-add-dependency-on-legacy-option-headers.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rbd-make-enums-statically-castable.patch"
|
||||
"${FILESDIR}/ceph-19.2.2-rgw-remove-FMT_STRING-to-fix-clang-20-build-failure.patch"
|
||||
# https://bugs.gentoo.org/960812
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
https://github.com/ceph/ceph/pull/66924
|
||||
|
||||
The patch is adjusted so that it can be applied to all ebuilds in the tree.
|
||||
|
||||
From d5a8eaeb862d1840de8d82f6e958c1f609693ed8 Mon Sep 17 00:00:00 2001
|
||||
From: "Z. Liu" <zhixu.liu@gmail.com>
|
||||
Date: Sat, 17 Jan 2026 20:59:09 +0800
|
||||
Subject: [PATCH] common: add dependency on legacy-option-headers
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
A heap_profiler build failure was initially observed due to parallel
|
||||
build ordering. During parallel builds, src/perfglue/heap_profiler.cc
|
||||
may fail to compile because it depends on legacy-option-headers and the
|
||||
generated header global_legacy_options.h may not be available yet. This
|
||||
results in incomplete definitions in included headers, leading to
|
||||
compilation errors such as missing members in ConfigValues.
|
||||
|
||||
For example, the following error is observed when building with "-j64":
|
||||
|
||||
FAILED: [code=1] src/perfglue/CMakeFiles/heap_profiler.dir/heap_profiler.cc.o
|
||||
/var/tmp/portage/sys-cluster/ceph-20.1.0-r2/work/ceph-20.1.0/src/perfglue/heap_profiler.cc: In function ‘void get_profile_name(char*, int)’:
|
||||
src/perfglue/heap_profiler.cc:102:48: error: ‘class ConfigValues’ has no member named ‘log_file’
|
||||
snprintf(path, sizeof(path), "%s", g_conf()->log_file.c_str());
|
||||
^~~~~~~~
|
||||
|
||||
The dependency chain is as follows:
|
||||
|
||||
src/perfglue/heap_profiler.cc
|
||||
-> src/perfglue/heap_profiler.h
|
||||
-> src/common/config.h
|
||||
-> src/common/config_values.h
|
||||
-> src/common/options/legacy_config_opts.h
|
||||
-> global_legacy_options.h (generated by y2c.py)
|
||||
|
||||
The issue can be reliably reproduced by adding time.sleep(3600) at the
|
||||
beginning of y2c.py.
|
||||
|
||||
Further testing showed that heap_profiler is not the only affected
|
||||
consumer. Additional analysis indicates that common is a shared
|
||||
dependency of all affected components. Therefore, it is appropriate to
|
||||
add legacy-option-headers as a dependency of common to ensure correct
|
||||
build ordering under parallel builds.
|
||||
|
||||
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
|
||||
|
||||
diff --git a/src/common/options/CMakeLists.txt b/src/common/options/CMakeLists.txt
|
||||
index 60cdbc3f224..4879c10d813 100644
|
||||
--- a/src/common/options/CMakeLists.txt
|
||||
+++ b/src/common/options/CMakeLists.txt
|
||||
@@ -112,3 +112,7 @@ target_sources(legacy-option-headers
|
||||
include(AddCephTest)
|
||||
add_ceph_test(validate-options
|
||||
${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/validate-options.py ${options_yamls})
|
||||
+
|
||||
+add_dependencies(common-options-objs
|
||||
+ legacy-option-headers
|
||||
+)
|
||||
Reference in New Issue
Block a user