forked from ldc-developers/ldc
-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
bioinfornatics edited this page Oct 21, 2011
·
16 revisions
This section will explain how install ldc on your system
- libconfig
- libconfig-devel
- cmake
- gc
- gcc-c++
- gcc
- libconfig
- llvm 2.9
On linux many distribution have already packaged this one, so take it.
Download llvm 2.9
$ wget http://llvm.org/releases/2.9/llvm-2.9.tgz
$ ./configure --prefix=/usr \
--bindir=/usr/bin \
--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib \
--enable-optimized \
--enable-assertions
$ ./configure --prefix=/usr \
--bindir=/usr/bin \
--datadir=/usr/share \
--includedir=/usr/include \
--libdir=/usr/lib64 \
--enable-optimized \
--enable-assertions
make -j9
su -c 'make install'
Now we will build and install ldc as D2 compiler. In first download ldc.
$ git clone git://github.com/ldc-developers/ldc.git
Get druntime and phobos2 for ldc.
$ cd ldc; git submodule init; git submodule update;
By default build ldc as D2 compiler
$ cmake .
$ make -j9 VERBOSE=2 phobos2
$ cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .
$ make -j9 VERBOSE=2 phobos2
$ cmake -DCHROOT_INSTALL_DIR:PATH=${HOME} .
$ make -j9 VERBOSE=2 phobos2
-
LIB_SUFFIX some operating system use /usr/lib64 as lib dir for 64bits libraries like Fedora, Ubuntu ...
In this case -DLIB_SUFFIX=64 - CHROOT_INSTALL_DIR this var could be used at least for 2 case:
- Sometime you have a build's computer and an other computer to install. So on on your build's computer by example you mount in /mnt the root dir of install computer. In this cas set CHROOT_INSTALL_DIR as /mnt
- User install you want install in your home directory so set CHROOT_INSTALL_DIR as ${HOME}
- BUILD_SHARED_LIBS you want build as static library turn to OFF: -DBUILD_SHARED_LIBS=OFF
- INCLUDE_INSTALL_DIR if you want add header file in otther directory as default
$ su -c 'make install'