Thursday, June 20, 2013

How to install D (dmd) in Fedora

Continuing our "Installing in Fedora" series is dmd, the compiler for the D programming language. Trying to install this in Fedora was a headache, but doable. How much trouble you have will vary but what system you're on.

x86-32
On a 32-bit system, all you need to do is
wget http://downloads.dlang.org.s3-website-us-east-1.amazonaws.com/releases/2013/dmd-2.063.2-0.fedora.i386.rpm
yum install libgcc glibc-devel
rpm -i ./dmd*

x86-64
On 64-bit systems, it gets more complicated. For some reason, you will need the 32-bit libraries (libgcc and glibc-devel) even if you have the 64-bit dependencies installed (which you probably do). The steps now become:
wget http://downloads.dlang.org.s3-website-us-east-1.amazonaws.com/releases/2013/dmd-2.063.2-0.fedora.i386.rpm
yum install libgcc.1686 glibc-devel.1686
rpm -i ./dmd*

Forcing the use of 32-bit packages on a 64-bit system is not recommended, but you shouldn't run into any problems with it. Now you can compile your D files with dmd from the command line.

No comments:

Post a Comment