Version 5 (modified by ryandesign (Ryan Carsten Schmidt), 15 years ago) (diff) |
---|
How to disable parallel building
- Audience: Users with multi-processor or multi-core systems
- Requires: MacPorts >=1.8.0
Introduction
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.
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.
Ways to disable
On the command line
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
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
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