summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@gentoo.org>2024-08-01 01:05:39 -0400
committerEli Schwartz <eschwartz@gentoo.org>2024-08-01 02:50:25 -0400
commit943614ccefce87dd83cbaf99849726eb481311ab (patch)
treea52b688d240f5fb02b480b2e2bbc12bac3ed7077 /dev-db/mysql-connector-c++
parentmedia-libs/libavif: bump subslot SONAME in 1.1.1 (diff)
downloadgentoo-943614ccefce87dd83cbaf99849726eb481311ab.tar.gz
gentoo-943614ccefce87dd83cbaf99849726eb481311ab.tar.bz2
gentoo-943614ccefce87dd83cbaf99849726eb481311ab.zip
dev-db/mysql-connector-c++: fix tragic overcommit of make jobs
Internally, this builds additional dependencies inside of cmake by having build rules that run another cmake. Inside src_compile, make forks out to make -j$(nproc) at least once, and perhaps even more times (this logic is part of their generic handling of included dependencies but we may only be building protobuf that way anyway). We end up with a minimum of two times the number of reasonably safe jobs to run, your system resources get clobbered, and everything freezes until the OOM killer gets involved. Golly gee, I *wish* it were merely ignoring MAKEFLAGS. Then we would eventually succeed, except slower... Closes: https://bugs.gentoo.org/921309 Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Diffstat (limited to 'dev-db/mysql-connector-c++')
-rw-r--r--dev-db/mysql-connector-c++/mysql-connector-c++-8.0.33-r1.ebuild12
1 files changed, 11 insertions, 1 deletions
diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.33-r1.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.33-r1.ebuild
index caa3194fb0eb..4e04ab88c292 100644
--- a/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.33-r1.ebuild
+++ b/dev-db/mysql-connector-c++/mysql-connector-c++-8.0.33-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -34,6 +34,16 @@ PATCHES=(
"${FILESDIR}"/${P}-jdbc.patch
)
+src_prepare() {
+ cmake_src_prepare
+ # ignores MAKEOPTS and runs recursive make -j$(nproc). Clobbers jobs badly
+ # enough that your system immediately freezes.
+ #
+ # https://bugs.gentoo.org/921309
+ # https://bugs.mysql.com/bug.php?id=115734
+ sed -i 's/prc_cnt AND NOT/FALSE AND NOT/' cdk/cmake/dependency.cmake
+}
+
src_configure() {
local mycmakeargs=(
-DBUNDLE_DEPENDENCIES=OFF