[SM-Discuss] Distributed compilation
rycee at home.se
Wed Jul 17 13:54:07 EDT 2002
Threw together a quick patch to enable the use of distributed
compilation in cast. It does this through the use of distcc.
The patch also removes use of compilercache and instead uses ccache.
When cast is run the /var/lib/sorcery/build directory is appended to
PATH so all calls to gcc, cc and g++ are intercepted by the run_compiler
Configuration is done in /etc/sorcery(/local)/compiler_config
The number of make jobs should be set to the same or slightly more than
the number of hosts.
IMPORTANT: Only enable distributed compilation on a trusted network!
Another minor thing, I created a function named make which calls
/usr/bin/make with a -j argument. I believe this way is better than
doing it in default_build since it affect calls to make even when a
spell does it in a BUILD file.
Issues I know of:
* distcc and ccache doesn't play nice together, they should be able to
according to the distcc documentation. For now, don't enable both
distributed compilation and compiler cache.
* Not all spells can be compiled in this way, I believe it is mainly
the fault of bad Makefiles. Most of the packages I've tested worked
fine though. It should be quite possible to fall back on straight gcc
if distcc fails.
* I haven't tested the use of ccache very much so it might have
The patch is against latest CVS version.
Btw. I'm sorry if I expressed myself fuzzy in this mail, haven't slept
in a long time :)
/rycee - Going to bed.
More information about the SM-Discuss