using make(1) with "-j" option

Anton Sayetsky vsjcfm at gmail.com
Mon Nov 25 19:39:09 UTC 2013


2013/11/25 William Bulley <web at umich.edu>:
> In the modern era with multiple CPUs the norm, I was interested in
> finding a way to speed up compiles from source (of the kernel and
> the various ports I use).
>
> According to the man page "make(1)" the "-j max_jobs" option:
>
>    Specify the maximum number of jobs that make may have running at
>    any one time.  Turns compatibility mode off, unless the -B flag
>    is also specified.
>
> While building the kernel today, I was successful using "make -j 4"
> on a four CPU system.  Later on, on the same system, I was unable
> to build any ports from source using either "# make -j 4 install"
> or "# make -j 2 install" commands.  What am I missing here?
You should use make jobs _only_ for build stage. Other stages are not supported.
For example: make -j3 all && make install
This applicable for both src & ports. But correct way for ports is
setting MAKE_JOBS_NUMBER and/or FORCE_MAKE_JOBS in make.conf


More information about the freebsd-questions mailing list