[distcc] redeclared symbol error

Martin Pool mbp at sourcefrog.net
Thu Jun 30 02:47:52 GMT 2005

Hi Lee,

On 30 Jun 2005, Lee Adamson <lee at macquarie.com.au> wrote:

> OK, I have two compilers here. 
> One is a Solaris native compiler (works fine), the other is a Solaris to Linux 
> cross compiler (errors).  Both compilers exist on all machines.

OK, this is a bit puzzling.  Your makefile is trying to run 

  /opt/gcc/distcc-2.18/bin/distcc /opt/gcc/cross/i686-pc-linux-gnu/bin/g++

on the Solaris machine.  This should cause it to run i686-pc-linux-gnu
locally first to preprocess the source.  But that's a i686-linux hosted
compiler, so it probably won't run on Solaris.  (Or is there some kind
of emulation layer in effect?)

What happens if on the Solaris machine you try to directly run 

  /opt/gcc/cross/i686-pc-linux-gnu/bin/g++ -c hello1.cc


To avoid any complications from parallel builds we can force one build
remotely with

  DISTCC_HOSTS=qad25 /opt/gcc/distcc-2.18/bin/distcc \
  /opt/gcc/cross/i686-pc-linux-gnu/bin/g++ \
  -c hello1.cc

Anyhow, what you need is one path that runs the right version of the
compiler on each machine.  For example you could have
/usr/local/bin/solaris-g++-4.0 which is a cross compiler on i686 and a
native compiler on sun.  Alternatively you can set the PATH to find the
native compiler on Sun, set DISTCCD_PATH when running the daemon on
i686, and not use an absolute name.


More information about the distcc mailing list