0

I'm trying to build electron source using command -

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

Keep getting this error -

ERROR at //v8/BUILD.gn:503:30: Undefined identifier
if (!is_component_build && is_electron_build) {
                           ^----------------
See //BUILD.gn:219:7: which caused the file to be included.
  "//v8:gn_all",
  ^------------

I couldn't figure out what I'm missing. I checked again, all the instructions and requirements, all good. Looks like it is pointing to is_electron_build. I don't know where this is coming from.

I'm following this https://www.electronjs.org/docs/development/build-instructions-gn

Asesh
  • 3,186
  • 2
  • 21
  • 31
The_ehT
  • 1,202
  • 17
  • 32
  • most probably `is_electron_build` is not defined at `BUILD.gn`. There are so many with same name. Trying to get the exact file. – The_ehT May 15 '21 at 13:24
  • Did you follow all the instructions properly as specified in that page? `gclient sync` steps are necessary too as it will download Chromium's third-party dependencies – Asesh May 15 '21 at 14:06
  • @Asesh I did it earlier. Run it again. this time it showed to delete list of files which are not required or run `gclient sync -D` . After running it, now it shows client not configured. Many files and folders were missing. I did git `reset --hard` . Now all file seems to be there but still getting client not configured error. – The_ehT May 15 '21 at 15:46
  • 1
    This might help you with that client issue: https://stackoverflow.com/questions/8684282/gclient-runhooks-fails – Asesh May 15 '21 at 17:04
  • Thanks. But I have restarted all process again. Now its working. But in another problem. – The_ehT May 16 '21 at 07:10
  • Build config `gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")"` was successfull. But now this error comes `FileNotFoundError: [Errno 2] No such file or directory: 'gen/third_party/dom_distiller_js/test_sample_json_converter.h'` when I try to build `gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\") $GN_EXTRA_ARGS"` – The_ehT May 16 '21 at 07:19
  • You should run those `gclient sync` commands as mentioned in that page – Asesh May 16 '21 at 09:57

0 Answers0