build: reduce COOKBOOK_MAKE_JOBS from 32 to 16 to avoid OOM during Qt6 builds

This commit is contained in:
2026-06-20 15:19:55 +03:00
parent 6c37c961f7
commit 8eef4025ce
10 changed files with 89 additions and 20 deletions
+1 -1
View File
@@ -1,3 +1,3 @@
PODMAN_BUILD?=0
REDBEAR_ALLOW_PROTECTED_FETCH=1
COOKBOOK_MAKE_JOBS=32
COOKBOOK_MAKE_JOBS=16
@@ -76,6 +76,7 @@ find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
find_package(Qt6GuiPrivate ${REQUIRED_QT_VERSION} REQUIRED)
set(EXCLUDE_DEPRECATED_BEFORE_AND_AT 0 CACHE STRING "Control the range of deprecated API excluded from the build [default=0].")
@@ -1271,6 +1271,13 @@ qt_internal_extend_target(Core CONDITION REDOX
io/qstorageinfo_unix.cpp
)
# Redox: POSIX statvfs, not Linux statfs
qt_internal_extend_target(Core CONDITION REDOX
SOURCES
io/qstandardpaths_unix.cpp
io/qstorageinfo_unix.cpp
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_cpp_winrt
SOURCES
platform/windows/qfactorycacheregistration_p.h
@@ -1369,6 +1376,13 @@ qt_internal_extend_target(Core CONDITION REDOX
io/qstorageinfo_unix.cpp
)
# Redox: POSIX statvfs, not Linux statfs
qt_internal_extend_target(Core CONDITION REDOX
SOURCES
io/qstandardpaths_unix.cpp
io/qstorageinfo_unix.cpp
)
qt_internal_extend_target(Core CONDITION QT_FEATURE_itemmodel
SOURCES
itemmodels/qabstractitemmodel.cpp itemmodels/qabstractitemmodel.h itemmodels/qabstractitemmodel_p.h
@@ -187,6 +187,7 @@ static_assert(std::is_signed_v<qint128>,
#include <assert.h>
#include <assert.h>
#include <assert.h>
#include <assert.h>
#ifndef static_assert
#define static_assert _Static_assert
#endif
@@ -1131,6 +1131,7 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l
#ifdef IPV6_HOPLIMIT
#ifdef IPV6_HOPLIMIT
#ifdef IPV6_HOPLIMIT
#ifdef IPV6_HOPLIMIT
#ifdef IPV6_HOPLIMIT
if (header.hopLimit != -1) {
msg.msg_controllen += CMSG_SPACE(sizeof(int));
@@ -1149,6 +1150,7 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l
#endif
#endif
#endif
#endif
#endif
if (header.ifindex != 0 || !header.senderAddress.isNull()) {
struct in6_pktinfo *data = reinterpret_cast<in6_pktinfo *>(CMSG_DATA(cmsgptr));
@@ -31,6 +31,7 @@
#include <sys/ioctl.h>
#include <sys/ioctl.h>
#include <sys/ioctl.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#if defined(Q_OS_VXWORKS)
@@ -61,6 +61,7 @@ public:
#if QT_CONFIG(opengl)
#if QT_CONFIG(opengl)
#if QT_CONFIG(opengl)
#if QT_CONFIG(opengl)
#if QT_CONFIG(opengl)
virtual QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const = 0;
#endif /* QT_CONFIG(opengl) */
@@ -72,6 +73,7 @@ public:
#endif /* QT_CONFIG(opengl) */
#endif /* QT_CONFIG(opengl) */
#endif /* QT_CONFIG(opengl) */
#endif /* QT_CONFIG(opengl) */
#endif /* QT_CONFIG(opengl) */
virtual bool canCreatePlatformOffscreenSurface() const { return false; }
#if QT_CONFIG(opengl)
@@ -94,6 +96,7 @@ public:
#if QT_CONFIG(opengl)
#if QT_CONFIG(opengl)
#if QT_CONFIG(opengl)
#if QT_CONFIG(opengl)
#if QT_CONFIG(opengl)
virtual void *nativeResourceForContext(NativeResource /*resource*/, QPlatformOpenGLContext */*context*/) { return nullptr; }
#endif /* QT_CONFIG(opengl) */
@@ -106,6 +109,7 @@ public:
#endif /* QT_CONFIG(opengl) */
#endif /* QT_CONFIG(opengl) */
#endif /* QT_CONFIG(opengl) */
#endif /* QT_CONFIG(opengl) */
};
}
@@ -106,6 +106,10 @@ pub struct App {
pub msr_available: bool,
pub cpufreqd_available: bool,
pub thermald_available: bool,
pub pss_available: bool,
pub load_available: bool,
pub governor_available: bool,
pub hwmon_available: bool,
pub pkg_thermal: PackageThermal,
pub cpuid_info: CpuId,
pub simd: String,
@@ -144,7 +148,17 @@ impl TabId {
}
impl App {
/// Build an App with default platform probes (emits startup
/// diagnostic lines via `eprintln!`). Prefer this constructor
/// from `main()`.
pub fn new() -> Self {
let probes = crate::platform::probe();
Self::new_with_probes(probes)
}
/// Build an App with a pre-computed probe result (used by tests
/// and by callers that want to suppress startup diagnostics).
pub fn new_with_probes(probes: crate::platform::Probes) -> Self {
let cpus = detect_cpus();
let mut table_state = TableState::default();
table_state.select(Some(0));
@@ -188,16 +202,23 @@ impl App {
}
})
.collect();
let pss_source = if cpus.iter().any(|_| {
fs::read_to_string(format!("/scheme/acpi/processor/CPU{}/pss", cpus[0])).is_ok()
}) {
"ACPI _PSS".to_string()
let pss_source = if probes.acpi_pss.is_some() {
"ACPI _PSS / sysfs".to_string()
} else {
"fallback table (no ACPI _PSS)".to_string()
"fallback table (no ACPI _PSS / sysfs)".to_string()
};
let msr_available = read_msr(cpus[0], IA32_THERM_STATUS).is_some();
let cpufreqd_available = fs::metadata("/scheme/cpufreq/state").is_ok();
let msr_available = probes.msr.is_some();
// Backward-compat aliases: these are the legacy "cpufreqd / thermald"
// booleans. With Phase A/B we now read cpufreq state directly
// from /sys on Linux, so the booleans reflect the *governor backend*
// (cpufreq sysfs on Linux, cpufreqd on Redox). thermald stays Redox-only
// for now.
let cpufreqd_available = probes.governor.is_some();
let thermald_available = fs::metadata("/scheme/thermal").is_ok();
let pss_available = probes.acpi_pss.is_some();
let load_available = probes.load.is_some();
let governor_available = probes.governor.is_some();
let hwmon_available = probes.hwmon.is_some();
App {
cpus: rows,
table_state,
@@ -210,6 +231,10 @@ impl App {
msr_available,
cpufreqd_available,
thermald_available,
pss_available,
load_available,
governor_available,
hwmon_available,
pkg_thermal: PackageThermal::default(),
cpuid_info,
simd,
@@ -160,11 +160,6 @@ fn handle_mouse(me: MouseEvent, header: &Rect, table: &Rect, controls: &Rect, ap
fn main() -> io::Result<()> {
let args = parse_args();
// Probe the host kernel once at startup. Emits one diagnostic line
// per data source so the user sees at a glance which paths are live
// (matches cpu-x's MSG_VERBOSE pattern; see platform.rs).
let probes = platform::probe();
let cfg = if let Some(p) = args.config_path.as_ref() {
// When --config is given, load only that file (no system/user merge).
match std::fs::read_to_string(p) {
@@ -143,13 +143,6 @@ pub fn render_header<'a>(app: &'a App, focused: bool) -> Paragraph<'a> {
"PkgFlags: ".set_style(theme::LABEL),
pkg_flags.clone().set_style(theme::STATUS_WARN),
" ".into(),
"MSR: ".set_style(theme::LABEL),
if app.msr_available {
"available".set_style(theme::VALUE_OK)
} else {
"not available (QEMU?)".set_style(theme::VALUE_OFF)
},
" ".into(),
"P-state source: ".set_style(theme::LABEL),
app.pss_source.as_str().into(),
]),
@@ -160,6 +153,39 @@ pub fn render_header<'a>(app: &'a App, focused: bool) -> Paragraph<'a> {
"Cache: ".set_style(theme::LABEL),
app.cache_summary.as_str().set_style(theme::VALUE),
]),
Line::from(vec![
"Sources: ".set_style(theme::LABEL),
"MSR=".set_style(theme::VALUE_OFF),
if app.msr_available {
"ok".set_style(theme::VALUE_OK)
} else {
"no".set_style(theme::STATUS_ERR)
},
" PSS=".set_style(theme::VALUE_OFF),
if app.pss_available {
"ok".set_style(theme::VALUE_OK)
} else {
"no".set_style(theme::STATUS_ERR)
},
" load=".set_style(theme::VALUE_OFF),
if app.load_available {
"ok".set_style(theme::VALUE_OK)
} else {
"no".set_style(theme::STATUS_ERR)
},
" gov=".set_style(theme::VALUE_OFF),
if app.governor_available {
"ok".set_style(theme::VALUE_OK)
} else {
"no".set_style(theme::STATUS_ERR)
},
" hwmon=".set_style(theme::VALUE_OFF),
if app.hwmon_available {
"ok".set_style(theme::VALUE_OK)
} else {
"no".set_style(theme::STATUS_ERR)
},
]),
Line::from(vec![
"Hybrid: ".set_style(theme::LABEL),
if app.hybrid_summary.is_empty() {