Thoughts on cross-distcc

I realize that I’m not the first person to cross-compile with distcc. Hell, I’m not even the first person to suggest doing it on the Pi. But it wasn’t in common use, at least not as far as I could tell, and I’m coming to love the technique.

I didn’t buy a Pi to play with different build methods (though it does seem that’s all I’ve done with it since it arrived). I bought it to do projects, and I got bored waiting on native compiles, especially when they didn’t succeed for one reason or another.


Astrophotography is one of those things I’ve had in the back of my mind for years, but have never wanted to sink a large chunk of time or money into. But it’s influenced my purchases over the years.

When I bought a telescope, I bought a guided one that could attach to a camera. When I bought a camera, you bet it was compatible with my scope.

When the Pi came along, one of the things that occurred to me was how great it would be to use as a guidance computer for a piece of software known as “PHD“. They already had an open-source version for Linux so getting it running on the Raspberry Pi should just be a simple matter of cross-compiling it for the ARM.

Building it natively probably would have worked just fine, but I hate HATE HATE waiting on builds when I know there’s a faster way, so I started down the path of cross-compiling it using LTIB.

Well, PHD is an X program, with lots of dependencies. After a few hours of getting my 3rd or 4th X library updated and cross-compiling, it was apparent that I was headed down the wrong path.

Using cross-distcc

After I hit on the idea to use distcc with a cross compiler, it occurred to me that I had probably found what I was looking for: faster builds without the headaches associated with cross-compiling.

I attempted to build the open-phd source on the Pi, installing those packages that were pre-built, and compiling those for which no package was available. (A funny moment occurred when I was building the NASA-written imaging library libcftsio and it complained that I didn’t have a FORTRAN compiler installed on the Pi.)

30 minutes later, I was running the program on the Pi.

Now this is why I bought a Pi.

Time to get to work.