Compiling DMD on Windows: A journey of mystery and madness
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Sun Aug 21 09:49:53 PDT 2016
On 08/21/2016 12:41 PM, NX wrote:
> [warning: rant ahead]
>
> I'm amazed by the lack of documentation - or to say it better,
> documentation that works - on how to compile DMD and eventually Phobos.
> Here [https://wiki.dlang.org/Starting_as_a_Contributor#Windows_2] we
> have awfully categorized yet promising information on how to seriously
> compile DMD from source.
"Awfully categorized" is right. The initial step-by-step document I
wrote for Posix got corrupted into this mess.
Folks, I have in two instances asked nicely the authors or anyone else
to fix this mess. I shouldn't need to worry about this stuff. Posix and
Windows interspersed in the same document is not the way to go. Please
fix this once and for all by splitting into two documents: one for Posix
and one for Windows, thanks.
> Before I compile dmd, I attempted to compile druntime & phobos and
> failed miserably.
Hmmm, I'd think dmd would be the first to build. Even the botched
document sequences things that way.
> For God's sake no place in docs say that I need DMC,
> which is something I figured from make error output. I reinstalled dmd
> and this time I checked that box which makes installer automatically
> download and install dmc. After making dmc available from %path%, I was
> able to compile phobos, that seemed too good to be true.
Might be nice to contribute this tidbit to the wiki.
> Then here comes
> the part about compiling dmd:
>
> $ make -fwin32.mak release
> This innocent looking command which supposed to compile dmd failed with
> an error message that killed my brain cells:
> $ run idgen
> $ Error: 'run' not found
>
> WTF? Are we seriously trying to execute "run"? Ohh the horror!
>
> Walking on the edge of going mad, I noticed a horrible detail in
> win32.mak file:
> # D compiler (set with env variable)
> #HOST_DC=dmd
>
> The fact that HOST_DC=dmd is commented out and not being defined as an
> environment variable is shameful to the max.
>
> After fixing make file, I was finally able to compile dmd. Now I want to
> sue D Language Foundation for dealing me mental damage. Thanks for reading.
Thanks for bearing through it. A post will scroll into yesterday's news.
A change to the wiki is the way to go.
Thanks,
Andrei
More information about the Digitalmars-d
mailing list