Fwd: [distcc] how to get separate compile tasks

ibaker at mail.cern.ch ibaker at mail.cern.ch
Mon Mar 23 16:01:19 GMT 2009

On Mon, 23 Mar 2009, Yanchun Wang wrote:

> Thank you for your answer. Then if i send a same command, for example "make
> –j4 CC=distcc –f makefile.x86_linux",
> to all servers over the LAN, (and the program source files to be compiled
> are stored on a shared disk. )
> Servers call these commands. Then distributed multithreading compiling can
> be realized. Correct?

No.  When distcc is invoked it translates what follows as options to gcc 
(with a few exceptions).  So in the above case "–f makefile.x86_linux" 
will be parsed and analysed by distcc as compiler options.

I'm not entirely sure what you're trying to do, it sounds as if you wish 
to distribute a copy of the makefile to all the build servers and have 
them build an application on a shared disk?

distcc doesn't work that way.  A client uses one makefile to distribute 
individual compilation jobs (which include the files and the compiler 
options etc) to several build servers (one job is processed by one 
server), concurrency is controlled through make's -j option.

If you invoke:

make -j4 CC=distcc

from within your build directory (the man page details other ways distcc 
can be invoked), then distcc should distribute jobs to your build servers 
(assuming everything has been set up correctly).

I apologise if I've missed your point.

Ian Baker

More information about the distcc mailing list