Skip to Content.
Sympa Menu

sm-discuss - [SM-Discuss] Distributed compilation

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Robert Helgesson <rycee AT home.se>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: [SM-Discuss] Distributed compilation
  • Date: Wed, 17 Jul 2002 19:54:07 +0200

Howdy.

Threw together a quick patch to enable the use of distributed
compilation in cast. It does this through the use of distcc.
(spell: http://rycee.cx/~rycee/distcc.tar.bz2)

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
script.

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
problems.

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.




Archive powered by MHonArc 2.6.24.

Top of Page