1

I'm using this link as reference (https://medium.com/angular-in-depth/how-to-build-v8-on-windows-and-not-go-mad-6347c69aacd4) to build v8 but i think its out of date or i'm doing something wrong. I can't run this (ninja -C out.gn/x64.release) command because its showing this error constantly

ninja: error: loading 'build.ninja': The system cannot find the file specified.

ninja: Entering directory `out.gn\foo

also im getting this error too

D:\v8_dev\v8Engine\v8>gn args out.gn\foo
Waiting for editor on "D:\v8_dev\v8Engine\v8\out.gn\foo\args.gn"...
Generating files...
Traceback (most recent call last):
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 561, in <module>
    sys.exit(main())
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 557, in main
    return commands[sys.argv[1]](*sys.argv[2:])
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 371, in CopyDlls
    _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=False)
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 346, in _CopyRuntime
    suffix)
  File "D:/v8_dev/v8Engine/v8/build/vs_toolchain.py", line 284, in _CopyUCRTRuntime
    assert len(ucrt_files) > 0
AssertionError
ERROR at //build/toolchain/win/BUILD.gn:49:3: Script returned non-zero exit code.
  exec_script("../../vs_toolchain.py",
  ^----------
Current dir: D:/v8_dev/v8Engine/v8/out.gn/foo/
Command: D:/v8_dev/depot_tools/bootstrap-3_8_0_chromium_8_bin/python/bin/python.exe D:/v8_dev/v8Engine/v8/build/vs_toolchain.py copy_dlls D:/v8_dev/v8Engine/v8/out.gn/foo Release x64
Returned 1.
See //BUILD.gn:905:1: which caused the file to be included.
action("postmortem-metadata") {
^------------------------------

Ultimately i want it to work like as its shown in the embedded pictureenter image description here

SunoKuni
  • 37
  • 6
  • Please explain it to me in simple words as i'm new to this "Embedding v8" in visual studio – SunoKuni Mar 21 '20 at 16:03
  • Have you looked at vs_toolchain.py? Lines 263 to 306 are trying to copy some Windows SDK DLLs. In your case this is failing. I guess you don't have the files, or you have them in an unusual location. Take a look at the python program and see if you can't figure out why it is going wrong. – john Mar 21 '20 at 16:14
  • @john i have no idea what you are talking about. Can you please look at this link and tell me what steps should i change [link](https://medium.com/angular-in-depth/how-to-build-v8-on-windows-and-not-go-mad-6347c69aacd4) because i pretty much followed this article. – SunoKuni Mar 21 '20 at 16:39
  • It's all very well following instructions but when things go wrong you need to understand what you are doing. I don't know what to change because I can't look at your machine and see what's wrong. As I said the problem you've got is when the scripts you are running are trying to copy some Windows SDK DLLs. So maybe you could look at that link and make sure you following the instructions concerning the Windows SDK correctly, and that no errors happened when you did that. But basically you're running a python script which is failing, so you need to understand python to fix it. – john Mar 21 '20 at 17:10
  • So you are telling me there's nothing outdated in the tutorial ? and i'm doing something wrong ? if that's the case then its a relief. – SunoKuni Mar 22 '20 at 05:04
  • I don't know that for sure. The error could be in tutorial, or it could be in something you've done, or it could be that your environment is unusual in some way and the tutorial can't cope. As the tutorial makes clear it's a very complex procedure and lots of things could go wrong. That's why you have to dig deep to try and diagnose the problem. Or, just try again from the start, that sometimes works too, especially as you'll be paying more attention second time around. – john Mar 22 '20 at 07:10
  • @john i found a better way for windows users [link](https://github.com/pmed/v8-nuget), thanks for your help anyways. – SunoKuni Mar 23 '20 at 13:08

1 Answers1

0

if you are looking for the solution then follow this link (https://github.com/pmed/v8-nuget) for visual studio users, its working really well without all the hassle.

SunoKuni
  • 37
  • 6