[distcc] distcc sends preprocessing tasks to remote hosts

Fergus Henderson fergus at google.com
Thu Jul 31 15:21:26 GMT 2008


On Thu, Jul 31, 2008 at 8:21 AM, Bart Friederichs <bf at tbwb.nl> wrote:

>  Fergus Henderson wrote:
>
> On Thu, Jul 31, 2008 at 7:28 AM, Bart Friederichs <bf at tbwb.nl> wrote:
>
>> I just installed distcc to play around with it,
>
>
> Which version?
>
> localhost: distcc 2.18.3 i486-pc-linux-gnu (protocols 1 and 2) (default
> port 3632)
>   built May  1 2007 10:25:30
> test:  distcc 2.18.3 i686-redhat-linux-gnu (protocols 1 and 2) (default
> port 3632)
>   built Mar  7 2007 20:15:19
>

If you're evaluating distcc, I suggest you use distcc 3.0rc2 or later,
rather than 2.18.3.



>
>
>
>
>> and evaluate it for our
>> development department. I seem to get everything working ('test' is a
>> testserver):
>>
>> export DISTCC_HOSTS='localhost test'
>> make -j8 CC=distcc CXX=distcc
>>
>> this starts and runs, but doesn't compile correctly. When I look into my
>> distcc monitor, it shows that 'test' is also running preprocess jobs.
>
>
> Can you be more specific?  What is it about the output of the distcc
> monitor that makes you think that 'test' is running preprocess jobs?
>
> The fact that it says 'Preprocessing' on the line of the node 'test'.
>

That just indicates that the job, which is current in the "Preprocessing"
state, will _eventually_ be sent to host "test".
It doesn't mean that the preprocessing is happening on host "test".

The distccmon-text page says:

       The output of distccmon-text contains one line for each job currently
being compiled.   Each  line  contains
       the following columns:

       PID    ID of the distcc client process.

       STATE  Identifies the phase of operation.  In order these may be
"Startup", "Blocked", "Connected", "Prepro-
              cess", "Conect", "Send", "Receive" and "Done".

       FILE   The input filename, if known.

       HOST[SLOT]
              The compile hostname.  May be followed in square brackets by
the slot index for that host.

So the field that you are seeing is "The compile hostname".
The job is in state "Preprocess", and the host which will (eventually) be
used for compilation is "test1".


>
>
>
>> And it cannot process them correctly (I get compiler errors in .h
>> files). Isn't distcc supposed to do the preprocessing on localhost?
>
>
> That depends on whether you use "pump" mode or not.
>
> i don't think so. I have no idea even what it is, or how to use it.
>

See <http://distcc.org>.

>
>   The command above would not use pump mode, and so would do the
> preprocessing on localhost.
>
> That's what I want, so let's assume this is the case.
>
>
> I think the error that you get is because the header files on your
> localhost are not compatible with the compiler on your remote host.
>
> There is a compiler version difference between local and remote host:
>
> localhost: gcc version 4.2.3
> test: gcc version 4.1.2
>
>  The error message that you get there is coming from the compiler, not
> from the preprocessor, I think.
>
> Then how is it possible that is locates the error in the header file?
>

The preprocessed output includes "#line" directives that map different parts
of the preprocessed source back to the header files or source files that
they originally came from.


>
>   The output of the preprocessor gets shipped to your remote host, and
> then the compiler detects semantic errors in the preprocessed output, so it
> complains.
>
> I understand that. You are right, it doesn't have to mean the remote host
> is preprocessing.
>
>
>  distcc -g -rdynamic -I/usr/include/mysql -I../include
>> -I/usr/include/libxml2 -I../tbwb -I../tables  -c -o KardexLift.o
>> KardexLift.cpp
>
>
> Note that this probably won't work in pump mode in distcc 3.0-rc2: the
> "-I/usr/include/mysql" option means that you'll hit Issue 7 <
> http://code.google.com/p/distcc/issues/detail?id=7&can=1>.  This is fixed
> in the current svn sources.
>
> I don't think I use pump mode, but I will look into it anyway.
>


Yes, your command above was not using pump mode.  I'm just warning you that
if/when you try using pump mode, you may run into problems, because of that
bug, unless you use the current svn sources.

-- 
Fergus Henderson <fergus at google.com>
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the distcc mailing list