This HOW-TO explains a quick and easy way to speed up NetBSD pkgsrc compiling on retrocomputers. It was written because there are altogether too many distcc how-tos which are complex, require special build environments or make assumptions without explaining what's going on and why. This is my attempt to simplify the process.

So let's say you're a retrocomputing aficionado who enjoys running modern Unix on classic hardware. You're running NetBSD (after all, it's one of very few OSes which doesn't treat alternate architectures with disdain) but you cringe whenever Perl is updated because it'll take something like a week to update everything on your m68030. Sure, you already know how to crosscompile the OS, but that doesn't work for pkgsrc packages. On the other hand, you're not one to knowingly run insecure software, so waiting for binary packages for your platform isn't an option.

This guide will help you set up distcc to distribute pkgsrc compile tasks to another machine over your network.

These days you can pick up a Raspberry Pi for $40 USD, a BeagleBone Black for $50 or a PogoPlug for $20 or less. I like PogoPlugs because they're physically robust and are really hard to accidentally unplug, whereas if you sneeze the wrong way around a Pi you might be waiting for it to finish a reboot (Ok, it's not really that bad, but you get the point). Or you can use pretty much any relatively modern BSD or GNU/Linux with NetBSD's source tree to set up a cross compile toolchain to help any machine which can run NetBSD.

Compared with an m68k NeXT or a VAXstation 3100, a Raspberry Pi is ridiculously fast. Considering the size, cost and amount of electrical power used, you may even decide to dedicate a PogoPlug or a Pi to your help your retrocomputer. You can even support multiple different architectures at the same time on one helper computer.

Regardless of what hardware and OS you choose, we'll assume you know how to install packages on your OS and that you can fetch a NetBSD source tree via your preferred method with help from here:

The NetBSD source tree should be of the same or similar branch as you're running on your retrocomputer (which can be NFS shared since you'll only need it for a little while). We'll assume that NetBSD sources are in /usr/src.

In my examples I'm using a PogoPlug Mobile with a rather modest 16 gig USB flash drive. It has an 800 MHz StrongARM (Kirkwood ARMv5), 128 megs of memory and gigabit ethernet and cost $14 USD when Radio Shack still had them. See my article on how to install NetBSD without needing a serial console if you're interested here: Install NetBSD on a PogoPlug

The retrocomputer this machine will assist is a VAXstation 4000/60 with 56 megs of memory. I'll refer to them as retro and modern. retro in these examples is at and modern is at

Start by installing devel/distcc from pkgsrc on both retro and modern machines (or use whatever package method you like to install distcc if you're running GNU/Linux or something else). If you'd prefer to use distcc 3.2rc1 instead of 3.1, remove patches/patch-ad, patches/patch-src_emaillog.c and patches/patch-src_dotd.c, then change PKGREVISION in Makefile to 0 and DISTCC_VERSION to 3.2rc1 in Makefile.common, then run make with NO_CHECKSUM=yes.

While that's running, we'll compile a toolchain targetting retro on modern using NetBSD's The locations below are chosen simply because they're easy to remember. Here's how we make a VAX toolchain. In /usr/src/:

./ -O /usr/obj-vax -T /usr/tools -m vax tools

Note that in this case, "vax" is the same for both machine and architecture. If running m68k, you'd select a machine (-m) name such as sun3, netx68k, mac68k or amiga, not m68k, but the path would end up being /usr/tools/m68k--netbsdelf/bin/.

A little while later you'll have everything you need in /usr/tools/. If you look in /usr/tools/bin/, you'll see vax--netbsdelf-c++, vax--netbsdelf-gcc and...

Read more »