Multi-CORE compiling using Yaourt.
Welcome, Guest.

ANNOUNCEMENT:

Click the CHAT button above for connection details. Show up early, seating is limited, late entries will not be registered.

Author Topic: Multi-CORE compiling using Yaourt.  (Read 14171 times)

Online Spatry

  • Benevolent Dictator
  • Administrator - Sysop
  • **********
  • Posts: 5137
  • Country: us
  • Cup of Linux Founder
    • Cup of Linux
Multi-CORE compiling using Yaourt.
« on: September 08, 2014, 03:40:04 PM »
I did a little digging around and I was looking for a solution which would allow me to compile AUR packages using all 4 cores of my CPU when building wine-silverlight.

Step 1: open /etc/makepkg.conf

Step 2: uncomment #MAKEFLAGS="-j2" by removing the # symbol at the beginning of the line.

Step 3: if you have a dual core processor change the line to MAKEFLAGS="-j3" Quad core processors MAKEFLAGS="-j5" octocores would be MAKEFLAGS="-j9" and so on... This formula is assuming you have one processor with (x) cores hence the original line stating "-j2" meaning one processor, one core.

Step 4: When you use yaourt an option is given to edit the PKGBUILD. Make sure there is a line in the PKGBUILD which says options=('!makeflags'). If it is not there, you will need to add this line, otherwise multi-core compilation will not proceed.

In testing this, it appears that the compile process is going faster. It is my understanding that this may not work for compiling everything so your mileage may vary. Cheers.
"Wipe that NERVOUS expression off of your face, 3PO!" -General Leia Organa SWTLJ

Offline c00ter

  • Elite Member
  • *****
  • Posts: 348
  • Country: 00
  • I'm an Alaskan! Where's my darn flag!
Re: Multi-CORE compiling using Yaourt.
« Reply #1 on: September 08, 2014, 07:15:42 PM »
This could be a real time-saver. It usually takes my wee old compy 5-10 mins. to compile google-chrome-stable. :)

Offline lcRONOS

  • I will run all the Operating Systems!
  • Staff Member
  • ********
  • Posts: 751
  • Country: us
Re: Multi-CORE compiling using Yaourt.
« Reply #2 on: December 09, 2014, 03:22:34 PM »
In Gentoo when compiling packages I believe you can also specify the Makeflags option for a specific package when installing it, I'm not sure whether that's a portage feature or something you can do with any package during a compile though.  I'm surprised that that's not something that is in the initial set up though, because even as a Gentoo user (that step is mandatory when installing Gentoo) I didn't think about that.
Laptop: HP Pavilion 15t, quadboot Obarun Linux, macOS 10.13, TrueOS, Windows 10
Desktop: Dell Inspiron 660, dualboot Artix Linux,Windows 1
You are not allowed to view links. Register or Login

Offline MrCoe

  • Full Member
  • ****
  • Posts: 207
  • Country: au
Re: Multi-CORE compiling using Yaourt.
« Reply #3 on: June 15, 2017, 03:19:21 AM »
What if you have an i7 with 4 cores and 8 threads ?, could you in theory up the setting ?
“The thing with technology is if you do something stupid you can fix it.”

Offline Ironclaw

  • Terminal Multiplexer
  • Staff Member
  • ********
  • Posts: 274
  • Country: us
Re: Multi-CORE compiling using Yaourt.
« Reply #4 on: February 14, 2019, 05:11:56 AM »
General rule is number of cores + 1
If you must persist, I will be forced to tar you, then gzip you and finally umount you.

Online Spatry

  • Benevolent Dictator
  • Administrator - Sysop
  • **********
  • Posts: 5137
  • Country: us
  • Cup of Linux Founder
    • Cup of Linux
Re: Multi-CORE compiling using Yaourt.
« Reply #5 on: February 14, 2019, 07:20:08 AM »
I will add that this works when building packages from the aur with "makepkg" instead of AUR helpers like trizen, yay or yaourt. I have MAKEFLAGS="-j9" in my configuration and all 8 threads on my thinkpad are used when compiling AUR packages.
"Wipe that NERVOUS expression off of your face, 3PO!" -General Leia Organa SWTLJ