wine error when building Firefox ESR60 Windows x86_64

When building Firefox ESR60 for Windows x86_64 (with https://github.com/azadi/tor-browser-build-1/tree/bug-26204 applied for the fxc2 project), we get the following error:

 0:03.48 Application tried to create a window, but no driver could be loaded.
 0:04.23 TelemetryHistogramData.inc
 0:04.23 nsSTSPreloadList.h
 0:04.36 TelemetryHistogramEnums.h
 0:04.36 TelemetryProcessData.h
 0:04.36 TelemetryProcessEnums.h
 0:04.37 TelemetryScalarData.h
 0:04.37 TelemetryScalarEnums.h
 0:04.46 wine: configuration in '/var/tmp/tmp.VbPk8hyCBs/.wine64' has been updated.
 0:04.48 /usr/bin/wine /var/tmp/dist/fxc2/bin/fxc2.exe -nologo -Tvs_4_0 /var/tmp/build/firefox-30544586f8a9/gfx/layers/d3d11/mlgshaders/textured-vs.hlsl -ETexturedQuadVS -VnTexturedQuadVS -Vi -DVERTEX_SHADER -Fh/tmp/tmpF6j9gD
 0:04.48 Traceback (most recent call last):
 0:04.48   File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
 0:04.48     "__main__", fname, loader, pkg_name)
 0:04.48   File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
 0:04.48     exec code in run_globals
 0:04.48   File "/var/tmp/build/firefox-30544586f8a9/python/mozbuild/mozbuild/action/file_generate.py", line 117, in <module>
 0:04.48     sys.exit(main(sys.argv[1:]))
 0:04.48   File "/var/tmp/build/firefox-30544586f8a9/python/mozbuild/mozbuild/action/file_generate.py", line 68, in main
 0:04.48     ret = module.__dict__[method](output, *args.additional_arguments, **kwargs)
 0:04.48   File "/var/tmp/build/firefox-30544586f8a9/gfx/layers/d3d11/genshaders.py", line 27, in main
 0:04.48     return process_manifest(output_fp, input_filename)
 0:04.48   File "/var/tmp/build/firefox-30544586f8a9/gfx/layers/d3d11/genshaders.py", line 64, in process_manifest
 0:04.48     output_fp = output_fp)
 0:04.48   File "/var/tmp/build/firefox-30544586f8a9/gfx/layers/d3d11/genshaders.py", line 97, in run_fxc
 0:04.48     proc_stdout = subprocess.check_output(argv)
 0:04.48   File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
 0:04.48     raise CalledProcessError(retcode, cmd, output=output)
 0:04.48 subprocess.CalledProcessError: Command '[u'/usr/bin/wine', u'/var/tmp/dist/fxc2/bin/fxc2.exe', '-nologo', '-Tvs_4_0', '/var/tmp/build/firefox-30544586f8a9/gfx/layers/d3d11/mlgshaders/textured-vs.hlsl', '-ETexturedQuadVS', '-VnTexturedQuadVS', '-Vi', '-DVERTEX_SHADER', '-Fh/tmp/tmpF6j9gD']' returned non-zero exit status 53
 0:04.48 /usr/bin/wine /var/tmp/dist/fxc2/bin/fxc2.exe -nologo -Tvs_4_0_level_9_3 /var/tmp/build/firefox-30544586f8a9/gfx/layers/d3d11/CompositorD3D11.hlsl -ELayerQuadVS -VnLayerQuadVS -Vi -DVERTEX_SHADER -Fh/tmp/tmpwbm6Wj
 0:04.48 Traceback (most recent call last):
 0:04.48   File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
 0:04.48     "__main__", fname, loader, pkg_name)
 0:04.48   File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
 0:04.48     exec code in run_globals
 0:04.48   File "/var/tmp/build/firefox-30544586f8a9/python/mozbuild/mozbuild/action/file_generate.py", line 117, in <module>
 0:04.48     sys.exit(main(sys.argv[1:]))
 0:04.48   File "/var/tmp/build/firefox-30544586f8a9/python/mozbuild/mozbuild/action/file_generate.py", line 68, in main
 0:04.48     ret = module.__dict__[method](output, *args.additional_arguments, **kwargs)
 0:04.48   File "/var/tmp/build/firefox-30544586f8a9/gfx/layers/d3d11/genshaders.py", line 27, in main
 0:04.48     return process_manifest(output_fp, input_filename)
 0:04.48   File "/var/tmp/build/firefox-30544586f8a9/gfx/layers/d3d11/genshaders.py", line 64, in process_manifest
 0:04.48     output_fp = output_fp)
 0:04.48   File "/var/tmp/build/firefox-30544586f8a9/gfx/layers/d3d11/genshaders.py", line 97, in run_fxc
 0:04.48     proc_stdout = subprocess.check_output(argv)
 0:04.48   File "/usr/lib/python2.7/subprocess.py", line 573, in check_output
 0:04.48     raise CalledProcessError(retcode, cmd, output=output)
 0:04.48 subprocess.CalledProcessError: Command '[u'/usr/bin/wine', u'/var/tmp/dist/fxc2/bin/fxc2.exe', '-nologo', '-Tvs_4_0_level_9_3', '/var/tmp/build/firefox-30544586f8a9/gfx/layers/d3d11/CompositorD3D11.hlsl', '-ELayerQuadVS', '-VnLayerQuadVS', '-Vi', '-DVERTEX_SHADER', '-Fh/tmp/tmpwbm6Wj']' returned non-zero exit status 53
 0:04.49 backend.mk:8: recipe for target 'CompositorD3D11Shaders.h' failed
 0:04.49 make[4]: *** [CompositorD3D11Shaders.h] Error 1
 0:04.49 make[4]: *** Deleting file 'CompositorD3D11Shaders.h'
 0:04.49 make[4]: *** Waiting for unfinished jobs....
 0:04.49 backend.mk:15: recipe for target 'MLGShaders.h' failed
 0:04.49 make[4]: *** [MLGShaders.h] Error 1
 0:04.49 make[4]: *** Deleting file 'MLGShaders.h'
 0:04.49 /var/tmp/build/firefox-30544586f8a9/config/recurse.mk:100: recipe for target 'gfx/layers/export' failed
 0:04.49 make[3]: *** [gfx/layers/export] Error 2
 0:04.49 make[3]: *** Waiting for unfinished jobs....
 0:21.46 /var/tmp/build/firefox-30544586f8a9/config/recurse.mk:32: recipe for target 'export' failed
 0:21.46 make[2]: *** [export] Error 2
 0:21.46 /var/tmp/build/firefox-30544586f8a9/config/rules.mk:434: recipe for target 'default' failed
 0:21.46 make[1]: *** [default] Error 2
 0:21.46 client.mk:168: recipe for target 'build' failed
 0:21.46 make: *** [build] Error 2
 0:21.47 0 compiler warnings present.

Other relevant information, proceeding this:

 0:02.27 Application tried to create a window, but no driver could be loaded.
 0:02.27 Make sure that your X server is running and that $DISPLAY is set correctly.