Bug 14849 – Visual Studio 2015 not detected during installation

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
installer
Product
D
Version
D2
Platform
x86_64
OS
Windows
Creation time
2015-07-30T08:13:09Z
Last change time
2018-03-27T06:06:46Z
Assigned to
No Owner
Creator
Martin Nowak
See also
https://issues.dlang.org/show_bug.cgi?id=14866, https://issues.dlang.org/show_bug.cgi?id=14843

Attachments

IDFilenameSummaryContent-TypeSize
1535vs2013u5_sc.iniVisual Studio Community 2013 with Update 5 + dmd-2.068.0-b2.exetext/plain4233
1536vs2015_sc.iniVisual Studio Community 2015 + dmd-2.068.0-b2.exetext/plain4149
1537diff.sc.iniDiff VS 2013 with 2015 DMD sc.ini filestext/plain4646

Comments

Comment #0 by code — 2015-07-30T08:13:09Z
http://forum.dlang.org/post/[email protected] The VS 2015 Community 2015 installation [2] also includes a complete build system. However, the DMD Windows installer does not recognize it and fails to update the sc.ini file accordingly. I will file a bug report shortly with details.
Comment #1 by code — 2015-07-30T08:14:58Z
Comment #2 by rumbu — 2015-07-30T09:09:43Z
Comment #3 by josephcassman — 2015-07-31T00:35:00Z
Thanks for creating this issue. Attaching three files in case they help with implementation. 1) vs2013u5_sc.ini 2) vs2015_sc.ini 3) diff.sc.ini (1) is the sc.ini file resulting from running the dmd-2.068.0-b2.exe installer after installing Visual Studio Community 2013 with Update 5. The -m64 switch works with DMD in this case. (2) is the sc.ini file resulting from trying the same with Visual Studio Community 2015. This is the fail case. (3) is a diff comparing the 2015 version against the 2013 version.
Comment #4 by josephcassman — 2015-07-31T00:35:59Z
Created attachment 1535 Visual Studio Community 2013 with Update 5 + dmd-2.068.0-b2.exe
Comment #5 by josephcassman — 2015-07-31T00:36:32Z
Created attachment 1536 Visual Studio Community 2015 + dmd-2.068.0-b2.exe
Comment #6 by josephcassman — 2015-07-31T00:37:07Z
Created attachment 1537 Diff VS 2013 with 2015 DMD sc.ini files
Comment #7 by code — 2015-08-03T10:00:16Z
Now that I have VS2015 setup, I get the following link errors for hello world. Can someone help with that? phobos64.lib(stdio_373_566.obj) : error LNK2019: unresolved external symbol _flsbuf referenced in function _fputc_nolock phobos64.lib(dmain2_623_47b.obj) : error LNK2019: unresolved external symbol _set_output_format referenced in function _d_run_main phobos64.lib(dmain2_623_47b.obj) : error LNK2019: unresolved external symbol __iob_func referenced in function _d_run_main phobos64.lib(config_481_452.obj) : error LNK2019: unresolved external symbol _snprintf referenced in function _D2gc6config13__T5parseHTfZ5parseFNbNiAxaKAxaKfZb phobos64.lib(stacktrace_3a9_3e5.obj) : error LNK2001: unresolved external symbol _snprintf phobos64.lib(demangle_1e0_31d.obj) : error LNK2001: unresolved external symbol _snprintf phobos64.lib(config_481_452.obj) : error LNK2019: unresolved external symbol sscanf referenced in function _D2gc6config13__T5parseHTfZ5parseFNbNiAxaKAxaKfZb hello.exe : fatal error LNK1120: 5 unresolved externals --- errorlevel 1120 It seems CRT was changed heavily for VS2015. http://blogs.msdn.com/b/vcblog/archive/2014/06/10/the-great-crt-refactoring.aspx
Comment #8 by code — 2015-08-03T10:21:08Z
Comment #9 by dfj1esp02 — 2015-08-04T09:05:30Z
(In reply to Martin Nowak from comment #7) > Now that I have VS2015 setup, I get the following link errors for hello > world. https://github.com/ldc-developers/druntime/pull/29 ?
Comment #10 by code — 2015-08-09T08:15:05Z
Comment #11 by r.sagitario — 2015-10-27T07:28:04Z
fixed in dmd 2.069
Comment #12 by rumbu — 2015-11-04T09:25:50Z
UM path is incorrect UCRTVersion=10.0.10150.0 [...] LIB=%LIB%;"%UniversalCRTSdkDir%\Lib\%UCRTVersion%\um\x86" (wrong) LIB=%LIB%;"%UniversalCRTSdkDir%\Lib\%UCRTVersion%\ucrt\x86" The correct approach is: UCRTVersion=10.0.10150.0 UMVersion=10.0.10075.0 [...] LIB=%LIB%;"%UniversalCRTSdkDir%\Lib\%UMVersion%\um\x86" LIB=%LIB%;"%UniversalCRTSdkDir%\Lib\%UCRTVersion%\ucrt\x86" Same for x64.
Comment #13 by r.sagitario — 2015-11-04T18:19:10Z
>UCRTVersion=10.0.10150.0 >UMVersion=10.0.10075.0 >[...] >LIB=%LIB%;"%UniversalCRTSdkDir%\Lib\%UMVersion%\um\x86" >LIB=%LIB%;"%UniversalCRTSdkDir%\Lib\%UCRTVersion%\ucrt\x86" I don't see UMVersion being set by vcvarsall.bat. The installer just mimicks what is done by this batch. Is UMVersion set by installing the Windows 10 SDK? (I have only 8.1 installed).
Comment #14 by rumbu — 2015-11-05T15:28:35Z
(In reply to Rainer Schuetze from comment #13) > >UCRTVersion=10.0.10150.0 > >UMVersion=10.0.10075.0 > >[...] > >LIB=%LIB%;"%UniversalCRTSdkDir%\Lib\%UMVersion%\um\x86" > >LIB=%LIB%;"%UniversalCRTSdkDir%\Lib\%UCRTVersion%\ucrt\x86" > > I don't see UMVersion being set by vcvarsall.bat. The installer just mimicks > what is done by this batch. > > Is UMVersion set by installing the Windows 10 SDK? (I have only 8.1 > installed). The UCRT version is detected during the installation: https://github.com/D-Programming-Language/installer/blob/master/windows/d2-installer.nsi#L382 by assuming that the last SDK update contains both "um" and "ucrt" folders: StrCpy $UCRTVersion $1 ; hoping the directory is retrieved in ascending order (done by NTFS) In reality, at least on my system, I have: %UniversalCRTSdkDir%\Lib\10.0.10075.0\ucrt\ %UniversalCRTSdkDir%\Lib\10.0.10075.0\um\ and only %UniversalCRTSdkDir%\Lib\10.0.10150.0\ucrt\ In my opinion, the installer mus
Comment #15 by r.sagitario — 2015-11-05T20:53:41Z
You are right, these folders are not always the same. The VC command line will fail with these installations, too. I've now also seen an installation where the DDK installed into the same lib/include folders, into a subdirectory "wpf" IIRC. This cmpletely ruined vcvarsall.bat.
Comment #16 by greensunny12 — 2018-03-27T06:06:46Z
Closing as fixed as AFAIK this has been fixed for a long time now and there have been many tweaks to the detection since. If this problem still exists, please reopen or open a new issue. Thanks!