Jump to page: 1 2
Thread overview
Compiling DMD on Windows: A journey of mystery and madness
Aug 21, 2016
NX
Aug 21, 2016
NX
Aug 23, 2016
Jack Stouffer
Aug 21, 2016
Cauterite
Aug 21, 2016
Seb
Aug 21, 2016
Seb
Aug 22, 2016
Walter Bright
Aug 23, 2016
ixid
Aug 23, 2016
Walter Bright
Aug 23, 2016
Meta
Aug 23, 2016
Walter Bright
Aug 23, 2016
Meta
Aug 23, 2016
Seb
Aug 22, 2016
Seb
Aug 21, 2016
ketmar
August 21, 2016
[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.
Before I compile dmd, I attempted to compile druntime & phobos and failed miserably. 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. 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.
August 21, 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

August 21, 2016
On Sunday, 21 August 2016 at 16:41:27 UTC, NX wrote:
> [warning: rant ahead]

Consider using Digger ( https://github.com/CyberShadow/Digger ) in your future attempts to build DMD, to save yourself some trouble. I've had a great experience using it, apart from the dependency on visual studio.
August 21, 2016
On Sunday, 21 August 2016 at 16:41:27 UTC, 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.

There are usually three Makefile posix.mak, win32.mak and win64.mak.
As you might expect it's quite a pain to keep them updated and as core developers on Windows are in the minority, the Windows Makefiles often lack features or have other "mysterious ways".
Imho the best way to deal with this problem is to unify the Makefiles by (a) using a cross-platform build tool like reggae (see [1] for one of the discussions), (b) figure out what commands are possible in a cross-platform way and merge win{32, 64}.mak back to the common Makefile.

[1] http://forum.dlang.org/post/wckshfgkltmmcgmbbitu@forum.dlang.org
August 21, 2016
On Sunday, 21 August 2016 at 16:49:53 UTC, Andrei Alexandrescu wrote:
> On 08/21/2016 12:41 PM, NX wrote:
>> 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.

Actually I just noticed that it *is* actually mentioned: https://wiki.dlang.org/Starting_as_a_Contributor#Windows

This kind of shows how an unstructured doc can result in info-missing by people...
August 21, 2016
On 08/21/2016 12:56 PM, Seb wrote:
> On Sunday, 21 August 2016 at 16:41:27 UTC, 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.
>
> There are usually three Makefile posix.mak, win32.mak and win64.mak.
> As you might expect it's quite a pain to keep them updated and as core
> developers on Windows are in the minority, the Windows Makefiles often
> lack features or have other "mysterious ways".
> Imho the best way to deal with this problem is to unify the Makefiles by
> (a) using a cross-platform build tool like reggae (see [1] for one of
> the discussions), (b) figure out what commands are possible in a
> cross-platform way and merge win{32, 64}.mak back to the common Makefile.
>
> [1] http://forum.dlang.org/post/wckshfgkltmmcgmbbitu@forum.dlang.org

How does the makefile unification help the lack of documentation? -- Andrei
August 21, 2016
On Sunday, 21 August 2016 at 18:57:25 UTC, Andrei Alexandrescu wrote:
> On 08/21/2016 12:56 PM, Seb wrote:
>> On Sunday, 21 August 2016 at 16:41:27 UTC, 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.
>>
>> There are usually three Makefile posix.mak, win32.mak and win64.mak.
>> As you might expect it's quite a pain to keep them updated and as core
>> developers on Windows are in the minority, the Windows Makefiles often
>> lack features or have other "mysterious ways".
>> Imho the best way to deal with this problem is to unify the Makefiles by
>> (a) using a cross-platform build tool like reggae (see [1] for one of
>> the discussions), (b) figure out what commands are possible in a
>> cross-platform way and merge win{32, 64}.mak back to the common Makefile.
>>
>> [1] http://forum.dlang.org/post/wckshfgkltmmcgmbbitu@forum.dlang.org
>
> How does the makefile unification help the lack of documentation? -- Andrei

because (1) you need less documentation (just one file to document) and (2) the single file will be more tested/bullet-proof.

Anyways sorry about mentioning it - I know that such (a) a change shouldn't be taken lightly and it also may cause additional troubles and (b) it isn't that related to the problem of the poster.
August 21, 2016
On 08/21/2016 03:01 PM, Seb wrote:
> because (1) you need less documentation (just one file to document) and

Wouldn't it be better to optimize documentation for the reader instead of the writer? After all if reading is impaired, that's bound to make the maintainer unhappy even if she has fewer documents to maintain.

> (2) the single file will be more tested/bullet-proof.

How does that work? Aren't step-by-step documents "how to do this on Posix" and "how to do this for Windows" best tested in one environment at a time?

> Anyways sorry about mentioning it - I know that such (a) a change
> shouldn't be taken lightly and it also may cause additional troubles and

What troubles would there be? How were troubles taken into account when the document got modified from its initial Posix-only stance to the current state?

> (b) it isn't that related to the problem of the poster.

NX has noted the information is there, it's just lost exactly because the document is poorly structured. Is that plausible evidence against your assertion?

Please just fix it with no debate. It's mostly a matter of moving Windows-related stuff from this document to another, fresh document. I'm mulling over a big contract for the Foundation. Let me do what I do best. It's the third level this has gotten to my level of consciousness, and that's more than two times too many.


Thanks,

Andrei

August 21, 2016
On Sunday, 21 August 2016 at 16:41:27 UTC, NX wrote:
crybaby. Real Programmers laughs at you. didn't they tell you that programming means "pain" -- that is the reason they starting with the same letter?
August 21, 2016
On 8/21/2016 12:12 PM, Andrei Alexandrescu wrote:
> How does that work? Aren't step-by-step documents "how to do this on Posix" and
> "how to do this for Windows" best tested in one environment at a time?

I know when I'm following step-by-step procedures, I prefer it to be specific to my case, not a catch-all one with callouts for other cases melded in.

« First   ‹ Prev
1 2