commit: 943614ccefce87dd83cbaf99849726eb481311ab Author: Eli Schwartz <eschwartz <AT> gentoo <DOT> org> AuthorDate: Thu Aug 1 05:05:39 2024 +0000 Commit: Eli Schwartz <eschwartz <AT> gentoo <DOT> org> CommitDate: Thu Aug 1 06:50:25 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=943614cc
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 <AT> gentoo.org> .../mysql-connector-c++/mysql-connector-c++-8.0.33-r1.ebuild | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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
