[arch-general] Default value of "j" in makeflags of makepkg.conf

David C. Rankin drankinatty at suddenlinkmail.com
Sun Jan 5 16:42:02 EST 2014

On 12/31/2013 12:51 AM, Sébastien Leblanc wrote:
> I would advise against doing that, considering that there are at least a
> handful of packages (can't name them) that have broken or otherwise
> malfunctioning Makefiles when run in parallel.

  There are more than a few. If you get a PKGBUILD from any of the Arch repos of
AUR, you can be relatively sure building in parallel will work. However, if you
a working on any other independent project, the setting j > 1 can cause extreme
build issues. I ran into this exact issue with the trinitydesktop project.
Building with -j4 greatly reduced build time, but numerous 'random' build
failures were introduced. Building with -j1 was reliable. (this problem has
likely been eliminated now) Setting to build in parallel by default maximizing
all cores can bite you. I screwed myself by setting:

cat /etc/makepkg.conf
CPUCORES=$(grep -c "^processor" /proc/cpuinfo)
if test $CPUCORES -gt 1; then

  The bottom line, building custom projects in parallel (from someone else's
code) should be avoided until you are sure you have eliminated all other issues,
then start building in parallel. That is better handled on the command line than
in makepkg.conf (just my $.02)

David C. Rankin, J.D.,P.E.

More information about the arch-general mailing list