Collin Funk <[email protected]> writes:

> Sam James <[email protected]> writes:
>
>>> Gnulib has code to get that on most (all?) platforms that you care
>>> about. But I understand you want to minimize dependencies to make it
>>> easier to build make without make.
>>>
>>
>> FWIW, ninja defaults to nproc, but it does some magic like gnulib does
>> to read cgroups cpu.max too.
>
> The Gnulib function does the same nowadays. It was done so that 'nproc'
> from Coreutils would be more useful in containers, for example. I guess
> it would be useful for most programs, though.
>

Ah, indeed. This even came up in GCC: https://gcc.gnu.org/PR127651

>>> If it were in my control, I probably wouldn't implement it for the
>>> reasons you mention. E.g., I can build glibc with $(nproc) jobs, but
>>> building LLVM with $(nproc) jobs will cause my system to hang due to a
>>> lack of memory, requiring me to reboot.
>>>
>>
>> I encourage you to try Steve: https://wiki.gentoo.org/wiki/Steve
>
> It only works on Gentoo, right? Or maybe it is just easier to setup on
> Gentoo?
>
> I use mostly Fedora nowadays. Sometimes Debian for VMs and containers
> since they have nice cross compiler packages.
>
> I'll try to find some time to try Gentoo to experiment with that.

I encourage you to try Gentoo at your earliest opportunity, but
fortunately, Steve works on any distribution where you have CUSE (a
sibling of FUSE). The only snag would be that you may need to write your
own small udev rule to handle permissions on /dev/steve.

>
> Thanks,
> Collin

cheers,
sam

Attachment: signature.asc
Description: PGP signature

Reply via email to