Well, it's been a total failure

Anders F Björklund afb at algonet.se
Sun Sep 12 13:31:44 PDT 2010


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.
>    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.
>    c. So, I give up on dmd.

Because DMD is a 32-bit compiler and you have a 64-bit OS install ?
yum whatprovides "gcc(x86-32)" tells (or rpm --aid -Uvh before it).

Currently gcc-4.4.4-10.fc13.i686.rpm provides the dependency, to
use --aid you need rpmdb-fedora and a RPM version that supports it.

> 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.
>    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>.)

This is because Tango (or Phobos) only provides static libraries,
if there had been a shared library it would have been "tango"...

In the previous packaging one of the "runtime" library providers
were required, since the compiler is not very useful without one.

>    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'
>    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
>    e. ldc only supports D v1.
>    f. All of this is too much for me. I give up on ldc.

But LDC is the D compiler that Fedora has chosen for inclusion in 14...
See https://fedoraproject.org/wiki/Features/D_Programming for details.

> 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.

If you use an older GCC, it is much easier. (GCC 4.1.2 was supported)
There's some GDC packages available at http://gdcgnu.sourceforge.net/

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

Seems like you ran into these, all at once:
- 32-bit compiler
- static runtime
- wrong stdlib
- older version
Some of these will be fixed, when/if updated.

--anders


More information about the Digitalmars-d mailing list