forked from ldc-developers/ldc
-
Notifications
You must be signed in to change notification settings - Fork 0
Build from Sources for Linux FreeBSD
mwarning edited this page Oct 12, 2011
·
1 revision
This site is under construction!
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 linkh) (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 [http://www.digitalmars.com/d/1.0/index.html 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 thecmake-curses-gui
package, so you have to get that too or just use plaincmake
. - On FreeBSD/Solaris, use gmake instead of make.
Compile ldc {{{ make }}}