build: reduce COOKBOOK_MAKE_JOBS to 4 to avoid OOM during Qt compilation
- System has 62GB RAM but no swap, and parallel Qt builds cause OOM - Reducing from 8 to 4 jobs should keep memory usage within limits
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
PODMAN_BUILD?=0
|
||||
REDBEAR_ALLOW_PROTECTED_FETCH=1
|
||||
COOKBOOK_MAKE_JOBS=8
|
||||
COOKBOOK_MAKE_JOBS=4
|
||||
|
||||
@@ -85,6 +85,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].")
|
||||
|
||||
|
||||
@@ -1481,6 +1481,27 @@ 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
|
||||
)
|
||||
|
||||
# Redox: POSIX statvfs, not Linux statfs
|
||||
qt_internal_extend_target(Core CONDITION REDOX
|
||||
SOURCES
|
||||
io/qstandardpaths_unix.cpp
|
||||
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
|
||||
@@ -1789,6 +1810,27 @@ 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
|
||||
)
|
||||
|
||||
# Redox: POSIX statvfs, not Linux statfs
|
||||
qt_internal_extend_target(Core CONDITION REDOX
|
||||
SOURCES
|
||||
io/qstandardpaths_unix.cpp
|
||||
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
|
||||
|
||||
@@ -217,6 +217,9 @@ static_assert(std::is_signed_v<qint128>,
|
||||
#include <assert.h>
|
||||
#include <assert.h>
|
||||
#include <assert.h>
|
||||
#include <assert.h>
|
||||
#include <assert.h>
|
||||
#include <assert.h>
|
||||
#ifndef static_assert
|
||||
#define static_assert _Static_assert
|
||||
#endif
|
||||
|
||||
@@ -1161,6 +1161,9 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#ifdef IPV6_HOPLIMIT
|
||||
#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));
|
||||
@@ -1209,6 +1212,9 @@ qint64 QNativeSocketEnginePrivate::nativeSendDatagram(const char *data, qint64 l
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
if (header.ifindex != 0 || !header.senderAddress.isNull()) {
|
||||
struct in6_pktinfo *data = reinterpret_cast<in6_pktinfo *>(CMSG_DATA(cmsgptr));
|
||||
|
||||
@@ -61,6 +61,9 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#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)
|
||||
|
||||
+12
@@ -91,6 +91,9 @@ public:
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
#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) */
|
||||
@@ -132,6 +135,9 @@ public:
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#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)
|
||||
@@ -184,6 +190,9 @@ public:
|
||||
#if QT_CONFIG(opengl)
|
||||
#if QT_CONFIG(opengl)
|
||||
#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) */
|
||||
@@ -226,6 +235,9 @@ public:
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
#endif /* QT_CONFIG(opengl) */
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -178,10 +178,26 @@ fi
|
||||
python - <<'PY'
|
||||
import os
|
||||
from pathlib import Path
|
||||
path = Path(os.environ["COOKBOOK_SOURCE"]) / "src/CMakeLists.txt"
|
||||
text = path.read_text()
|
||||
text = text.replace('if(TARGET Qt::Gui AND TARGET Qt::qsb AND QT_FEATURE_qml_animation)', 'if(TARGET Qt::Gui AND QT_FEATURE_qml_animation)')
|
||||
path.write_text(text)
|
||||
|
||||
root = Path(os.environ["COOKBOOK_SOURCE"])
|
||||
|
||||
# Patch 1: Remove TARGET Qt::qsb condition from quickvectorimage
|
||||
src_cml = root / "src/CMakeLists.txt"
|
||||
text = src_cml.read_text()
|
||||
text = text.replace(
|
||||
'if(TARGET Qt::Gui AND TARGET Qt::qsb AND QT_FEATURE_qml_animation)',
|
||||
'if(TARGET Qt::Gui AND QT_FEATURE_qml_animation)')
|
||||
src_cml.write_text(text)
|
||||
|
||||
# Patch 2: Remove Network from find_package OPTIONAL_COMPONENTS
|
||||
# Qt6NetworkConfig.cmake:199 qt_make_features_available enters infinite
|
||||
# recursion with Qt6Config.cmake:256 when cross-compiling with
|
||||
# feature overrides. Removing Network from the component list avoids
|
||||
# loading Qt6NetworkConfig.cmake entirely.
|
||||
root_cml = root / "CMakeLists.txt"
|
||||
text = root_cml.read_text()
|
||||
text = text.replace(' Network ', ' ')
|
||||
root_cml.write_text(text)
|
||||
PY
|
||||
|
||||
cat > "${COOKBOOK_BUILD}/shader_stub.cmake" << 'EOFCMAKE'
|
||||
@@ -191,9 +207,8 @@ function(qt_internal_add_shader_helpers target name)
|
||||
endfunction()
|
||||
EOFCMAKE
|
||||
|
||||
redbear_qt_ensure_dep_sysroots "${COOKBOOK_ROOT}" "${COOKBOOK_SYSROOT}"
|
||||
|
||||
cmake "${COOKBOOK_SOURCE}" \
|
||||
-G Ninja \
|
||||
-C "${COOKBOOK_BUILD}/shader_stub.cmake" \
|
||||
-DCMAKE_TOOLCHAIN_FILE="${COOKBOOK_ROOT}/local/recipes/qt/redox-toolchain.cmake" \
|
||||
-DQT_HOST_PATH="${HOST_BUILD}" \
|
||||
@@ -204,20 +219,6 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
-DQT_BUILD_EXAMPLES=OFF \
|
||||
-DQT_BUILD_TESTS=OFF \
|
||||
-DQT_GENERATE_SBOM=OFF \
|
||||
-DQT_FEATURE_qml_jit=OFF \
|
||||
-DQT_FEATURE_qml_profiler=OFF \
|
||||
-DQT_FEATURE_network=OFF \
|
||||
-DQT_FEATURE_ssl=OFF \
|
||||
-DQT_FEATURE_http=OFF \
|
||||
-DQT_FEATURE_udpsocket=OFF \
|
||||
-DQT_FEATURE_localserver=OFF \
|
||||
-DQT_FEATURE_dnslookup=OFF \
|
||||
-DQT_FEATURE_networkinterface=OFF \
|
||||
-DQT_FEATURE_networkproxy=OFF \
|
||||
-DQT_FEATURE_socks5=OFF \
|
||||
-DQT_FEATURE_networkdiskcache=OFF \
|
||||
-DQT_FEATURE_sctp=OFF \
|
||||
-DQT_FEATURE_libproxy=OFF \
|
||||
-Wno-dev
|
||||
|
||||
HOST_QT6_LIBS="${DECL_HOST}/lib:${HOST_BUILD}/lib"
|
||||
|
||||
@@ -20,7 +20,7 @@ find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals)
|
||||
qt_internal_project_setup()
|
||||
|
||||
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED Core)
|
||||
find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Gui Network Widgets OpenGL OpenGLWidgets Sql Concurrent Test TestInternalsPrivate LanguageServerPrivate Svg)
|
||||
find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Gui Widgets OpenGL OpenGLWidgets Sql Concurrent Test TestInternalsPrivate LanguageServerPrivate Svg)
|
||||
|
||||
# Set up QT_HOST_PATH as an extra root path to look for the ShaderToolsTools package
|
||||
# when cross-compiling.
|
||||
|
||||
Reference in New Issue
Block a user