In my working environment a firewall is set up that prevents connecting with remote server do do distributed computing with
distcc. Here’s a short note on how I work around it and generally, how my compilation chain is constructed.
First, I setup SSH tunnel to avoid firewall restrictions:
ssh SERVER -L 3633:localhost:3632
and run a build on the local machine
DISTCC_HOSTS='localhost:3633' CCACHE_PREFIX='distcc' CXX='ccache g++' make -j8
The compilation chain is as follow:
ccacheis run instead of
ccachechecks if it has a locally (on the client) cached version of compilation result. If so, the result is returned.
- If not,
distccis called and performs compilation on the
- Compilation result is stored in
ccache’s cache and “returned back”.