[Slackbuilds-users] make -j${NUMJOBS} discussion

Slackbuilds sbo at linuxgalaxy.org
Sun Apr 3 18:59:16 UTC 2022


On 4/3/22 11:22, Willy Sudiarto Raharjo wrote:
>> For compatibility, the default will be one core/thread.  Please do not
>> remove.  This is a feature and not a bug.
>
> You can just export MAKEFLAGS in your machine to achive same results
> Don't expect others to use same machine as yours and we often test those
> scripts in a VM with only small specs.
>
> We use -j1 explicitly only for those who failed to run on multiple
> cores, but as for the rest, we want to keep it like what we have now.
>
>

Given that my 4 systems span over 10 yrs and both Intel and AMD (even
the newest is already 3 yrs old), it is a good guess that, yes, I may
have what most people are using.

Most of my testing for submission is in a VM (either 2, 4 or 6 cores,
depending on how many I fire up on the Ryzen 9).  Settings MAKEFLAGS
will hide NUMJOBS and is not appropriate since it obscures what was
used. My VMs may not have the expected cores. It's better to have this
available to explicitly set in the script as needed. Having
NUMJOBS=${NUMJOBS:-1} as the default provides a suitable fallback.

Also, most MakeFiles don't set the number of cores by default and expect
that to be passed with -j{n}, otherwise -j1 is used anyway.

I see no logical reason not to use -j${NUMJOBS} for those sources that
support it, and set -j1 as the default.  This is a decision that can be
left to the buildscript maintainer to determine from testing. It does
not need to be, IMHO, an arbitrary global rule.

There have been previous discussions on this topic. I have yet to be
convinced of the utility of not allowing NUMJOBS.  After all, Pat sprinkles

NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "}

everywhere.  This seems to defeat your "Don't expect others to use same
machine as yours" argument.

Thanks,
-Ed



More information about the SlackBuilds-users mailing list