On Thu, Jul 25, 2019, 7:56 AM Arkadiusz Drabczyk <[email protected]> wrote:
> On 2019-07-24, Jeremy Hansen <[email protected]> wrote: > > To go along with Kyle's suggestion, I set my MAKEFLAGS with a file in > > /etc/profile.d/ directory (I call it make-export.sh), so it is > > automatically applied when any user logs in. > > > > The following will set MAKEFLAGS to the number of CPU threads + 1 (it > says > > cores, but Linux the number of threads the CPU is capable of as > individual > > cores). > > > > jbhansen@craven-moorhead:~$ cat /etc/profile.d/make-export.sh > > #!/bin/bash > > > > # Set make jobs to default to num cores + 1 > > export MAKEFLAGS="-j$(expr $(nproc) + 1)" > > -j$(nproc) is very useful itself in most cases as it can speed up the > build build considerably but still I think it should be used with > caution and don't be set globally. For example, at my current $JOB > I've worked with sloppily written Makefile written by people from > another company that did some crazy things such as extracting tarballs > and the build process failed when -j was used. Also, a couple of > months ago I tried to build llvm with -j$(nproc) and it also failed > but I don't remember the specific reason but it was something like > this: > > https://stackoverflow.com/questions/25197570/llvm-clang-compile-error-with-memory-exhausted > . > -- > Arkadiusz Drabczyk <[email protected]> > Yes, there's always the possibility of having multiple jobs cause a failure, but in those cases, you can simply override it by running MAKEFLAGS="-j1" sh some.SlackBuild. In all the SlackBuilds I've run, I think I've only needed to override the number of jobs less than 5 times. For me, it was well worth the increased speed of compiling. But maybe it isn't for everyone. Jeremy >
_______________________________________________ SlackBuilds-users mailing list [email protected] https://lists.slackbuilds.org/mailman/listinfo/slackbuilds-users Archives - https://lists.slackbuilds.org/pipermail/slackbuilds-users/ FAQ - https://slackbuilds.org/faq/
