Thread overview
Some real hardships into building druntime on windows
Mar 10, 2022
Hipreme
Mar 11, 2022
forkit
Mar 11, 2022
forkit
March 10, 2022

https://wiki.dlang.org/Building_under_Windows#Building_DRuntime

I'm following this wiki for trying to build my own. So, for adapting things to my own directory, I made the batch script as:

call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x64

set MAKE="%CD%\make.exe"

cd druntime

set VCDIR="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC"

%MAKE% -f win64.mak "VCDIR=%VCDIR%" target

The output from the dmd's make, is:

"Error: don't know how to make 'Files'"

I'm not using the -j4 flag, because it says the flag is not supported.

Which is actually happening because of the argument "VCDIR=%VCDIR%", even though I set the VCDIR using quotations.

If I try to build phobos, I get something like

"Error: don't know how to make 'target'".

I'm using the make Digital Mars Make Version 5.06 Copyright (C) Digital Mars 1985-2012. All Rights Reserved.

An intentionally older version, as the DMD's make is not released on every build, I got it from the archive. Don't we have any kind of alternative to that make? Make is like already an alien on window's system, it mess up with PATH if someone has msys2 on the PC as "make" is a common name, like, it could be "dmdmake" or something like that.

I got some really nice options:

1- Maybe a dedicated tab on the downloads page could be nice.
2- A newer build system because make on windows is a joke.
3- Dub?

March 11, 2022
On Thursday, 10 March 2022 at 14:22:06 UTC, Hipreme wrote:
>


I had to revert to v2.098.1 to compile the source, as the latest release (v2.099) causes some problems when compiling druntime (on Windows):

my batch file is:

---------------------
@echo off
@call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 %*

d:

cd D:\Dsource\dmd
rdmd src/build.d clean
rdmd src/build.d -v

cd D:\Dsource\druntime
C:\DMC\dm\bin\make -f win64.mak clean
C:\DMC\dm\bin\make -f win64.mak

cd D:\Dsource\phobos
C:\DMC\dm\bin\make -f win64.mak clean
C:\DMC\dm\bin\make -f win64.mak


pause
--------------

..\dmd\generated\windows\release\64\dmd -conf= -c -o- -Isrc -Iimport -Hfimport\core\sync\condition.di src\core\sync\condition.d
src\core\sync\condition.d(460): Error: template instance `op!("-=", int, int)` cannot resolve forward reference
src\core\sync\condition.d(476): Error: template instance `op!("+=", int, int)` cannot resolve forward reference
src\core\sync\condition.d(482): Error: template instance `op!("-=", int, int)` cannot resolve forward reference
src\core\sync\condition.d(228): Error: template instance `core.sync.condition.Condition.timedWait!(Condition)` error instantiating
src\core\sync\condition.d(213):        instantiated from here: `wait!(Condition)`
src\core\atomic.d(565): Error: incompatible types for array comparison: `string` and `string`
src\core\atomic.d(580): Error: incompatible types for array comparison: `string` and `string`
src\core\atomic.d(584): Error: incompatible types for array comparison: `string` and `string`
src\core\atomic.d(588): Error: incompatible types for array comparison: `string` and `string`
src\core\atomic.d(602): Error: static assert:  "Operation not supported."
src\core\sync\condition.d(417):        instantiated from here: `atomicOp!("+=", int, int)`
src\core\sync\condition.d(428):        instantiated from here: `op!("+=", int, int)`
src\core\sync\condition.d(228):        instantiated from here: `timedWait!(shared(Condition))`
src\core\sync\condition.d(219):        instantiated from here: `wait!(shared(Condition))`





March 11, 2022
On Friday, 11 March 2022 at 02:18:33 UTC, forkit wrote:
>

and these are the values in my win64.mak files:


VCDIR=C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.27.29110

SDKDIR=C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0

BINDIR=$(VCDIR)\bin\Hostx64\x64

CFLAGS=/Z7 /I"$(VCDIR)"\INCLUDE /I"$(SDKDIR)"\Include