You are not logged in.

#1 2014-03-12 12:07:00

cgo
Member
From: Paris, France
Registered: 2010-11-05
Posts: 22

[solved] make -j (parallel jobs) in PKGBUILD ?

Hi,

I just rediscovered option -j in make, that lets make runs parallel jobs. On my computer (4 cores, ssd), it speeds up things.

I was wondering if it was clean/permitted/a good idea to use this in PKGBUILDs, by automatically adjusting the -j parameter to the number of cores, or half the number of cores ?

Cheers,
Charles

Last edited by cgo (2014-03-12 12:48:45)

Offline

#2 2014-03-12 12:10:03

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,344
Website

Re: [solved] make -j (parallel jobs) in PKGBUILD ?

This should not be added to PKGBUILDs.  Makepkg already sets this if the user has opted for it in /etc/makepkg.conf.  If you try to override this you will be using a setting that works best on your machine to override a setting the user has found works best on their own machine.

For your own use, just set -j4 in makepkg.conf on your system.

Last edited by Trilby (2014-03-12 12:11:04)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2014-03-12 12:47:59

cgo
Member
From: Paris, France
Registered: 2010-11-05
Posts: 22

Re: [solved] make -j (parallel jobs) in PKGBUILD ?

Hi,
thanks, I should have checked in makepkg.conf (MAKEFLAGS option).
It's great it already exists !

Enjoy,
Charles

Offline

#4 2014-03-12 12:48:09

portix
Member
Registered: 2009-01-13
Posts: 757

Re: [solved] make -j (parallel jobs) in PKGBUILD ?

There is one exception, -j1 can be used in a PKGBUILD to limit the number of threads, e.g. if the build fails due to some race conditions in the build process.

Offline

#5 2014-03-12 13:00:11

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,510
Website

Re: [solved] make -j (parallel jobs) in PKGBUILD ?

portix wrote:

There is one exception, -j1 can be used in a PKGBUILD to limit the number of threads, e.g. if the build fails due to some race conditions in the build process.

There is even an option....   Add options=('!makeflags') to the PKGBUILD

Offline

#6 2025-02-19 11:50:58

bjourne
Member
Registered: 2021-03-11
Posts: 13

Re: [solved] make -j (parallel jobs) in PKGBUILD ?

Trilby wrote:

This should not be added to PKGBUILDs.  Makepkg already sets this if the user has opted for it in /etc/makepkg.conf.  If you try to override this you will be using a setting that works best on your machine to override a setting the user has found works best on their own machine.

For your own use, just set -j4 in makepkg.conf on your system.

For setting it for a specific user you should instead modify ~/.config/pacman/makepkg.conf.

Offline

#7 2025-02-19 13:47:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,344
Website

Re: [solved] make -j (parallel jobs) in PKGBUILD ?

Yes, but that feature has not been temporally back-ported to 11 years ago.

#RetconMakepkg

Last edited by Trilby (2025-02-19 13:48:57)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#8 2025-02-20 10:21:31

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,465

Re: [solved] make -j (parallel jobs) in PKGBUILD ?

Please don't necro-bump

Closing this thread.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

Board footer

Powered by FluxBB