This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: distributed compilation with gcc: distcc
On 22 Jul 2002, Aldy Hernandez <aldyh@redhat.com> wrote:
>
> > Another thing to think about: do you need the build machines to have the
> > exact same set of include and library files?
>
> correct me if i'm wrong, but i think distcc sends preprocessed files to
> the slaves, so header files don't matter. and the link is done on the
> host machine, so it'll use the libraries in the host.
That is correct. One of my design goals was to avoid forcing people
to have all the machines exactly in sync -- I think that is too much
hassle in most cases. Even if you tried to achieve it, you might get
wierd failures where the libraries or headers were not exactly the
same.
The biggest dependency on the clients is that they must have a version
of gcc that is "sufficiently reasonable" to compile the preprocessed
source into an object file. To start with, they must have an
appropriate cross compiler if the target architecture is not native.
There are also more incompatibilities between gcc versions that I
naively expected before I started doing this. For example, for C++ in
particular, using object files from different versions of g++ is
pretty risky. Another example is that some Linux kernels use gcc
features or behaviours that are only present in recent compilers.
FreeBSD and Linux object files also seem to be almost, but not really,
compatible.
I'm sure all that is old news to gcc people but it has surprised some
people using distcc.
Fortunately gcc has very nice support for having multiple versions
installed at the same time, so by using -b and -V you can avoid the
problems. (Failing that, specify something like "distcc
gcc-x86-linux-2.95.4".)
--
Martin
(please cc me on replies)