[distcc] Wrapper for different GCC versions.

Daniel Beecham joshu at goobah.org
Wed Aug 27 14:53:55 GMT 2008


Fergus Henderson wrote:
> On Tue, Aug 26, 2008 at 3:05 PM, Daniel Beecham <joshu at goobah.org> wrote:
>
>   
>> Hi there everyone.
>> First post here, so to introduce me, I'm Daniel. :-)
>>
>> I have three computers, a Gentoo hardened server, a Gentoo desktop and a
>> Gentoo laptop. All run core2duo, but i don't want to give the server
>> anything unstable, like the gcc 4.3.
>>
>> Well, anyway, i've compiled gcc 4.3 (called via /usr/bin/gcc-4.3.1), and i
>> want everything compiled by the server (for the laptop/desktop) via distcc
>> to be of that version. Searching, i've found (
>> http://lists.samba.org/archive/distcc/2006q4/003468.html) a previous mail
>> by this mailing list where Patrick shows his way of doing it. Here's how it
>> looks for me (thank you, Patrick):
>>
>> sh-3.2# cd /usr/lib/distcc/bin/
>> sh-3.2# ls -la
>> total 16
>> drwxr-xr-x 3 root   root 4096 Aug 26 20:05 .
>> drwxr-xr-x 3 root   root 4096 Aug 26 13:04 ..
>> drwxr-xr-x 2 root   root 4096 Aug 26 15:30 .backup
>> -rw-r--r-- 1 distcc  240    0 Aug 26 15:13 .keep_sys-devel_distcc-0
>> lrwxrwxrwx 1 root   root    7 Aug 26 15:28 c++ -> wrapper
>> lrwxrwxrwx 1 root   root    7 Aug 26 15:28 cc -> wrapper
>> lrwxrwxrwx 1 root   root    7 Aug 26 15:28 g++ -> wrapper
>> lrwxrwxrwx 1 root   root   15 Aug 26 15:30 g++-4.3.1 -> /usr/bin/distcc
>> lrwxrwxrwx 1 root   root    7 Aug 26 15:28 gcc -> wrapper
>> lrwxrwxrwx 1 root   root   15 Aug 26 15:29 gcc-4.3.1 -> /usr/bin/distcc
>> -rwxr-xr-x 1 root   root   60 Aug 26 15:27 wrapper
>> lrwxrwxrwx 1 root   root    7 Aug 26 15:30 x86_64-pc-linux-gnu-c++ ->
>> wrapper
>> lrwxrwxrwx 1 root   root    7 Aug 26 15:30 x86_64-pc-linux-gnu-g++ ->
>> wrapper
>> sh-3.2# cat wrapper
>> #!/bin/bash
>> exec /usr/lib/distcc/bin/g${0:$[-2]}-4.3.1 "$@"
>>
>> But, trying to compile, it tells me the gcc 4.3-only flag -march=core2 is a
>> bad value. (as if it's using gcc 3.4.6. Am i doing something wrong?
>>     
>
>
> Did you add /usr/lib/distcc/bin to the start of your PATH?
> What's the compilation command?
> Which distcc version are you using?
> For debugging, try adding "set -x" (after the #! line) to your bash wrapper
> script, and set DISTCC_VERBOSE=1.
>
>   
Hmm, PATH on the client machine has /usr/lib/distcc/bin at first, aswell 
as the server /etc/profile, however, distcc echoes
something along the lines with "distcc 2.18.3 trace: compiler name is 
x86_64-pc-linux-gnu-gcc, setting PATH="/usr/local/sbin:/usr....". That 
must be the problem. Might i ask where I'm supposed to define the PATH?

Thanks.
Daniel.


More information about the distcc mailing list