I am trying to build a version of Dartium on windows, but I keep running into a problem.
I am trying to build a Dartium with the proprietary codecs, so I can play AAC codec in an MP4 file, which normal Dartium can't play.
[22/22259] CXX obj\dart\runtime\vm\libdart_vm.thread.obj
FAILED: obj/dart/runtime/vm/libdart_vm.thread.obj
ninja -t msvc -e environment.x86 -- "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\dart\runtime\vm\libdart_vm.thread.obj.rsp /c ..\..\dart\runtime\vm\thread.cc /Foobj\dart\runtime\vm\libdart_vm.thread.obj /Fdobj\dart\runtime\libdart_vm.cc.pdb
c:\dart\dartium\src\dart\runtime\vm\thread.cc(459) : error C2220: warning treated as error - no 'object' file generated
c:\dart\dartium\src\dart\runtime\vm\thread.cc(459) : warning C4172: returning address of local variable or temporary: func
[25/22259] CC obj\third_party\opus\src\silk\opus.resampler_rom.obj
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "C:\dart\dartium\src\dart\tools\dartium\build.py", line 58, in <module>
main()
File "C:\dart\dartium\src\dart\tools\dartium\build.py", line 55, in main
+ targets)
File "C:\dart\dartium\src\dart\tools\dartium\utils.py", line 112, in runCommand
raise Exception('Failed to run command. return code=%s' % p.returncode)
Exception: Failed to run command. return code=1
I am building this on a windows 2016 Datacenter (VM), I have installed Dart 32bit, Visual Studio 2015, with windows SDK, and followed the instructions on: https://github.com/dart-lang/sdk/wiki/Building-Dartium
If you add
#pragma warning disable C4172
at the top of the thread.cc
, that should fix the compilation.