I have set > # portageq envvar MAKEOPTS --jobs 42 --load-average 41.95 which worked fine until I upgraded from >=dev-util/meson-0.58.2 to 0.59.1. Now I see failures like > >>> Source configured. > >>> Compiling source in /var/tmp/portage/media-video/pipewire-0.3.34/work/pipewire-0.3.34 ... > * abi_x86_32.x86: running multilib-minimal_abi_src_compile > meson compile -C /var/tmp/portage/media-video/pipewire-0.3.34/work/pipewire-0.3.34-abi_x86_32.x86 --jobs 42 --load-average 41.95 --verbose > usage: meson compile [-h] [--clean] [-C BUILDDIR] [-j JOBS] [-l LOAD_AVERAGE] [-v] [--ninja-args NINJA_ARGS] > [--vs-args VS_ARGS] [--xcode-args XCODE_ARGS] > [TARGET ...] > meson compile: error: argument -l/--load-average: invalid int value: '41.95' > * ERROR: media-video/pipewire-0.3.34::gentoo failed (compile phase): > * compile failed > * >
Definitely not related to eclass change? https://www.mail-archive.com/gentoo-dev@lists.gentoo.org/msg93286.html
Both meson compile and ninja treat the load average as an integer. For ninja, the value is parsed using strtod(). The fractional portion of the value is ignored. For meson compile, the argument parser is a bit more strict, and a fractional value causes an exception to be raised. If we want to restore the previous behavior, we could probably just truncate the result of makeopts_loadavg to convert it to an integer before passing it to meson compile.
(In reply to Mike Gilbert from comment #2) > For ninja, the value is parsed using strtod(). The fractional portion of the > value is ignored. I take that back: strtod() parses the argument as a double, and ninja fully supports fractional load average values. I think the argument parser in meson compile should be updated to take a floating point value instead of an integer. I'll work on a patch to implement that.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7c6ead31a2d6047ef2d3dd3fb60182f1456124f commit c7c6ead31a2d6047ef2d3dd3fb60182f1456124f Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2021-08-27 17:05:07 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-08-27 17:05:07 +0000 dev-util/meson: accept floating point values for load-average Closes: https://bugs.gentoo.org/810655 Signed-off-by: Mike Gilbert <floppym@gentoo.org> ...on-mcompile-treat-load-average-as-a-float.patch | 28 ++++++++++++++++++++++ ...{meson-0.58.2.ebuild => meson-0.58.2-r1.ebuild} | 4 ++++ ...{meson-0.59.1.ebuild => meson-0.59.1-r1.ebuild} | 4 ++++ 3 files changed, 36 insertions(+)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c6a3fa54b14b1ccbf2cd7703061e6a19c735dde8 commit c6a3fa54b14b1ccbf2cd7703061e6a19c735dde8 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2021-09-21 13:37:27 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-09-21 13:37:27 +0000 meson.eclass: depend in >=dev-util/meson-0.58.2-r1 Bug: https://bugs.gentoo.org/810655 Signed-off-by: Mike Gilbert <floppym@gentoo.org> eclass/meson.eclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)