How to install GDC from source
February 11th, 2009 | linux
I can’t believe there is no package for gdc on Fedora. so I spent forever trying to install it from source. Here is a script if anyone wants it.
1
2
| # On ubuntu run this to install dependencies:
sudo apt-get install build-essential gawk libmpfr-dev libppl7 libppl-c2 libppl-dev libcloog-ppl-dev libc6-dev-amd64 |
1
2
| # On fedora run this to install dependencies:
sudo yum install gcc |
1
2
3
4
5
6
| # Download GCC and GDC
cd ~
mkdir gdc
cd gdc
wget http://downloads.sourceforge.net/dgcc/gdc-0.24-src.tar.bz2
wget ftp://gcc.gnu.org/pub/gcc/releases/gcc-4.1.2/gcc-4.1.2.tar.bz2 |
1
2
3
4
5
6
| # Patch GCC to support D
tar xjf gcc-4.1.2.tar.bz2
cd gcc-4.1.2/gcc/
tar xjf ../../gdc-0.24-src.tar.bz2
cd ..
./gcc/d/setup-gcc.sh |
1
2
3
4
5
| # Build GCC
mkdir da_actual_build
cd da_actual_build
../configure -v --enable-languages=c,d,c++ --prefix=/usr/local --disable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --enable-clocale=gnu --disable-libmudflap --enable-targets=all --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
make |
1
2
| # Install it
sudo make install |
That should do it. Next I will need to install the Tango libraries.
1 comment so far ↓
I love the D programming language!
Leave a Comment