Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 923731 - sci-mathematics/flint-3.0.1 - does not respect make options
Summary: sci-mathematics/flint-3.0.1 - does not respect make options
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Michael Orlitzky
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: makeopts-ignored
  Show dependency tree
 
Reported: 2024-02-03 16:44 UTC by Toralf Förster
Modified: 2024-03-25 21:07 UTC (History)
4 users (show)

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


Attachments
ps faux (ps-faux-20240202-132031-42.txt,346.77 KB, text/plain)
2024-02-03 16:44 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2024-02-03 16:44:18 UTC
Created attachment 884146 [details]
ps faux

happened at tinderbox image 17.1_desktop_systemd-20240201-2315
Comment 1 Michael Orlitzky gentoo-dev 2024-02-03 17:15:40 UTC
Are you sure you had MAKEOPTS and NINJAFLAGS set? In your output I see e.g.

  ninja -v -j4 -l0
  make -j4 V=1

which explain the multiple jobs. This package is using the cmake eclass so I'd expect it to be correct in the absence of any additional meddling.
Comment 2 Toralf Förster gentoo-dev 2024-02-03 17:20:18 UTC
(In reply to Michael Orlitzky from comment #1)
> Are you sure you had MAKEOPTS and NINJAFLAGS set? In your output I see e.g.
> 
>   ninja -v -j4 -l0
>   make -j4 V=1
> 
> which explain the multiple jobs. This package is using the cmake eclass so
> I'd expect it to be correct in the absence of any additional meddling.

I'd expect the 4 jobs, but a 

$ cat ~tinderbox/img/17.1_desktop_systemd-20240201-231503/etc/portage/package.env/00jobs 
*/*         j4

$ cat ~tinderbox/img/17.1_desktop_systemd-20240201-231503/etc/portage/env/
cflags_default      j1                  j4                  nosandbox           notest              notmpfs             test-fail-continue  
tinderbox@mr-fox /tmp/loadcheck.sh.d $ cat ~tinderbox/img/17.1_desktop_systemd-20240201-231503/etc/portage/env/j4 
EGO_BUILD_FLAGS="-p 4"
GO19CONCURRENTCOMPILATION=0
GOMAXPROCS=4

MAKEOPTS="$MAKEOPTS -j4"

OMP_DYNAMIC=FALSE
OMP_NESTED=FALSE
OMP_NUM_THREADS=4

RUST_TEST_THREADS=4
RUST_TEST_TASKS=4




but a cut -c1-185 /tmp/loadcheck.sh.d/ps-faux-20240202-132031-42.txt | less
shows few dozen of gcc jobs.
Comment 3 Michael Orlitzky gentoo-dev 2024-02-03 17:37:26 UTC
Hm, it looks like,

  ninja -v -j4 -l0
  ...
  /usr/libexec/gcc/x86_64-pc-linux-gnu/13/lto-wrapper @/var/tmp/portage/sci-mathematics/flint-3.0.1/temp/ccBp6GPp.lto_wrapper_args
  make -f /var/tmp/portage/sci-mathematics/flint-3.0.1/temp/ccvwTQTT.mk -j32 all

is to blame. I'm not very familiar with the lto-wrapper... is that a command that it generated?

Note also that ninja doesn't support the GNU make jobserver (yet), so calling ninja from make or vice-versa will generally not work perfectly (https://github.com/ninja-build/ninja/issues/1139)
Comment 4 Michael Orlitzky gentoo-dev 2024-02-19 01:12:53 UTC
Maybe toolchain@ has some insight here?

In short, it looks to me like the flint ebuild is running ninja with the correct number of jobs, but that ninja eventually executes gcc's lto-wrapper, and lto-wrapper is launching "make -j32".

If so, this would be something to fix... I'm not sure where, but not in flint.
Comment 5 Michael Orlitzky gentoo-dev 2024-03-25 21:07:06 UTC
I took another look at this and am pretty sure I can't do anything about it. I'm not too familiar with lto-wrapper, but it looks like a coordination problem between ninja (flint) and make (lto-wrapper) that won't be solved until ninja supports the GNU make job server, or until we implement some other hack for lto-wrapper.

toolchain@ this is your last chance to tell me I'm wrong :P