Parallel port building

From TykWiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

FreeBSD 8.0 has brought a long-awaited feature to the table: Parallel port building. This can drastically decrease the time it takes to build ports on multicore machines. The catch is that it is a huge job to go through the 20000+ ports in FreeBSD and check if they can be built in parallel. Each port needs to be checked by a maintainer and then marked as MAKE_JOBS_SAFE=yes to take advantage of the new feature. The thing is, most of the ports work - only a small number have problems. If you are brave, you can enable parallel building of all the ports that has not been marked as MAKE_JOBS_SAFE or MAKE_JOBS_UNSAFE yet. I haven't had any problems, but I am keeping in mind if I am unable to build a port, I will remember to remove this from /etc/make.conf and try again, before panicking.

To enable parallel port building for all ports, except the ones marked as MAKE_JOBS_UNSAFE, add the following to /etc/make.conf:

FORCE_MAKE_JOBS=yes
MAKE_JOBS_NUMBER=4

The number 4 is how many jobs should run at once (-j4 to make) - I normally use double the number of cores. The default is the number of cores. I haven't really measured the difference. #cores*2 is just old habit from countless buildworld runs.