<br><br><div class="gmail_quote">On Mon, Oct 15, 2012 at 7:14 PM,  <span dir="ltr"><<a href="mailto:meino.cramer@gmx.de" target="_blank">meino.cramer@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi,<br>
<br>
My environment:<br>
Two computers:<br>
    a) Desktop PC running Gentoo Linux on a AMD Phenom(tm) II X6 1090T Processor<br>
    b) A beaglebone single board computer running Gentoo Linux on a ARMv7 Processor rev 2 (v7l)<br>
<br>
    a) has the IP-address 192.168.178.21<br>
    b) has the IP-address 192.168.178.25<br>
<br>
The task:<br>
    I want to emerge packages (that is compiling them from source by<br>
    using Gentoo package manager) via "pump emerge".<br>
<br>
The problem:<br>
    It does not work.... ;/<br>
<br>
I followed different howtos from different parts of this century ;)<br>
googled from the net how to accomplish this...but no luck.<br>
Often there was no clear distinction between hot and server.<br>
I also reinstalled distcc several times.<br>
<br>
My current setup is as follows:<br>
I build a cross compiler toolchain on a), the server, named<br>
 armv7a-softfp-linux-gnueabi-*<br>
<br>
On the beaglebone<br>
<br>
    ls -l /usr/lib/distcc/bin<br>
<br>
shows<br>
<br>
    lrwxrwxrwx 1 root root   15 2012-10-15 19:21 armv7a-softfp-linux-gnueabi-c++ -> /usr/bin/distcc<br>
    lrwxrwxrwx 1 root root   15 2012-10-15 19:21 armv7a-softfp-linux-gnueabi-g++ -> /usr/bin/distcc<br>
    lrwxrwxrwx 1 root root   15 2012-10-15 19:21 armv7a-softfp-linux-gnueabi-gcc -> /usr/bin/distcc<br>
    -rwxr-xr-x 1 root root   83 2012-10-14 15:11 armv7a-softfp-linux-gnueabi-wrapper<br>
    lrwxrwxrwx 1 root root   35 2012-10-15 19:38 c++ -> armv7a-softfp-linux-gnueabi-wrapper<br>
    lrwxrwxrwx 1 root root   35 2012-10-15 19:39 cc -> armv7a-softfp-linux-gnueabi-wrapper<br>
    lrwxrwxrwx 1 root root   35 2012-10-15 19:39 g++ -> armv7a-softfp-linux-gnueabi-wrapper<br>
    lrwxrwxrwx 1 root root   35 2012-10-15 19:39 gcc -> armv7a-softfp-linux-gnueabi-wrapper<br>
<br>
and<br>
<br>
    armv7a-softfp-linux-gnueabi-wrapper<br>
<br>
has the contents:<br>
<br>
    #!/bin/bash<br>
    exec /usr/lib/distcc/bin/armv7a-softfp-linux-gnueabi-g${0:$[-2]} "$@"<br>
<br>
<br>
On that machine, the server I started distccd with<br>
<br>
    /usr/bin/distccd --daemon --pid-file /var/run/distccd/distccd.pid --port 3632 --log-file=/tmp/NFS/distcc.solfire.log --log-level critical --allow 192.168.178.25 -N 15<br>
<br>
(the logfile is placed in a directory, which is nfs-mounted on machine<br>
"b" so I have access to the log from both nmachines)<br>
<br>
<br>
On the beaglebone, machine "b", the client, the command<br>
<br>
    distcc-config -get-host<br>
<br>
will print<br>
<br>
    192.168.178.21,cpp,lzo<br>
<br>
and<br>
<br>
    distcc-config --get-log<br>
<br>
will print<br>
<br>
    DISTCC_LOG=/tmp/distcc.log<br>
<br>
Then I wrote a little C-program called test.c and did a<br>
<br>
    pump make test<br>
<br>
, which lead to the following contents of distcc.log:<br>
<br>
distcc[15967] (dcc_trace_version) distcc 3.1 armv7a-softfp-linux-gnueabi; built Oct 15 2012 19:19:29<br>
distcc[15967] (dcc_recursion_safeguard) safeguard level=0<br>
distcc[15967] (main) compiler name is "distcc"<br>
distcc[15967] (dcc_get_hostlist) not reading /root/.distcc/hosts: No such file or directory<br>
distcc[15967] (dcc_parse_hosts_file) load hosts from /etc/distcc/hosts<br>
distcc[15967] (dcc_parse_hosts) found tcp token "192.168.178.21,cpp,lzo"<br>
distcc[15967] (dcc_parse_options) got CPP option<br>
distcc[15967] (dcc_parse_options) got LZO option<br>
distcc[15967] (dcc_exit) exit: code 0; self: 0.000000 user 0.010000 sys; children: 0.000000 user 0.000000 sys<br></blockquote><div><br></div><div>The lines above indicate that you don't have "localhost" in your ,cpp,zlo" </div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
distcc[15967] (dcc_cleanup_tempfiles_inner) deleted 0 temporary files<br>
distcc[15990] (dcc_trace_version) distcc 3.1 armv7a-softfp-linux-gnueabi; built Oct 15 2012 19:19:29<br>
distcc[15990] (dcc_recursion_safeguard) safeguard level=0<br>
distcc[15990] (main) compiler name is "armv7a-softfp-linux-gnueabi-gcc"<br>
distcc[15990] (dcc_set_path) setting PATH=/usr/lib/distcc/bin:/usr/local/bin:/bin/:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/armv7a-softfp-linux-gnueabi/gcc-bin/4.5.4:/root/bin:/root/bin<br>


