0

Following this instruction page - https://www.electronjs.org/docs/development/build-instructions-gn to build electron.

I made testing build config successfully using

gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")"

In the next step when I tried to build using ninja -C out/Testing electron it failed with following error -

FileNotFoundError: [Errno 2] No such file or directory: 'gen/third_party/dom_distiller_js/test_sample_json_converter.h'

Complete error log

ninja: Entering directory `out/Testing'
[2353/26014] ACTION 
//third_party/dom_distiller_js:json_values_converter_tests(//build/toolchain/win:win_clang_x64)
FAILED: gen/third_party/dom_distiller_js/json_values_converter_tests.stamp
C:/depot_tools/bootstrap-2@3_8_10_chromium_17_bin/python3/bin/python3.exe  ../../third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py --stamp gen/third_party/dom_distiller_js/json_values_converter_tests.stamp gen/third_party/dom_distiller_js/test_sample_json_converter.h  ../../third_party/dom_distiller_js/test_sample_json_converter.h.golden
Traceback (most recent call last):
File "../../third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py", line 48, in <module> sys.exit(main())
File "../../third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py", line 40, in main passed = passed and CompareFiles(i, j)
File "../../third_party/dom_distiller_js/protoc_plugins/json_values_converter_tests.py", line 17, in CompareFiles
return open(file1, 'r').read() == open(file2, 'r').read()
FileNotFoundError: [Errno 2] No such file or directory:  'gen/third_party/dom_distiller_js/test_sample_json_converter.h'
[2358/26014] CXX obj/third_party/webrtc/call/bitrate_allocator/bitrate_allocator.obj
ninja: build stopped: subcommand failed.

I searched entire directory there is a file name with test_sample_json_converter.h.golden only.

The_ehT
  • 1,202
  • 17
  • 32
  • Usually, the folder `third_party` contains references to other projects. See [reference](https://git-scm.com/book/en/v2/Git-Tools-Submodules). – Anton Curmanschii May 16 '21 at 07:39
  • Yes its linked to `dom_distiller_js` but how do I approach to solve it? – The_ehT May 16 '21 at 08:34
  • See [this](https://stackoverflow.com/questions/1030169/easy-way-to-pull-latest-of-all-git-submodules) – Anton Curmanschii May 16 '21 at 08:40
  • That `gclient sync` command will pull third-party dependencies. You will have to run a few glient command as mentioned in that page – Asesh May 16 '21 at 10:00
  • Yes @Asesh I had run `gclient sync --with_branch_heads --with_tags` it downloaded around 39GB of src code. – The_ehT May 16 '21 at 10:10

1 Answers1

0

I had the same issue, and it was due to the tag that I used (92.0.4505.0) missed this commit: https://chromium.googlesource.com/chromium/src.git/+/96ec10dd20f2d23e98f93c48991c6ad106308644.

(The problematic target was gen/third_party/dom_distiller_js/json_values_converter_tests.stamp)

concatime
  • 1
  • 2