Summary: | dev-lang/rust-1.19.0 could check for required RAM if -ggdb in CFLAGS | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Marien Zwart <marien.zwart> |
Component: | Current packages | Assignee: | Gentoo Rust Project <rust> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | creideiki+gentoo-bugzilla, gentoo, ikelos, jstein, navi, randy, rose, rust, ulm, zeekec |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 924185 |
Description
Marien Zwart
2017-07-25 11:27:40 UTC
*** Bug 626288 has been marked as a duplicate of this bug. *** As noted in bug 626288, it should also check for disk space in /var/tmp/portage as well, using something like the following (mercilessly ripped from the Chromium ebuilds) in the EAPI-6 pre_build_checks phase (with the various values changed in accordance with rust's needs): CHECKREQS_MEMORY="3G" CHECKREQS_DISK_BUILD="5G" eshopts_push -s extglob if is-flagq '-g?(gdb)?([1-9])'; then CHECKREQS_DISK_BUILD="25G" if ! use component-build; then CHECKREQS_MEMORY="16G" fi fi eshopts_pop check-reqs_pkg_setup The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c0718dbc84ed51edd184446fc0d9cde7195e25a0 commit c0718dbc84ed51edd184446fc0d9cde7195e25a0 Author: Dirkjan Ochtman <djc@gentoo.org> AuthorDate: 2018-11-19 16:41:47 +0000 Commit: Dirkjan Ochtman <djc@gentoo.org> CommitDate: 2018-11-19 16:42:01 +0000 dev-lang/rust: check reqs, ewarn about cargo symlink Fixes: https://bugs.gentoo.org/626134 Fixes: https://bugs.gentoo.org/626742 Fixes: https://bugs.gentoo.org/663354 Fixes: https://bugs.gentoo.org/671182 Signed-off-by: Dirkjan Ochtman <djc@gentoo.org> Package-Manager: Portage-2.3.51, Repoman-2.3.11 dev-lang/rust/rust-1.30.1-r1.ebuild | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) Reopening, because the test that is currently in the ebuild will be triggered on false positives: if is-flagq '-g?(gdb)?([1-9])'; then CHECKREQS_DISK_BUILD="10G" CHECKREQS_MEMORY="16G" fi For example, I have -ggdb in my CFLAGS, but override it by adding -g0 for certain packages (including rust) via package.env. The above test will be triggered nevertheless. The pre-emerge check is currently triggered for me, even though I have a machine with 16GiB RAM (gddb enabled). Also my laptop with 4GiB RAM and with gddb disabled is running against the pre_build_checks-wall. This is most likely because the internal intel grafics take a few megabytes for their video RAM. I think this is the reason, why most ebuild check against "desired GiB RAM - 1" in CHECKREQS_MEMORY. Thus, I would propose to check against 3GiB for non-gddb builds and 15 GiB for gddb builds. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=baefac48f4aff148b8c92531380fead020abfb98 commit baefac48f4aff148b8c92531380fead020abfb98 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-05-13 13:00:15 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-05-13 13:01:13 +0000 dev-lang/rust: drop memory requirement check CHECKREQS_MEMORY should only be used when there's a known minimum memory requirement to run/build packages with MAKEOPTS=-j1. If user builds package in parallel it is expected that the build process will require more memory. However, in most cases we don't know how much memory is required because we don't know how much memory an additional job could use at maximum (and if we would know, just add distcc, which will move memory requirement down to distcc host...). Otherwise we would cause unnecessarily problems for systems with low memory but still able to build the package. Bug: https://bugs.gentoo.org/626134 Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> dev-lang/rust/rust-1.30.1-r1.ebuild | 2 -- dev-lang/rust/rust-1.31.1.ebuild | 2 -- dev-lang/rust/rust-1.32.0.ebuild | 2 -- dev-lang/rust/rust-1.33.0.ebuild | 2 -- dev-lang/rust/rust-1.34.0-r2.ebuild | 2 -- dev-lang/rust/rust-1.34.1.ebuild | 2 -- 6 files changed, 12 deletions(-) I wonder what's going on here. We had a similar case in the German Gentoo forums today. A user compiled "clang" with "-ggdb" in CFLAGS. The linker allocated huge amounts of memory and was finally killed by the OOM killer. - https://forums.gentoo.org/viewtopic-t-1115824.html The issue was reported to GCC developers last year: - https://gcc.gnu.org/legacy-ml/gcc/2019-04/msg00270.html - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90273 It seems that GCC developers developed a patch last year. This patch is included in GCC 9.3 (I verified it), but the linker still needs huge of memory if CFLAGS contains "-ggdb", at least for "clang". |