welcome: please sign in
location: Installation

Installation

General installation

Use this if there's no system specific installation guide for your system.

See here.

System specific installation

Windows

If you need to install GDC on Windows, here is a guide to install GDC with MinGW.

For 64-bit MinGW see here.

If that does not work for you on Windows, take a look at this guide for using GDC on Windows.

Android

An initial Android port is available, but development is paused for now and the code is in early alpha (read useless) state. See here for more information.

Raspberry Pi

Guides for some Raspberry Pi linux distributions are located here

Debian/Ubuntu Linux

The following instructions have been tested on 64-bit Debian (unstable) with the gdc-4.7 branch of GDC (git).

Due to Debian's (and by extension, Ubuntu's) multi-arch directory structure, the pristine GCC sources will most likely fail to build because the scripts can't find certain files in the expected locations. While it is possible to patch the GCC sources by hand, this is error-prone and requires the know-how beforehand. A better solution is to use Debian's own patched sources:

For Ubuntu Raring and equivalent Debian:

   1 export GDCGITREP=~/github/gdc #the folder where you did clone the gdc git repository
   2 pushd . && cd $GDCGITREP
   3 git checkout gdc-4.7 #assume that installation starts in the folder where gdc git repository is cloned
   4 git pull #uses the latest version
   5 sudo apt-get build-dep gcc-4.7  #installs development packages required by the build
   6 cd /usr/src && sudo apt-get source gcc-4.7     #this installs the GCC tarballs in /usr/src/gcc-4.7-4.7.3
   7 cd /usr/src/gcc-4.7-4.7.3
   8 sudo sed -i 's/^.*debian_patches += gcc-d-lang.*/#debian_patches += gcc-d-lang/' debian/rules.patch #removes the line "debian_patches += gcc-d-lang" in debian/rules.patch
   9 sudo debian/rules clean
  10 sudo debian/rules patch         #this unpacks the GCC tarballs in src/ and applies the Debian patches needed to make multiarch work
  11 cd $GDCGITREP && sudo ./setup-gcc.sh /usr/src/gcc-4.7-4.7.3/src
  12 cd ..
  13 mkdir objdir
  14 cd objdir
  15 /usr/src/gcc-4.7-4.7.3/src/configure --enable-languages=d --disable-multilib --disable-bootstrap --prefix=/usr #multilib should be disabled as that breaks for some reason
  16 make -j #and wait
  17 sudo make install

For Ubuntu Saucy and equivalent Debian:

   1 export GDCGITREP=~/github/gdc #the folder where you did clone the gdc git repository
   2 pushd . && cd $GDCGITREP
   3 git checkout gdc-4.8 #assume that installation starts in the folder where gdc git repository is cloned
   4 git pull #uses the latest version
   5 sudo apt-get build-dep gcc-4.8  #installs development packages required by the build
   6 cd /usr/src && sudo apt-get source gcc-4.8     #this installs the GCC tarballs in /usr/src/gcc-4.8-4.8.1
   7 cd /usr/src/gcc-4.8-4.8.1
   8 sudo sed -i 's/^.*debian_patches += gcc-d-lang.*/#debian_patches += gcc-d-lang/' debian/rules.patch #removes the line "debian_patches += gcc-d-lang" in debian/rules.patch
   9 sudo debian/rules clean
  10 sudo debian/rules patch         #this unpacks the GCC tarballs in src/ and applies the Debian patches needed to make multiarch work
  11 cd $GDCGITREP && sudo ./setup-gcc.sh /usr/src/gcc-4.8-4.8.1/src
  12 cd ..
  13 mkdir objdir
  14 cd objdir
  15 /usr/src/gcc-4.8-4.8.1/src/configure --enable-languages=d --disable-multilib --disable-bootstrap --prefix=/usr #multilib should be disabled as that breaks for some reason
  16 make -j #and wait
  17 sudo make install

Cross compiling

See Cross Compiler.

After the installation

You might want to run the test suite, see Test suite

Installation (last edited 2013-06-07 11:37:06 by eles)