Closed Bug 1391547 Opened 4 years ago Closed 4 years ago

DIA SDK is missing when using MSVS2017


(Firefox Build System :: General, enhancement)

Not set


(firefox57 fixed)

Tracking Status
firefox57 --- fixed


(Reporter: m_kato, Assigned: m_kato)



(1 file)

MSVC path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.11.25503
DIA SDK path: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\DIA SDK

dia_sdk_dir of windows.configure tries finding invalid path.
I changed this in bug 1318143:

It worked with my local VC2017 Express installation. I'm travelling and don't have access to my Windows machine currently, so I don't know why this isn't working for you.
(In reply to Ted Mielczarek [:ted.mielczarek] from comment #1)
> I changed this in bug 1318143:
> a6a1f5c1d971dbee67ba6eec7ead7902351ddca2/build/moz.configure/windows.
> configure#262
> It worked with my local VC2017 Express installation. I'm travelling and
> don't have access to my Windows machine currently, so I don't know why this
> isn't working for you.

Even if I test on VC2017 community edition, VC directory (vc_path) is <Program Files>\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.11.25503\bin.  Also, 2017 express is no longer available.
Sorry, I misspoke, I have VC 2017 Community installed. My compilers are also under `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.10.25017\bin`, and the DIA SDK is under `C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\DIA SDK`.
OK, so after actually trying to dump symbols with my VC2017 build, I find that things are in fact broken here locally:
$ ./mach build toolkit/library/syms
 0:00.81 c:\mozilla-build\mozmake\mozmake.EXE -C c:/build/debug-mozilla-central -j16 -s backend
 0:01.17 c:\mozilla-build\mozmake\mozmake.EXE -C toolkit/library -j16 -s syms
 0:01.76 Beginning work for file: c:\build\debug-mozilla-central\toolkit\library\xul.dll
 0:01.76 Processing file: c:\build\debug-mozilla-central\toolkit\library\xul.dll
 0:01.76 c:\build\debug-mozilla-central\dist\host\bin\dump_syms.exe c:\build\debug-mozilla-central\toolkit\library\xul.dll
 0:01.76 Unexpected error: [Error 2] The system cannot find the file specified
 0:01.76 Traceback (most recent call last):
 0:01.76   File "c:/build/mozilla-central\toolkit\crashreporter\tools\", line 886, in <module>
 0:01.76     main()
 0:01.76   File "c:/build/mozilla-central\toolkit\crashreporter\tools\", line 882, in main
 0:01.76     dumper.Process(args[2])
 0:01.76   File "c:/build/mozilla-central\toolkit\crashreporter\tools\", line 455, in Process
 0:01.76     self.ProcessFile(file_to_process)
 0:01.76   File "c:/build/mozilla-central\toolkit\crashreporter\tools\", line 469, in ProcessFile
 0:01.76     self.ProcessFileWork(file, arch_num, arch, vcs_root, dsymbundle)
 0:01.76   File "c:/build/mozilla-central\toolkit\crashreporter\tools\", line 488, in ProcessFileWork
 0:01.76     stderr=open(os.devnull, 'wb'))
 0:01.76   File "c:\mozilla-build\python\Lib\", line 710, in __init__
 0:01.76     errread, errwrite)
 0:01.76   File "c:\mozilla-build\python\Lib\", line 958, in _execute_child
 0:01.76     startupinfo)
 0:01.76 WindowsError: [Error 2] The system cannot find the file specified
 0:01.76 Running: c:/build/debug-mozilla-central/_virtualenv/Scripts/python.exe c:/build/mozilla-central\toolkit\crashreporter\tools\ -c --vcs-info --install-manifest=c:/build/debug-mozilla-central\_build_manifests\install\dist_include,c:/build/debug-mozilla-central\dist\include -s c:/build/mozilla-central c:/build/debug-mozilla-central\dist\host\bin\dump_syms.exe c:/build/debug-mozilla-central\dist\crashreporter-symbols c:\build\debug-mozilla-central\toolkit\library\xul.dll
 0:01.77 Traceback (most recent call last):
 0:01.77   File "c:\mozilla-build\python\Lib\", line 162, in _run_module_as_main
 0:01.77     "__main__", fname, loader, pkg_name)
 0:01.77   File "c:\mozilla-build\python\Lib\", line 72, in _run_code
 0:01.77     exec code in run_globals
 0:01.77   File "c:\build\mozilla-central\python\mozbuild\mozbuild\action\", line 79, in <module>
 0:01.77     sys.exit(main(sys.argv[1:]))
 0:01.77   File "c:\build\mozilla-central\python\mozbuild\mozbuild\action\", line 75, in main
 0:01.77     return dump_symbols(*argv)
 0:01.77   File "c:\build\mozilla-central\python\mozbuild\mozbuild\action\", line 64, in dump_symbols
 0:01.77     out_files = subprocess.check_output(args)
 0:01.77   File "c:\mozilla-build\python\Lib\", line 573, in check_output
 0:01.77     raise CalledProcessError(retcode, cmd, output=output)
 0:01.77 subprocess.CalledProcessError: Command '['c:/build/debug-mozilla-central/_virtualenv/Scripts/python.exe', u'c:/build/mozilla-central\\toolkit\\crashreporter\\tools\\', '-c', '--vcs-info', u'--install-manifest=c:/build/debug-mozilla-central\\_build_manifests\\install\\dist_include,c:/build/debug-mozilla-central\\dist\\include', '-s', u'c:/build/mozilla-central', u'c:/build/debug-mozilla-central\\dist\\host\\bin\\dump_syms.exe', u'c:/build/debug-mozilla-central\\dist\\crashreporter-symbols', 'c:\\build\\debug-mozilla-central\\toolkit\\library\\xul.dll']' returned non-zero exit status 1
 0:01.77 c:/build/mozilla-central/config/ recipe for target 'xul.dll_syms.track' failed
 0:01.77 mozmake.EXE: *** [xul.dll_syms.track] Error 1

$ rg DIA_SDK ../debug-mozilla-central/config.status
607:    'MSVC_HAS_DIA_SDK': '',

We should turn that configure check into an error if the crashreporter is enabled, (and suggest --disable-crashreporter as a workaround). Given that the community editions of VC contain the DIA SDK, there's no compelling reason to support building without it, and it's very easy to accidentally wind up in this situation.
Comment on attachment 8899705 [details]
Bug 1391547 - DIA SDK is missing when using MSVS2017. .mielczarek

This is good, but I think you should also add a check in `include_path` to error if this path is missing, like we do for the other directories there. There's no reason for us to silently ignore this anymore.
Attachment #8899705 - Flags: review?(ted) → review+
Pushed by
DIA SDK is missing when using MSVS2017. r=ted.mielczarek
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.