LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-20-2011, 11:08 AM   #1
george-lappies
Member
 
Registered: May 2011
Location: Secunda, South Africa
Distribution: Slackware 13.37
Posts: 181

Rep: Reputation: 9
Is there a way to speed up slackbuilds?


Currently slackbuilds only uses one core while it is compiling. Is there a way to enable more cores?
 
Old 06-20-2011, 11:26 AM   #2
jostber
Member
 
Registered: Jul 2001
Location: Skien, Norway
Distribution: Slackware Current 64-bit
Posts: 543

Rep: Reputation: 178Reputation: 178
Go into the SlackBuild script and add "-j4" to the make command if it is not there already.
 
Old 06-20-2011, 11:27 AM   #3
audriusk
Member
 
Registered: Mar 2011
Location: Klaipėda, Lithuania
Distribution: Slackware
Posts: 358

Rep: Reputation: 199Reputation: 199
I have the following variables exported in my .bashrc:

Code:
# Set the number according to how many cores you have.
export JOBS=2
export MAKEFLAGS="-j2"
MAKEFLAGS is used by make, but some apps use different build systems, and in some SlackBuilds (notably for VirtualBox) JOBS variable is used instead.
 
Old 06-20-2011, 11:29 AM   #4
bassplayer69
Member
 
Registered: Jul 2007
Location: In a van down by the river...
Distribution: MX Linux 21
Posts: 237

Rep: Reputation: 56
You can see about exporting MAKEFLAGS:

Code:
export MAKEFLAGS='-j 2'
or modifying the SlackBuild script and add -j2 to the make command.

The -j2 tells the make program how many processors are available. My examples are for a Core2Duo processor.

You'll have to read up on the compiling howto to see if this is ok to do though. Some applications don't like it.


WOW: both people above type faster than me!

Last edited by bassplayer69; 06-20-2011 at 11:30 AM.
 
Old 06-20-2011, 11:30 AM   #5
55020
Senior Member
 
Registered: Sep 2009
Location: Yorks. W.R. 167397
Distribution: Slackware
Posts: 1,307
Blog Entries: 4

Rep: Reputation: Disabled
As others have said,
Code:
export MAKEFLAGS="-j2"
before you run sbopkg or an SlackBuild, but BEWARE! Some of them (very few) *will* go horribly wrong when you do this [1]. The usual way this shows up is a mysterious "file not found" error at the linking stage. To get round it, just
Code:
unset MAKEFLAGS
for the problem SlackBuilds.

[1] including (but not limited to) gsm, gsoap, john.

Edit: I think cmake uses MAKEFLAGS ok :-)

Last edited by 55020; 06-20-2011 at 11:32 AM. Reason: cmake
 
Old 06-20-2011, 12:16 PM   #6
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
Quote:
Originally Posted by 55020 View Post
As others have said,
Code:
export MAKEFLAGS="-j2"
before you run sbopkg or an SlackBuild, but BEWARE! Some of them (very few) *will* go horribly wrong when you do this [1]. The usual way this shows up is a mysterious "file not found" error at the linking stage. To get round it, just
Code:
unset MAKEFLAGS
for the problem SlackBuilds.

[1] including (but not limited to) gsm, gsoap, john.

Edit: I think cmake uses MAKEFLAGS ok :-)
MPlayer devs dont recommend or support anything other than j1 either
 
Old 06-20-2011, 12:17 PM   #7
george-lappies
Member
 
Registered: May 2011
Location: Secunda, South Africa
Distribution: Slackware 13.37
Posts: 181

Original Poster
Rep: Reputation: 9
Great, thanks for all the replies. My MAKEFLAGS is set now. If I do
Code:
export MAKEFLAGS="-j2"
will it be persistant over reboots?
 
Old 06-20-2011, 12:28 PM   #8
dimm0k
Member
 
Registered: May 2008
Location: Brooklyn ZOO
Distribution: Slackware64 14.2
Posts: 564

Rep: Reputation: 56
Quote:
Originally Posted by george-lappies View Post
Great, thanks for all the replies. My MAKEFLAGS is set now. If I do
Code:
export MAKEFLAGS="-j2"
will it be persistant over reboots?
To make it persistent, you'll need to stick that either in your ~/.bash_profile or ~/.bashrc
 
Old 06-20-2011, 12:29 PM   #9
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Quote:
will it be persistant over reboots?
No - you need to add the 'export MAKEFLAGS="-j2"' to your ~/.bashrc or better still put it in /etc/profile so it's set for all users.
 
Old 06-20-2011, 12:44 PM   #10
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612Reputation: 612
Adding '-pipe' to your CFLAGS will help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bandwidth management: speed 128kbps, after 500MB, speed down to 64kbps zdienos Linux - Networking 2 01-27-2009 07:07 AM
Use SlackBuilds.org or my own hosting to offer up SlackBuilds? hollywoodb Slackware 6 11-30-2006 08:56 PM
NIC transfer speed fast... receive speed slow landev Linux - Networking 5 11-07-2006 03:09 PM
cdrecord - trying to use high speed medium on low speed writer captain-cat Linux - Hardware 2 07-12-2004 06:27 PM
Is there a tool to monitor Internet connection speed and also network speed? xleft4dexy Linux - Networking 4 10-14-2003 10:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration