Distributed software compilation for the Raspberry Pi

Lead Image © Brett Giza, 123RF.com

Slices of Pi

Distributed compiling with distcc offloads the CPU-intensive compilation tasks from the Raspberry Pi to other computers, saving you days of time and frustration.

The Pi is wonderful and all, but it is not really ideal for compiling. Try to build anything more complex than a "Hello World" program, and you will lock it up for hours. However, Raspbian runs compiled programs, so how did they get there? Of the several ways to compile programs for the Raspberry Pi, they all, interestingly, involve removing the Rasp Pi's hardware from the equation.

One option is to compile using a tool chain, which is exactly what it says on the box: a series of tools you chain together on a regular non-Rasp Pi computer and through which you pipe the source code of a program. Out the other end pops the compiled version of the program ready for your Pi. The Raspberry Pi Foundation distributes an official tool chain [1].

I can think of two problems with tool chains. First, you need to replicate the Rasp Pi environment by copying over directories to the machine that is going to do the compiling. This, in itself, is not too difficult, but if you come across an unexpected, unmet dependency while compiling, you then have to go back to your Pi, install the packages you need, copy over the directories again, and restart the compile … and you have to do this every time the compile borks.

[...]

Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF

Pages: 8

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Exploring the new Arduino/Genuino 101

    The Arduino 101 only costs $30, but it packs quite a bit more than your regular Arduino board. Learn about the 101's specs and how you can use its onboard gyroscope with a fun, 3D project.

  • Building Raspberry Pi programs on a traditional PC

    The Raspberry Pi is a smart little machine, but you might find it easier to write programs on another computer then copy them to the Raspberry Pi afterwards.

  • Welcome

    Just more than four years ago the first Raspberry Pi was released to overwhelming response. Many people had to wait for their first-generation Pi while production was ramped up to meet the demand. Now you have an entire array of Pis from which to choose, and demand is still so high that you might have to wait for your computer on backorder immediately after a new model is released. Moreover, the quad-core Raspberry Pi 3 has broadened the possibilities of what you can accomplish with the little nanocomputer.

  • Create amazing Pi apps without writing code

    Create super easy Pi programs to turn on lights, speak to you, or control motors.

  • Graphical, Scratch-like programming languages for Arduino

    Getting a handle on Arduino boards can be difficult. Luckily, quite a few block-based, Scratch-like programming environments are at hand that make the learning curve easier to climb.