OK, I think I have things sort out.
Before I pack the extensions,
I'd like to hear out your opinions and leave my notes here.
Distcc has various modes: pump TCP, plain TCP, ssh ... etc
I'm using pump mode TCP, I believe it's more favorable in most use case.
I could setup the tce.installed script for that.
However, there are Client/Worker and Server(s)/Volunteer(s), different machine require different setting.
I'm planning to start the TCP daemon as server by default.
This way, folks can build clusters much easier, just load up the compiler and headers, no extra configuration needed.
This is what I use for my pies (Volunteer, pi3).
distccd --daemon --allow 192.168.0.40 --verbose --log-file=/home/tc/distccd.log
To make it more general purpose, I could go:
# touch /var/log/distccd.log
# chmod 666 /var/log/distccd.log
# distccd --daemon --allow 192.168.0.0/24 --allow 192.168.1.0/24 --allow 10.0.0.0/24 --allow 10.1.1.0/24 --verbose --log-file=/var/log/distccd.log
Note that "/24" is a CIDR mask.
For the Worker (pi4)
$ vi ~/.distcc/hosts
localhost
192.168.0.30,lzo,cpp
The ",lzo,cpp" suffix tells distcc to pump for this server.
You don't need that for localhost, it will only slow down the compilation.
For the record, you can limit the job counts (threads) here.
localhost/2
192.168.0.30/2,lzo,cpp
Here, "/2" states job limit, not a CIDR mask
To compile (on pi4):
Export PATH with /usr/lib/distcc (can't post the code because forum error)
Configure like you normally would
pump make -j10
P.S. The internal IP of my pies
Pi3: 192.168.0.30
Pi4: 192.168.0.40
P.P.S. It's faster now that things are sorted
pump make -j10
real 0m 57.49s
user 1m 32.38s
sys 0m 13.43s