# Installing DMD, LDC, Tango and DSSS on (K)Ubuntu Jaunty

For quite a while now, I am using the D programming language, version 1 (I have not looked at D2 yet, it is said to be still rather unstable). Even though I like it very much for its syntactical quality and the language itself is reasonably mature, I must admit that setting up the toolchain correctly can still be a very cumbersome task to do, especially when you are new to D.

This post describes an installation routine that should provide you with a working D development environment containing DMD, LDC, Tango and DSSS on (K)Ubuntu Jaunty. Please note that it assumes your system to be »clean« – if you have already installed any D-related software, it is probably advisable to remove it completely to prevent any problems with, for instance, stale files.

You should now be able to build your D/Tango programs with DMD and DSSS.

I would suggest giving LDC at least a short glance, a fairly young compiler project which leverages LLVM as its code generating backend. It is maturing very quickly and allows you to make use of the various features the LLVM compiler infrastructure provides, the most noticeable probably being its excellent optimization routines. Fortunately, there are current binary packages available at launchpad, so all that is needed to LDC is:

Note that the above commands install a daily snapshot of LDC, which I would recommend to use due to the currently fast development of LDC. In order not to break you Jaunty installation, please do not forget to comment out the official »karmic« repositories (which contain some dependencies for ldc-daily) in your /etc/apt/sources.list and run apt-get update after the installation is completed.

Both compilers are set up to use Tango, do not install Tango via DSSS! If you want to switch compilers, just activate the corresponding profile in /etc/drebuild/default and do not forget to rebuild any D libraries you might have compiled and installed with the old compiler (just run dsss net install … for the ones you installed using DSSS).

Since I wrote this post, Tango received yet another big structural change to its codebase (amongst other changes, the core and user libraries have been merged). Now, you should use the supplied »bob« tool now to build tango. Additionally, Karmic is now stable so you might have to adapt the APT repository-related instructions.