digitalmars.D - Guide for dmd development Win64?
- Dicebot (12/12) Aug 02 2014 I have an awkward problem - recently installed an extra Win8
- Orvid King (9/20) Aug 02 2014 I actually use a shell script which I run from git's bash shell. It
- Dicebot (3/12) Aug 03 2014 Hm, I am using Visual Studio Express 2013, does that make any
- Orvid King (4/15) Aug 04 2014 Yep, you'll need to update VCDIR at the top of updateAll.sh to point
- Dicebot (7/10) Aug 04 2014 I had to change much more than that but finally got it to the
- Kapps (19/29) Aug 04 2014 Steps I had to do (coincidentally, just today):
- Kapps (12/42) Aug 04 2014 I forgot, also needed to change from ..\lib to ..\..\phobos as
- Dicebot (8/12) Aug 04 2014 This didn't help because error was coming from cl.exe call ($(CC)
- Dicebot (5/5) Aug 04 2014 Ok finally have managed to compile everything for Windows 8.1 +
- Mike Parker (9/12) Aug 05 2014 To be fair, I frequently build C and C++ projects with MinGW and/or VC
- Dicebot (7/19) Aug 05 2014 I am most frustrated by the fact that they break the path layout
- Johannes Blume (7/27) Aug 05 2014 Normally, you just execute vcvars32.bat/vcvars64.bat before doing
- Dicebot (4/10) Aug 05 2014 If it is only reliable way to get environment prepared, is there
- Orvid King (3/12) Aug 06 2014 I call into a batch file that runs that batch file from my shell script,...
- Dicebot (2/4) Aug 06 2014 It is also needed for druntime / phobos builds.
- Orvid King (2/6) Aug 06 2014 Ah, yes, for those I do set those values explicitly.
- Orvid King (5/10) Aug 05 2014 To solve this, I just cleaned the input directory after installing the
- Dicebot (15/33) Aug 10 2014 I am trying to write down the script routine needed to build all
- Orvid King (3/12) Aug 05 2014 You should have been able to pass VCDIR as a variable directly to the
- Dicebot (4/16) Aug 05 2014 It tries to use VCDIR/bin/x86_amd64 but this dll can be found
- Vlad.imir (2/4) Aug 04 2014 Everybody have to admit that it's quite fun.
I have an awkward problem - recently installed an extra Win8 (x64) OS to test some of weird failures I can't reproduce on Linux and after half a day still can't configure basic development setup for dmd/druntime/phobos >_< This was quite helpful http://wiki.dlang.org/Installing_DMD_on_64-bit_Windows_7_(COFF-compatible) but unfortunately it only covers configuring pre-build dmd distribution package and I can't find anything similar for developers. Can you Windows guys please share how do you get things done? :) I am currently stuck with `make -f win64.mak` in druntime complaining about incompatible dll's.
Aug 02 2014
On 8/2/2014 11:10 AM, Dicebot wrote:I have an awkward problem - recently installed an extra Win8 (x64) OS to test some of weird failures I can't reproduce on Linux and after half a day still can't configure basic development setup for dmd/druntime/phobos >_< This was quite helpful http://wiki.dlang.org/Installing_DMD_on_64-bit_Windows_7_(COFF-compatible) but unfortunately it only covers configuring pre-build dmd distribution package and I can't find anything similar for developers. Can you Windows guys please share how do you get things done? :) I am currently stuck with `make -f win64.mak` in druntime complaining about incompatible dll's.I actually use a shell script which I run from git's bash shell. It updates, builds, and installs DMD, druntime, and phobos. It currently is setup to build a 64-bit DMD with MSVC, and will build and install both the 32 and 64-bit druntime and phobos libraries. The dmd3 directory that I install to is basically a copy of the dmd2 directory created by the installer, except that I've deleted everything except the windows and src folders. https://gist.github.com/Orvid/7b254c307c701318488a
Aug 02 2014
On Saturday, 2 August 2014 at 20:49:12 UTC, Orvid King wrote:I actually use a shell script which I run from git's bash shell. It updates, builds, and installs DMD, druntime, and phobos. It currently is setup to build a 64-bit DMD with MSVC, and will build and install both the 32 and 64-bit druntime and phobos libraries. The dmd3 directory that I install to is basically a copy of the dmd2 directory created by the installer, except that I've deleted everything except the windows and src folders. https://gist.github.com/Orvid/7b254c307c701318488aHm, I am using Visual Studio Express 2013, does that make any difference?
Aug 03 2014
On 8/3/2014 6:58 PM, Dicebot wrote:On Saturday, 2 August 2014 at 20:49:12 UTC, Orvid King wrote:Yep, you'll need to update VCDIR at the top of updateAll.sh to point into the 2013 Visual Studio directory rather than the 2010 directory. (I believe it should be 12.0)I actually use a shell script which I run from git's bash shell. It updates, builds, and installs DMD, druntime, and phobos. It currently is setup to build a 64-bit DMD with MSVC, and will build and install both the 32 and 64-bit druntime and phobos libraries. The dmd3 directory that I install to is basically a copy of the dmd2 directory created by the installer, except that I've deleted everything except the windows and src folders. https://gist.github.com/Orvid/7b254c307c701318488aHm, I am using Visual Studio Express 2013, does that make any difference?
Aug 04 2014
On Monday, 4 August 2014 at 22:48:51 UTC, Orvid King wrote:Yep, you'll need to update VCDIR at the top of updateAll.sh to point into the 2013 Visual Studio directory rather than the 2010 directory. (I believe it should be 12.0)I had to change much more than that but finally got it to the point of actually running `make -f win64.mak` for druntime. There it fails trying to compile errno.c with a system error "mspdb120.dll is missing". Googling for this message finds suggestions to kill "mspdbsrv.exe" process but there is no such process running >_<
Aug 04 2014
On Tuesday, 5 August 2014 at 02:43:13 UTC, Dicebot wrote:On Monday, 4 August 2014 at 22:48:51 UTC, Orvid King wrote:Steps I had to do (coincidentally, just today): 1) Edit win64.mak on druntime / phobos to change from 10.0 to 12.0 for VS, and from v7.0A to v8.1A for SDK directory. 2) Edit sc.ini where it says the mspdb*.dll line, remove the x86_amd64/bin or such and just make it "PATH=%PATH%;%VCINSTALLDIR%\bin\;%VCINSTALLDIR%\..\Common7\IDE". This should fix the error you're having. 3) Edit the tools win32.mak to use -m64 and thus actually be 64-bit. The makefiles don't use a different folder for x86 and x64, so you can't have a 32-bit version of phobos and 64-bit version of phobos at same time, so tools needs to be built for 64-bit. Then I removed everything but ddemangle and rdmd from the targets. Basically, the Windows makefiles are a bit of a mess because they don't allow 32-bit and 64-bit versions at the same time and assume VS2010. After these changes I was successfully able to build the tools repository.Yep, you'll need to update VCDIR at the top of updateAll.sh to point into the 2013 Visual Studio directory rather than the 2010 directory. (I believe it should be 12.0)I had to change much more than that but finally got it to the point of actually running `make -f win64.mak` for druntime. There it fails trying to compile errno.c with a system error "mspdb120.dll is missing". Googling for this message finds suggestions to kill "mspdbsrv.exe" process but there is no such process running >_<
Aug 04 2014
On Tuesday, 5 August 2014 at 03:17:11 UTC, Kapps wrote:On Tuesday, 5 August 2014 at 02:43:13 UTC, Dicebot wrote:I forgot, also needed to change from ..\lib to ..\..\phobos as the lib path in sc.ini. That is: [Environment64] LIB="% P%\..\..\phobos\" My directory layout is dmd dmd druntime phobos tools And my sc.ini looks like http://pastie.org/9445982.On Monday, 4 August 2014 at 22:48:51 UTC, Orvid King wrote:Steps I had to do (coincidentally, just today): 1) Edit win64.mak on druntime / phobos to change from 10.0 to 12.0 for VS, and from v7.0A to v8.1A for SDK directory. 2) Edit sc.ini where it says the mspdb*.dll line, remove the x86_amd64/bin or such and just make it "PATH=%PATH%;%VCINSTALLDIR%\bin\;%VCINSTALLDIR%\..\Common7\IDE". This should fix the error you're having. 3) Edit the tools win32.mak to use -m64 and thus actually be 64-bit. The makefiles don't use a different folder for x86 and x64, so you can't have a 32-bit version of phobos and 64-bit version of phobos at same time, so tools needs to be built for 64-bit. Then I removed everything but ddemangle and rdmd from the targets. Basically, the Windows makefiles are a bit of a mess because they don't allow 32-bit and 64-bit versions at the same time and assume VS2010. After these changes I was successfully able to build the tools repository.Yep, you'll need to update VCDIR at the top of updateAll.sh to point into the 2013 Visual Studio directory rather than the 2010 directory. (I believe it should be 12.0)I had to change much more than that but finally got it to the point of actually running `make -f win64.mak` for druntime. There it fails trying to compile errno.c with a system error "mspdb120.dll is missing". Googling for this message finds suggestions to kill "mspdbsrv.exe" process but there is no such process running >_<
Aug 04 2014
On Tuesday, 5 August 2014 at 03:17:11 UTC, Kapps wrote:2) Edit sc.ini where it says the mspdb*.dll line, remove the x86_amd64/bin or such and just make it "PATH=%PATH%;%VCINSTALLDIR%\bin\;%VCINSTALLDIR%\..\Common7\IDE". This should fix the error you're having.This didn't help because error was coming from cl.exe call ($(CC) in makefile), not from dmd. However doing `export PATH=$PATH:"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin"` before running make has fixed it. This is terribly awkward actually - visual studio console tools do not seem to resolve own paths correctly out of the box :X Figuring out Phobos now.
Aug 04 2014
Ok finally have managed to compile everything for Windows 8.1 + Visual C++ Express 2013 and I am very very happy that I do Linux programming for a living. Will make a bash script to do all this similar to one provided by Orvid, ~ by next weekend.
Aug 04 2014
On 8/5/2014 1:09 PM, Dicebot wrote:Ok finally have managed to compile everything for Windows 8.1 + Visual C++ Express 2013 and I am very very happy that I do Linux programming for a living.To be fair, I frequently build C and C++ projects with MinGW and/or VC without needing to jump through any hoops, since most projects these days either build with a build tool like Premake/CMake/(Take Your Pick) or provide a number of Makefiles for different compiler configurations. DMD's build system on Windows is just masochistic. --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
Aug 05 2014
On Tuesday, 5 August 2014 at 08:40:00 UTC, Mike Parker wrote:On 8/5/2014 1:09 PM, Dicebot wrote:I am most frustrated by the fact that they break the path layout between Visual Studio releases for no reason and that cl.exe can't find own basic dll out of the box without explicit path hint. This has nothing to do with DMD build system - I can only blame latter for no paying for every single Windows / Visual Studio version out there to test path compatibility.Ok finally have managed to compile everything for Windows 8.1 + Visual C++ Express 2013 and I am very very happy that I do Linux programming for a living.To be fair, I frequently build C and C++ projects with MinGW and/or VC without needing to jump through any hoops, since most projects these days either build with a build tool like Premake/CMake/(Take Your Pick) or provide a number of Makefiles for different compiler configurations. DMD's build system on Windows is just masochistic.
Aug 05 2014
On Tuesday, 5 August 2014 at 17:19:03 UTC, Dicebot wrote:On Tuesday, 5 August 2014 at 08:40:00 UTC, Mike Parker wrote:Normally, you just execute vcvars32.bat/vcvars64.bat before doing anything from the command line and you are set. Even make scripts I created five years ago for VS2008 still work without a hitch on VS2013 without any manual PATH trickery. The detailed directory layout of VS is not something makefiles are supposed to know about.On 8/5/2014 1:09 PM, Dicebot wrote:I am most frustrated by the fact that they break the path layout between Visual Studio releases for no reason and that cl.exe can't find own basic dll out of the box without explicit path hint. This has nothing to do with DMD build system - I can only blame latter for no paying for every single Windows / Visual Studio version out there to test path compatibility.Ok finally have managed to compile everything for Windows 8.1 + Visual C++ Express 2013 and I am very very happy that I do Linux programming for a living.To be fair, I frequently build C and C++ projects with MinGW and/or VC without needing to jump through any hoops, since most projects these days either build with a build tool like Premake/CMake/(Take Your Pick) or provide a number of Makefiles for different compiler configurations. DMD's build system on Windows is just masochistic.
Aug 05 2014
On Tuesday, 5 August 2014 at 21:48:40 UTC, Johannes Blume wrote:Normally, you just execute vcvars32.bat/vcvars64.bat before doing anything from the command line and you are set. Even make scripts I created five years ago for VS2008 still work without a hitch on VS2013 without any manual PATH trickery. The detailed directory layout of VS is not something makefiles are supposed to know about.If it is only reliable way to get environment prepared, is there any reason we shouldn't require running `make -f win*.mak` from it instead of trying to configure all paths manually?
Aug 05 2014
On 8/5/2014 10:20 PM, Dicebot wrote:On Tuesday, 5 August 2014 at 21:48:40 UTC, Johannes Blume wrote:I call into a batch file that runs that batch file from my shell script, which then calls msbuild to actually build DMD.Normally, you just execute vcvars32.bat/vcvars64.bat before doing anything from the command line and you are set. Even make scripts I created five years ago for VS2008 still work without a hitch on VS2013 without any manual PATH trickery. The detailed directory layout of VS is not something makefiles are supposed to know about.If it is only reliable way to get environment prepared, is there any reason we shouldn't require running `make -f win*.mak` from it instead of trying to configure all paths manually?
Aug 06 2014
On Wednesday, 6 August 2014 at 14:09:43 UTC, Orvid King wrote:I call into a batch file that runs that batch file from my shell script, which then calls msbuild to actually build DMD.It is also needed for druntime / phobos builds.
Aug 06 2014
On 8/6/2014 3:56 PM, Dicebot wrote:On Wednesday, 6 August 2014 at 14:09:43 UTC, Orvid King wrote:Ah, yes, for those I do set those values explicitly.I call into a batch file that runs that batch file from my shell script, which then calls msbuild to actually build DMD.It is also needed for druntime / phobos builds.
Aug 06 2014
On 8/4/2014 10:17 PM, Kapps wrote:3) Edit the tools win32.mak to use -m64 and thus actually be 64-bit. The makefiles don't use a different folder for x86 and x64, so you can't have a 32-bit version of phobos and 64-bit version of phobos at same time, so tools needs to be built for 64-bit. Then I removed everything but ddemangle and rdmd from the targets.To solve this, I just cleaned the input directory after installing the compiled binaries. The makefile for the tools repo would then be compiling against my newly installed dmd/druntime/phobos, which means there shouldn't be any issues.
Aug 05 2014
On Tuesday, 5 August 2014 at 03:17:11 UTC, Kapps wrote:Steps I had to do (coincidentally, just today): 1) Edit win64.mak on druntime / phobos to change from 10.0 to 12.0 for VS, and from v7.0A to v8.1A for SDK directory. 2) Edit sc.ini where it says the mspdb*.dll line, remove the x86_amd64/bin or such and just make it "PATH=%PATH%;%VCINSTALLDIR%\bin\;%VCINSTALLDIR%\..\Common7\IDE". This should fix the error you're having. 3) Edit the tools win32.mak to use -m64 and thus actually be 64-bit. The makefiles don't use a different folder for x86 and x64, so you can't have a 32-bit version of phobos and 64-bit version of phobos at same time, so tools needs to be built for 64-bit. Then I removed everything but ddemangle and rdmd from the targets. Basically, the Windows makefiles are a bit of a mess because they don't allow 32-bit and 64-bit versions at the same time and assume VS2010. After these changes I was successfully able to build the tools repository.I am trying to write down the script routine needed to build all D toolchain in a simple way I am used to. So far I have this : http://wiki.dlang.org/Developing_DMD_/_Phobos_on_Windows_8 It relies on vcvars.bat instead of defining full paths everywhere and results in small development environment contained in a single folder. dmd, druntime and phobos build without problems (though dmd requires https://github.com/D-Programming-Language/dmd/pull/3866) but when I tried building rdmd.d got interesting linker error: link rdmd,,nul,user32+kernel32/noi; LINK: fatal error LNK1181: cannot open input file 'rdmd,,nul,user32+kernel32/noi;.obj' I have no idea where such garbage linker input may come from. Any suggestions?
Aug 10 2014
On 8/4/2014 9:43 PM, Dicebot wrote:On Monday, 4 August 2014 at 22:48:51 UTC, Orvid King wrote:You should have been able to pass VCDIR as a variable directly to the make command, just as I do for the phobos and druntime builds.Yep, you'll need to update VCDIR at the top of updateAll.sh to point into the 2013 Visual Studio directory rather than the 2010 directory. (I believe it should be 12.0)I had to change much more than that but finally got it to the point of actually running `make -f win64.mak` for druntime. There it fails trying to compile errno.c with a system error "mspdb120.dll is missing". Googling for this message finds suggestions to kill "mspdbsrv.exe" process but there is no such process running >_<
Aug 05 2014
On Tuesday, 5 August 2014 at 17:12:27 UTC, Orvid King wrote:It tries to use VCDIR/bin/x86_amd64 but this dll can be found only in VCDIR/bin - do make it work one either needs to add former to PATH or modify win64.mak to lookup both.I had to change much more than that but finally got it to the point of actually running `make -f win64.mak` for druntime. There it fails trying to compile errno.c with a system error "mspdb120.dll is missing". Googling for this message finds suggestions to kill "mspdbsrv.exe" process but there is no such process running >_<You should have been able to pass VCDIR as a variable directly to the make command, just as I do for the phobos and druntime builds.
Aug 05 2014
This was quite helpful http://wiki.dlang.org/Installing_DMD_on_64-bit_Windows_7_(COFF-compatible)Everybody have to admit that it's quite fun. ^^.
Aug 04 2014