iii residency – bela cross-compile

17 June 2017

From 10.6.2017 – 24.6.2017 I had the pleasure to be a resident at the instrument inventors initiative (iii) in the Hague. Other posts on the iii residency.

I decided to spend the first week at iii concentrating on software setups. This included updating my Bela-based embedded environment. I was curious on the recent development on the SuperCollider-side there and found out about cross-platform compilation using distcc which massively speeds up the compilation of larger software packages on embedded platforms. Below, I describe the process in more detail, in case someone (me) needs to do this again later-on.

Bela cross compile via distcc


As of writing, the cross-compile gcc is available for OSX here. The package installs the arm-linux libs on your host in


further, you need to install distcc on both host and board:

# host
brew install distcc

# board
apt-get install distcc

Cross-compile SuperCollider

This guide assumes familiarity with the terminal and cmake-based compilation.

Start the demon distccd on your host:

distccd --verbose --no-detach --daemon --allow --log-level error --log-file ~/distccd.log

Optionally, look at the log-file in a separate terminal

tail -f ~/distccd.log

Since SuperCollider uses cmake and this keeps track of previous configuration runs, make sure to remove CMakeCache.txt in your build directory. If you tried before compiling SuperCollider on the BeagleBone, it might be advisable to start “clean slate” with an empty build directory.

On the board (BBB), you need to first export various variables

export DISTCC_HOSTS="" 
export CC="/usr/bin/distcc arm-linux-gnueabihf-gcc" 
export CXX="/usr/bin/distcc arm-linux-gnueabihf-g++"

Then, run cmake with the following flags. This implicitly includes distcc set in the previous shell variables.


Finally, run

make -j8
make install

to build and install SuperCollider. Make sure to glimpse at the log-file every now and then, if there is nothing showing up there while running make, there is something wrong. I found that restarting the demon on the host solves the problem most of the times.

This routine can be easily adapted to compile e.g. the sc3-plugins or FAUST.