On 11/09/10 23:52, Vladimir G. Ivanovic wrote:
  I'm running Fedora 13.x86_64 and I've tried various ways of getting a
D compiler to work. None have succeeded.

1. a. I can't install dmd 2.048:

         # rpm -Uvh /downloads/dmd-2.048-0.i386.rpm
         error: Failed dependencies:
            gcc(x86-32)>= 4.2.3 is needed by dmd-2.048-0.i386
    I don't know what package will satisfy this dependency.

I've never used fedora, so I'll skip anything further about rpms.

    b. dmd is a closed compiler. Not good. I'm really not comfortable
running a compiler for which I don't have access to the source. The
risk of undetected malware is too great.

Only the backend is closed, and the source is still available. The front end is dual licensed under the GPL and artistic licenses:

http://www.dsource.org/projects/dmd/browser/trunk/src

    c. So, I give up on dmd.

2. I can't run ldc because
    a. The ldc RPM requires Tango, even though this is not an RPM
dependency for ldc, i.e. you can install ldc without any errors.

Again, I know nothing of RPMs/Fedora, but I can say ldc doesn't require tango - it's just a lot nicer to use if you have a standard library :)

    b. The installation instructions for Fedora on the LDC web site are
incorrect. "yum install ldc" works, but "yum install tango" doesn't.
"yum install tango-devel" is the correct command. (This is the first
time I've heard of<pkg>-devel without a corresponding<pkg>.)
    c. After I've gotten everything installed, it still doesn't work. I get
         $ ldc hello.d
         hello.d(5): Error: module stdio cannot read file 'std/stdio.d'

std is part of phobos, and phobos does not support ldc. A hello world using tango would look like this:
---
import tango.io.Stdout;

void main() {
        Stdout("Hello World!").newline;
}
----
    d. OK, so I link /usr/include/d/tango/stdc to
/usr/include/d/tango/std, but it still doesn't work. I get:
         $ ldc hello.d
         hello.d(8): Error: undefined identifier writefln
         hello.d(8): Error: function expected before (), not writefln
of type int

Again, phobos doesn't support ldc.

    e. ldc only supports D v1.

Correct.

    f. All of this is too much for me. I give up on ldc.

3. I can't get gdc to compile.
    a. First I have to get gcc-4.4.4 to compile, but that requires a 4
year old version of automake. I have to downgrade.
    b. After that's fixed, I'm still running into errors that prevent a
build. The errors change from changeset to changeset. So, I'm giving
up on gdc.

I've only used gdc once, and it was a long time ago - I can't help here. Even then I do know that dmd is the only D compiler that supports D2 currently. Gdc is getting there.

Getting a D compiler to run on x86_64 Linux is too hard. I'm giving up
on D.

Been there, done that :/

I'm posting this message not as a plea for help, but to illustrate how
hard it is to get D to run on Fedora.x86_64. The success of D depends
on high quality, open source compilers being available (my belief),
and so far, D doesn't seem to be mature enough to be considered, at
least on Fedora.x86_64.

This will change most likely when dmd gets 64 bit support - this is progressing rapidly.
--
Robert
http://octarineparrot.com/

Reply via email to