Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Installation Guide for Tango used with DMD

This page details three ways of installing Tango for DMD on Linux. One of the first two is recommended unless you want to hack Tango itself.

For some, it may make more sense to use DSSS for installation, or use a tool like build/bud or rebuild, the alternatives are suggested at further down on the page.

If you're using Bud as your build program, please read the notes at the bottom of this page.

Install Binary Bundle

  1. Download Tango, one of the .tar.gz options will suffice
  2. Extract the package
  3. If your download is with DMD and you want to install it, back up any previously installed dmd.conf
  4. If you have Phobos installed, and want to install Tango in the same place, back up object.d
  5. Copy the folders import and lib from the extracted folder, and bin for the compiler tool chain, to where you want to install
    • If you have root access to your box, installing to /usr/local is recommended
  6. Make sure your <install path>/bin is part of your PATH and you should be ready to go.


There are two types of installers available for a given release. Which one you choose, depends on your existing setup.

  • Installers for those only wishing to upgrade Tango, but otherwise have a complete system
  • Installers for those wishing to upgrade DMD.
  1. Download a Tango installer.
  2. All installers are shell scripts with an embedded tar.gz and should be made executable once downloaded.
chmod +x <name of installer>.sh
  1. Run the installer. For most setups this will probably require the use of the root account, e.g. by using sudo.
sudo ./<name of installer>.sh
  1. If you don't specify a prefix, the installer will ask if /usr/local is ok, or if you want to specify one.

At this point, Tango and the necessary tooling should be installed.

Manual Build and Install

  1. Download or check out Tango sources.
  2. Enter the Tango directory where the build files are:
    $ cd <tango base>/build
  • At this point you can run with various arguments, to see the instructions do
    $ ./ --help
  1. typically what you want is
    $ ./

that creates the optimized and debug versions of the libraries and installs them

  1. Make .d source files accessible by copying the .d source into this path like so:
    $ cp -Rf <tango base>/user/* <DMD install prefix>/include/d
  1. Update your dmd.conf (either alongside your DMD binary, or in /etc)
    DFLAGS=-I<DMD install prefix>/include/d -defaultlib=tango-base-dmd -debuglib=tango-base-dmd -version=Tango -version=Posix
  1. you can build the unittests with
    $ ./ --version tst
    $ ./


Trouble solving

  • If you use the installer on a clean linux system without DMD previously installed, you will have to make sure libstdc++5 is installed prior to running the Tango installation script, otherwise it will fail.

Using DSSS

DSSS can be used to install Tango, either just the user targeted API, or all of it. All of Tango, including the runtime, can be installed using DSSS' net install feature. Also, if you have installed the runtime, the user API can be installed for use with DSSS by doing

dsss build && dsss install

in the Tango root directory.

Using Rebuild / Bud (build)

This is similar to using DSSS (rebuild is indeed a part of DSSS), but where you instead of installing libraries, give the build tools the path to Tango, having the objects rebuilt when needed by the built application.

Notes on using Build

  1. If you have trouble, be sure your dmd.conf is correct. Note that quotes in the parameter list are probably wrong.
  2. Build on Linux won't correctly process the libraries unless you specify the -op parameter, thus:
    build target.d -op
  3. The clean parameter of build causes it to remove the object files generated prior to linking. If you specify:
    build target.d -clean -op
    then you will have your target executable produced, but target.o will be deleted.

User Comments