distcc[15990] (dcc_scan_args) scanning arguments: armv7a-softfp-linux-gnueabi-gcc -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp test.c -o test<br>
distcc[15990] (dcc_scan_args) found input file "test.c"<br>
distcc[15990] (dcc_scan_args) found object/output file "test"<br>
distcc[15990] (dcc_scan_args) compiler apparently called not for compile<br></blockquote><div><br></div><div>That is the critical line which explains why this particular compiler invocation was not distributed to a remote host.  Your makefile ran the command "$(CC) $(CFLAGS) test.c -o test", which does two things: compilation *and* linking.  Distcc does not attempt to distribute linking, it will only distribute compilation.  If you do compilation and linking in a single command, distcc will not attempt to distribute that.</div>

<div><br></div><div>Instead of using a single command that combines compilation and linking</div><div><br></div><div>    $(CC) $(CFLAGS) test.c -o test</div><div><br></div><div>you should use separate commands</div><div>
<br>
</div><div>    $(CC) $(CFLAGS) -c test.c</div><div>    $(CC) $(CFLAGS) test.o -o test</div><div><br></div><div>and then distcc should be able to distribute the compilation command (the first of those two).</div><div><br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
distcc[15990] (dcc_lock_host) got cpu lock on localhost slot 0 as fd4<br>
distcc[15990] exec on localhost: armv7a-softfp-linux-gnueabi-gcc -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp test.c -o test<br>
distcc[15990] (dcc_note_state) note state 5, file "test.c", host "localhost"<br>
distcc[15990] (dcc_spawn_child) forking to execute: armv7a-softfp-linux-gnueabi-gcc -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp test.c -o test<br>
distcc[15990] (dcc_spawn_child) child started as pid15991<br>
distcc[15991] (dcc_increment_safeguard) setting safeguard: _DISTCC_SAFEGUARD=1<br>
distcc[15991] (dcc_trace_version) distcc 3.1 armv7a-softfp-linux-gnueabi; built Oct 15 2012 19:19:29<br>
distcc[15991] (dcc_recursion_safeguard) safeguard: 1<br>
distcc[15991] (dcc_recursion_safeguard) safeguard level=1<br>
distcc[15991] (main) compiler name is "armv7a-softfp-linux-gnueabi-gcc"<br>
distcc[15991] (dcc_set_path) setting PATH=/usr/local/bin:/bin/:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/armv7a-softfp-linux-gnueabi/gcc-bin/4.5.4:/root/bin:/root/bin<br>
distcc[15991] exec on localhost: armv7a-softfp-linux-gnueabi-gcc -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp test.c -o test<br>
distcc[15991] (dcc_note_state) note state 5, file "(NULL)", host "localhost"<br>
distcc[15991] (dcc_spawn_child) forking to execute: armv7a-softfp-linux-gnueabi-gcc -O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp test.c -o test<br>
distcc[15991] (dcc_spawn_child) child started as pid15992<br>
distcc[15992] (dcc_increment_safeguard) setting safeguard: _DISTCC_SAFEGUARD=2<br>
distcc[15991] (dcc_collect_child) cc child 15992 terminated with status 0<br>
distcc[15991] (dcc_collect_child) cc times: user 0.000000s, system 0.000000s, 0 minflt, 0 majflt<br>
distcc[15991] compile (null) on localhost completed ok<br>
distcc[15991] elapsed compilation time 0.443756s<br>
distcc[15991] (dcc_exit) exit: code 0; self: 0.000000 user 0.000000 sys; children: 0.280000 user 0.120000 sys<br>
distcc[15991] (dcc_cleanup_tempfiles_inner) deleted 0 temporary files<br>
distcc[15990] (dcc_collect_child) cc child 15991 terminated with status 0<br>
distcc[15990] (dcc_collect_child) cc times: user 0.000000s, system 0.000000s, 0 minflt, 0 majflt<br>
distcc[15990] compile test.c on localhost completed ok<br>
distcc[15990] (dcc_unlock) release lock fd4<br>
distcc[15990] elapsed compilation time 0.626678s<br>
distcc[15990] (dcc_exit) exit: code 0; self: 0.000000 user 0.010000 sys; children: 0.280000 user 0.120000 sys<br>
distcc[15990] (dcc_cleanup_tempfiles_inner) deleted 0 temporary files<br>
<br>
<br>
Using nmap on the beaglebone with<br>
<br>
    nmap 192.168.178.21 -p 10-32000 gives<br>
<br>
prints:<br>
<br>
Starting Nmap 5.51 ( <a href="http://nmap.org" target="_blank">http://nmap.org</a> ) at 2012-10-15 20:06 CEST<br>
Nmap scan report for noname (192.168.178.21)<br>
Host is up (0.00019s latency).<br>
Not shown: 31987 closed ports<br>
PORT     STATE SERVICE<br>
22/tcp   open  ssh<br>
111/tcp  open  rpcbind<br>
2049/tcp open  nfs<br>
3632/tcp open  distccd<br>
MAC Address: 00:15:F2:18:B0:20 (Asustek Computer)<br>
<br>
therefore distcc is listening on the PC but does not react in any way<br>
-- eberything was compiled on the beaglebone (localhost).<br>
<br>
How can I convince the distccd on the PC to get its job done?<br>
<br>
Thank you very much in advance for any help!<br>
<br>
Best regards,<br>
mcc<br>
<br>
<br>
<br>
__<br>
distcc mailing list            <a href="http://distcc.samba.org/" target="_blank">http://distcc.samba.org/</a><br>
To unsubscribe or change options:<br>
<a href="https://lists.samba.org/mailman/listinfo/distcc" target="_blank">https://lists.samba.org/mailman/listinfo/distcc</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Fergus Henderson <<a href="mailto:fergus@google.com" target="_blank">fergus@google.com</a>></div><div><br></div><div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">"Defend the user, exclude no one, and create magic." -- Eric Schmidt.</span></div>

</div><div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><br></span></div><br>