Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 910221 - dev-qt/qtwebengine: invalid RAM requirement calculation
Summary: dev-qt/qtwebengine: invalid RAM requirement calculation
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-11 14:13 UTC by Anton Bolshakov
Modified: 2023-08-28 16:16 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Bolshakov 2023-07-11 14:13:33 UTC
The ebuild doesn't have a fixed RAM requirements (iherit check-reqs, 
CHECKREQS_MEMORY).

instead, it takes makeopts_jobs parameter and multiples it.

In my case, I have -j12, which converts into "24 GiB RAM" but I only have 16 Gib.
It gave me a wrong impression that I need to upgrade RAM (which I can't).
However, a "workaround" is just to decrease the value to "-j8".

Please find a better solution.
Comment 1 Mike Gilbert gentoo-dev 2023-07-11 14:26:55 UTC
It's always going to be an imperfect estimation. There is no "good" solution there.
Comment 2 Anton Bolshakov 2023-07-11 15:46:13 UTC
(In reply to Mike Gilbert from comment #1)
> It's always going to be an imperfect estimation. There is no "good" solution
> there.

hm... is it possible to do the other way around? Check available RAM, calculate -j value and notify user if his current setting is too high?..
Comment 3 Ionen Wolkens gentoo-dev 2023-08-28 15:43:13 UTC
(In reply to Anton Bolshakov from comment #0)
> It gave me a wrong impression that I need to upgrade RAM (which I can't).
> However, a "workaround" is just to decrease the value to "-j8".
So you mean the issue is that it's unclear that you need to reduce -jN rather than the estimation potentially being wrong?

But given basing this -jN is done in most ebuilds (bare those that have a single job that consume high memory), the eclass already tells you about reducing MAKEOPTS (or add swap as alternative).

e.g. with MAKEOPTS=-j128 (what could go wrong):

 * There is NOT at least 256 GiB RAM
 * 
 * Memory or space constraints set in the ebuild were not met!
 * The build will most probably fail, you should:
 * - enhance the memory (reduce MAKEOPTS, add swap), or
 * - add more space
 * as required depending on the failed tests.

Wording could likely be better (feel free to file a bug against check-reqs.eclass and/or do a PR if you feel that should be improved), but I don't think there's anything that the qtwebengine ebuild needs to do differently in that regard.

At best could add a einfo to inform that we're estimating based on -jN, but that's likely to go missed anyway given it won't be shown in the error that the eclass emits and then abort after -- and unconditional ewarn/elog would be noisy for nothing.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-28 15:50:40 UTC
I mproved the error in

commit e105854611974017415af6199d521b78f1134ff4
Author: Sam James <sam@gentoo.org>
Date:   Tue Aug 22 18:11:34 2023 +0100

    check-reqs.eclass: clarify failed requirements error

    Explicitly suggest lower MAKEOPTS jobs and/or adding swap for bad RAM
    amount.

    Signed-off-by: Sam James <sam@gentoo.org>

which I think is indeed the best we can do here.
Comment 5 Ionen Wolkens gentoo-dev 2023-08-28 16:16:59 UTC
(In reply to Sam James from comment #4)
> Improved the error in [...]
Ah ok, thought this was always there which had me wondering for this bug. Guess understandable was confused then.