www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Building dmd/druntime on windows issue

reply Andre Pany <andre s-e-a-p.de> writes:
Hi,

I follow the instructions from the wiki to build dmd/druntime 
from source on windows.
https://wiki.dlang.org/Building_under_Windows

Building dmd ends with following text:

-------------------
copy ..\generated\windows\release\32\dmd.exe .
         1 file copied.


make -fwin32.mak C=dmd\backend TK=dmd\tk ROOT=dmd\root 
MAKE="make" HOST_DC="dmd" MODEL=32 CC="dmc" LIB="lib" OBJ_MSVC="" 
clean
rmdir /s /q ..\generated
del dmd\msgs.h dmd\msgs.c
C:\D\dmd2\src\dmd\src\dmd\msgs.h cannot be found
del optabgen.exe parser_test.exe example_avg.exe
del ..\generated\windows\release\32\dmd.exe 
..\generated\windows\release\32\dmd_frontend.exe *.map *.obj *.exe
The system cannot find the given path.
-------------------

If my understanding is correct, there are several issues:
- File dmd\msgs.h does not exist
- make deletes path "generated" which is needed in a further step.

There is a file "C:\D\dmd2\src\dmd\src\dmd.exe" created which 
seems to be the build result.

If I now try to build druntime it also fails, because the path 
"generated" does not exist:

-----------------------
..\dmd\generated\windows\release\32\dmd -conf= -c -o- -Isrc 
-Iimport -Hfimport\core\sync\barrier.di src\core\sync\barrier.d
Error: '..\dmd\generated\windows\release\32\dmd' not found
-----------------------

Kind regards
André
May 10 2018
parent reply Seb <seb wilzba.ch> writes:
On Thursday, 10 May 2018 at 18:38:30 UTC, Andre Pany wrote:
 Hi,

 I follow the instructions from the wiki to build dmd/druntime 
 from source on windows.
 https://wiki.dlang.org/Building_under_Windows

 [...]
Which DMD/druntime do you try to build? IIRC there are some issues with the release ball, you should try the GitHub sources. Also are you using DigitalMars make? What environment variables did you set?
May 10 2018
next sibling parent Andre Pany <andre s-e-a-p.de> writes:
On Thursday, 10 May 2018 at 22:01:25 UTC, Seb wrote:
 On Thursday, 10 May 2018 at 18:38:30 UTC, Andre Pany wrote:
 Hi,

 I follow the instructions from the wiki to build dmd/druntime 
 from source on windows.
 https://wiki.dlang.org/Building_under_Windows

 [...]
Which DMD/druntime do you try to build? IIRC there are some issues with the release ball, you should try the GitHub sources. Also are you using DigitalMars make? What environment variables did you set?
I cloned the sources (dmd, runtime ,...) yesterday from github and tried to build the master branches. I used the suggested paths and environment variables from the wiki (DM_HOME, HOST_DC). Also make from Digital Mars was used. In tried to follow the instructions exactly. Kind regards Andre
May 10 2018
prev sibling parent Andre Pany <andre s-e-a-p.de> writes:
On Thursday, 10 May 2018 at 22:01:25 UTC, Seb wrote:
 On Thursday, 10 May 2018 at 18:38:30 UTC, Andre Pany wrote:
 Hi,

 I follow the instructions from the wiki to build dmd/druntime 
 from source on windows.
 https://wiki.dlang.org/Building_under_Windows

 [...]
Which DMD/druntime do you try to build? IIRC there are some issues with the release ball, you should try the GitHub sources. Also are you using DigitalMars make? What environment variables did you set?
I am pretty sure now the WIKI is wrong. The argument "release" in command: make -fwin32.mak release will by intentional delete the folder "generated" https://github.com/dlang/dmd/blob/master/src/win32.mak#L347 But this folder is needed for building druntime as described in wiki chapter "Building D runtime". I somehow solved the issue by calling make without the "release" argument. Either the WIKI needs to be adapted or the make script. Kind regards André
May 12 2018