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:

# export GDCGITREP=~/github/gdc #the folder where you did clone the gdc git repository
# pushd . && cd $GDCGITREP
# git checkout gdc-4.7 #assume that installation starts in the folder where gdc git repository is cloned
# git pull #uses the latest version
# sudo apt-get build-dep gcc-4.7  # this installs development packages required by the build
# cd /usr/src && sudo apt-get source gcc-4.7     # this installs the GCC tarballs in /usr/src/gcc-4.7-4.7.3
# cd /usr/src/gcc-4.7-4.7.3
# sudo sed -i 's/^.*debian_patches += gcc-d-lang.*/#debian_patches += gcc-d-lang/' debian/rules.patch # OR, manually edit debian/rules.patch and comment out the line that reads "debian_patches += gcc-d-lang"
# sudo debian/rules clean
# sudo debian/rules patch         # this unpacks the GCC tarballs in src/ and applies the Debian patches needed to make multiarch work
# cd $GDCGITREP && sudo ./setup-gcc.sh /usr/src/gcc-4.7-4.7.3/src
# cd ..
# mkdir objdir
# cd objdir
# /usr/src/gcc-4.7-4.7.3/src/configure --enable-languages=d --disable-multilib --disable-bootstrap --prefix=/usr ... # configure at will, multilib should be disabled as that breaks for some reason
# make -j # and wait
# sudo make install

For Ubuntu Saucy and equivalent Debian:

# export GDCGITREP=~/github/gdc #the folder where you did clone the gdc git repository
# pushd . && cd $GDCGITREP
# git checkout gdc-4.8 #assume that installation starts in the folder where gdc git repository is cloned
# git pull #uses the latest version
# sudo apt-get build-dep gcc-4.8  # this installs development packages required by the build
# cd /usr/src && sudo apt-get source gcc-4.8     # this installs the GCC tarballs in /usr/src/gcc-4.8-4.8.0
# cd /usr/src/gcc-4.8-4.8.0
# sudo sed -i 's/^.*debian_patches += gcc-d-lang.*/#debian_patches += gcc-d-lang/' debian/rules.patch # OR, manually edit debian/rules.patch and comment out the line that reads "debian_patches += gcc-d-lang"
# sudo debian/rules clean
# sudo debian/rules patch         # this unpacks the GCC tarballs in src/ and applies the Debian patches needed to make multiarch work
# cd $GDCGITREP && sudo ./setup-gcc.sh /usr/src/gcc-4.8-4.8.0/src
# cd ..
# mkdir objdir
# cd objdir
# /usr/src/gcc-4.8-4.8.0/src/configure --enable-languages=d --disable-multilib --disable-bootstrap --prefix=/usr ... # configure at will, multilib should be disabled as that breaks for some reason
# make -j # and wait
# 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-05-20 12:21:14 by eles)