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

Mark Lee mark at markelee.com
Sun Jan 5 23:03:23 EST 2014


On Sun, 2014-01-05 at 15:42 -0600, David C. Rankin wrote:
> 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
> <snip>
> #MAKEFLAGS="-j2"
> CPUCORES=$(grep -c "^processor" /proc/cpuinfo)
> if test $CPUCORES -gt 1; then
>   MAKEFLAGS="-j${CPUCORES}"
> fi
> <snip>
> 
>   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)
> 

Salutations!

This all boils down to what does Arch consider a bug. If code that
cannot be compiled in parallel is a bug then Arch should make parallel
building the default (since these are bugs that upstream should fix). If
instead it is not a bug but is the intention of upstream developers,
then it shoudln't be enabled by default. Who is responsible for ensuring
parallel building works?

I am personally for the parallel compiling since I've only encountered
one package that doesn't build in parallel (early version of mpich).

At the very least, the default value of the commented out MAKEFLAGS
could be changed to "-j$(nproc)" instead of "-j".

Regards,
Mark
-- 
Mark Lee <mark at markeelee.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: This is a digitally signed message part
URL: <http://mailman.archlinux.org/pipermail/arch-general/attachments/20140105/2c4571be/attachment.asc>


More information about the arch-general mailing list