MrE
MrE

Reputation: 20838

debugging distcc: no job seems to run on slave

First, my ultimate goal is to cross compile OpenCV for arm so I have tried 2 approaches, but no success so far.

This question is related to using distcc for compiling, using the target to run the make command but taking advantage of a beefy server to speed things up.

Basically, the target doesn't seem to be sending jobs to the slave server.

I installed distcc on both machines (apt-get install distcc)

As I understand it, the daemon only needs to run on the slave. I set up hosts in /etc/distcc/hosts: In that file I have the IPs of both the target at 192.168.10.45 and slave at 192.168.10.34

I run the daemon with

distccd --daemon --allow 192.168.10.45

to allow the target

with ps aux | grep distcc

I can see the 32 instances of distccd running.

If I use

netstat -pant | grep distcc

I see the daemon listening

Now, if I tail the log file at /var/log/distccd.log, there is nothing there, and nothing happening

When I run a job on the target with

make -j33 CC=distcc

it seems to run fine, but I see nothing happening on the slave

ufw is disabled, the 2 machines ping and can talk to each other via ssh.

What am I missing here?

Upvotes: 1

Views: 2061

Answers (2)

dagelf
dagelf

Reputation: 1739

Did you run:

sudo update-distcc-symlinks

The official installation documentation currently omits this step. I had the same symptoms and had some trouble finding the log, but eventually saw that I had to specify logging in an environment variable:

DISTCCD_OPTS="${DISTCCD_OPTS} --log-file /dev/shm/distccd.log"  

Which said:

(dcc_warn_masquerade_whitelist) CRITICAL! /usr/local/lib/distcc not found. You must see up masquerade (see distcc(1)) to list whitelisted compilers or pass --enable-tcp-insecure. To set up masquerade automatically run update-distcc-symlinks.

Upvotes: 0

Leon
Leon

Reputation: 32554

  1. You must define the list of compilation hosts (through the /etc/distcc/hosts file or through the DISTCC_HOSTS environment variable) on the master (target) machine. Check the host list by running on the master distcc --show-hosts.

  2. Specify distcc as a compiler for C++ as well:

    make -j33 CC=distcc CXX=distcc
    

Upvotes: 1

Related Questions