[MacPorts] howto/ParallelBuilding modified

MacPorts noreply at macports.org
Sat Oct 24 00:04:59 PDT 2009


Changed page "howto/ParallelBuilding" by ryandesign at macports.org from 70.253.95.39*
Page URL: <http://trac.macports.org/wiki/howto/ParallelBuilding>
Diff URL: <http://trac.macports.org/wiki/howto/ParallelBuilding?action=diff&version=5>
Revision 5
Comment: Total rewrite because parallel building is on by default now

-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: howto/ParallelBuilding
=========================================================================
--- howto/ParallelBuilding (version: 4)
+++ howto/ParallelBuilding (version: 5)
@@ -1,42 +1,49 @@
 [wiki:howto <- Back to the HOWTO section]
 
-= TODO: How to enable parallel building =
+= How to disable parallel building =
 
- * Audience: Users with multi-core systems
- * Requires: MacPorts >=1.6.0
+ * Audience: Users with multi-processor or multi-core systems
+ * Requires: MacPorts >=1.8.0
 
 == Introduction ==
 
-Some ports in MacPorts ports tree can use make -j, a command which allows building parallel. This means, make will spawn multiple build jobs at the same time. With this, the full advantage of the multi core system can be utilized.
+If you have a Mac with multiple processors or multiple processor cores, MacPorts will build each port in parallel.
+This means `make` will spawn multiple build jobs at the same time.
 
-== Configuration ==
+While this makes the build faster if it works, it can also cause problems if it doesn't.
+Not all ports have been tested for parallel building, and some may intermittently or consistently fail to build with it.
 
-=== Step 1: '''Edit macports.conf''' ===
+== Ways to disable ==
 
-Open `/opt/local/etc/macports/macports.conf` in your favorite editor. Find the line
+=== On the command line === #commandline
+
+If you suspect a build failure may be the result of parallel building, you can turn it off temporarily directly in the `port` command invocation:
+
+{{{
+$ sudo port clean PORT
+$ sudo port install PORT build.jobs=1
+}}}
+
+where PORT is the port name.
+
+If this succeeds, parallel building should probably be disabled in that port's Portfile. See below.
+
+=== In the Portfile === #portfile
+
+If you find that the software being ported does not support parallel building, it can be disabled in the Portfile using this line:
+
+{{{
+use_parallel_build  no
+}}}
+
+The problem should also be reported to the developers of the software so that they can fix the problem and we can reenable parallel building in the future.
+
+=== In macports.conf === #conf
+
+You can disable parallel building entirely on your system if desired by changing the `buildmakejobs` line in `/opt/local/etc/macports/macports.conf`. By default its value is `0` which causes MacPorts to automatically determine an appropriate number of jobs to start (the number of processors or cores, or the number of GB of memory installed, whichever is less). You can also explicitly set it to a number of jobs. To disable parallel building, set it to `1`:
+
 {{{
 buildmakejobs       1
 }}}
-and change it to the number of parallel build jobs you want to use. It is common to either use the number of cores or number of cores+1. If you set it to `0`, it will automatically take the number of cores you have.
-
-That was it. From now on, port will use parallel build jobs.
-
-=== Note ===
-
-Please note that this feature is opt-in. It will only work with ports specifying 
-{{{
-use_parallel_build  yes
-}}}
-Some developers are concerned it might break ports which have insufficient dependencies in their Makefiles.
-
-If any port still does not build with this feature, see below how to disable it from command line for a specific port and open a ticket in our bug tracker or report it upstream.
-
-== Enable/disable from command line ==
-
-This feature can also be enabled or disabled from command line.
-{{{
-$ port install $portname build.jobs=N
-}}}
-Where N is the number of parallel build jobs to use. If you specify `build.jobs=1` it will be disabled.
 
 [wiki:howto <- Back to the HOWTO section]

-------8<------8<------8<------8<------8<------8<------8<------8<--------

* The IP shown here might not mean anything if the user or the server is
behind a proxy.

--
MacPorts <http://www.macports.org/>
Ports system for Mac OS

This is an automated message. Someone at http://www.macports.org/ added your email
address to be notified of changes on howto/ParallelBuilding. If it was not you, please
report to .


More information about the macports-changes mailing list