Compiling with distcc and ccache

| Comments | No TrackBacks

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:

  1. ccache is run instead of g++.
  2. ccache checks if it has a locally (on the client) cached version of compilation result. If so, the result is returned.
  3. If not, distcc is called and performs compilation on the SERVER.
  4. Compilation result is stored in ccache’s cache and “returned back”.

No TrackBacks

TrackBack URL: http://tu.wesolek.net/cgi-bin/mt/mt-tb.cgi/2

About this Entry

This page contains a single entry by Przemek Wesołek published on September 4, 2009 4:15 PM.

Auto-connecting signal handlers in glademm was the previous entry in this blog.

Perl test in MT is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

OpenID accepted here Learn more about OpenID