Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Build Instructions

Dependencies:

  • LLVM 2.9
  • cmake 2.6+
  • libconfig
    • Need to install from source? Use './configure --prefix=/usr' to configure libconfig, otherwise you will get the error 'can't find libconfig++.so.8' from ldc
    • For MacOS you can use libconfig-hr from MacPorts
    • Beware, there are other libraries with the same name.
    • 1.4.7 is fine (maybe?)
  • GNU make (not the default on FreeBSD, use gmake)
  • optional: Hans Boehm GC 7.0 (direct download link) (for ldc itself, works, but needs special treatment #49)
  • optional: Faster build of llvm and ldc with make -j N, where N is number of processor cores + 1.

Download, Compile and install LLVM 2.9:

wget http://llvm.org/releases/2.9/llvm-2.9.tgz
tar -xvzf llvm-2.9.tgz
mkdir llvm-obj
cd llvm-obj
../llvm-2.9/configure --enable-optimized --enable-assertions
make
su -c 'make install'
cd ..

Grab LDC from the Mercurial repository:

hg clone http://bitbucket.org/lindquist/ldc

Generate the makefiles

cd ldc
ccmake ./

Now press 'c' as often as necessary and then 'g' to exit ccmake. You can set D_VERSION to 1 or 2 to build LDC with D1 or D2 language support.

Note:

  • If you have libconfig installed in /usr/local/lib, you also need to set LIBCONFIG_LDFLAGS="-L/usr/local/lib -lconfig++" in advanced options of ccmake (while configuring, press 't', scroll down).
  • If you are a Debian user, the ccmake command comes in the cmake-curses-gui package, so you have to get that too or just use plain cmake.
  • On FreeBSD/Solaris, use gmake instead of make.

Compile ldc

make
Copyright © 2008, LDC Development Team.