electron / build-tools

The GN scripts to use for Electron dev-flows
MIT License
259 stars 77 forks source link

windows build fails randomly #269

Open rconde01 opened 3 years ago

rconde01 commented 3 years ago

When running e build -v electron:dist I get:

[954/41113] C:\Users\ContainerAdministrator\.electron_build_tools\third_party\goma\gomacc.exe ..\..\third_party\llvm-build\Release+Asserts\bin\clang-cl.exe /nologo /showIncludes:user /winsysroot..\..\third_party\depot_tools\win_toolchain\vs_files\e146e01913 -DDCHECK_ALWAYS_ON=1 -DUSE_AURA=1 "-DCR_CLANG_REVISION=\"llvmorg-13-init-794-g83e2710e-1\"" -D_LIBCPP_ABI_UNSTABLE -D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS -D_LIBCPP_DEBUG=0 -D_LIBCPP_NO_AUTO_LINK -D__STD_C -D_CRT_RAND_S -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE -D_ATL_NO_OPENGL -D_WINDOWS -DCERT_CHAIN_PARA_HAS_EXTRA_FIELDS 
-DPSAPI_VERSION=2 -DWIN32 -D_SECURE_ATL -DWINAPI_FAMILY=WINAPI_FAMILY_DESKTOP_APP -DWIN32_LEAN_AND_MEAN -DNOMINMAX -D_UNICODE -DUNICODE -DNTDDI_VERSION=NTDDI_WIN10_VB -D_WIN32_WINNT=0x0A00 -DWINVER=0x0A00 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -I../.. -Igen -I../../third_party/libaom/source/config -I../../third_party/libaom/source/config/win/x64 -I../../third_party/libaom/source/libaom -msse2 -fno-delete-null-pointer-checks -fcolor-diagnostics -fmerge-all-constants -fcrash-diagnostics-dir=../../tools/clang/crashreports -mllvm -instcombine-lower-dbg-declare=0 -Xclang -fno-experimental-new-pass-manager -fcomplete-member-pointers /Gy /FS /bigobj /utf-8 /Zc:twoPhase /Zc:sizedDealloc- /D__WRL_ENABLE_FUNCTION_STATICS__ -fmsc-version=1916 -m64 -msse3 /Brepro -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -Xclang -fdebug-compilation-dir -Xclang . -no-canonical-prefixes /O1 /Ob2 /Oy- /Zc:inline /Gw /Oi -gline-tables-only -ftrivial-auto-var-init=pattern /guard:cf,nochecks /MT -Xclang -add-plugin -Xclang find-bad-constructs -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare /W3 /wd4800 /wd4267 /wd4996 -Wno-unused-variable -Wno-misleading-indentation /WX /wd4091 /wd4127 /wd4251 /wd4275 /wd4312 /wd4324 /wd4351 /wd4355 /wd4503 /wd4589 /wd4611 /wd4100 /wd4121 /wd4244 /wd4505 /wd4510 /wd4512 /wd4610 /wd4838 /wd4995 /wd4996 /wd4456 /wd4457 /wd4458 /wd4459 /wd4200 /wd4201 /wd4204 /wd4221 /wd4245 /wd4267 /wd4305 /wd4389 /wd4702 /wd4701 /wd4703 /wd4661 /wd4706 /wd4715 -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-unneeded-internal-declaration -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-psabi -Wno-ignored-pragma-optimize -Wno-implicit-int-float-conversion -Wno-final-dtor-non-final-class -Wno-builtin-assume-aligned-alignment -Wno-deprecated-copy -Wno-non-c-typedef-for-linkage -Wmax-tokens /TC -Wno-implicit-fallthrough /c ../../third_party/libaom/source/libaom/aom_dsp/x86/aom_asm_stubs.c /Foobj/third_party/libaom/libaom_intrinsics_sse2/aom_asm_stubs.obj /Fd"obj/third_party/libaom/libaom_intrinsics_sse2_c.pdb"
ninja: build stopped: subcommand failed.
ERROR Error: Command failed: ninja.exe -v -j 200 electron:electron_dist_zip
    at checkExecSyncError (node:child_process:690:11)
    at Object.execFileSync (node:child_process:709:15)
    at Object.depotExecFileSync [as execFileSync] (C:\Users\ContainerAdministrator\.electron_build_tools\src\utils\depot-tools.js:118:16)
    at runNinja (C:\Users\ContainerAdministrator\.electron_build_tools\src\e-build.js:78:9)
    at Object.<anonymous> (C:\Users\ContainerAdministrator\.electron_build_tools\src\e-build.js:136:3)
    at Module._compile (node:internal/modules/cjs/loader:1092:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1121:10)
    at Module.load (node:internal/modules/cjs/loader:972:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)

If i run it again, it stops on some other target with the same error.

rconde01 commented 3 years ago
rconde01 commented 3 years ago

FYI I had to restart it like 20 times...but it finally completed.

andrewsml commented 10 months ago

faced the same problem when building any version above v26 for Windows x64 platform, build fails randomly

v26.6.0 - highest version I manage to build v27.1.0 - fails v27.1.2 - fails v28.0.0-beta.5 - fails

using standard building sequence:

git checkout tags/v27.1.2 -b v27.1.2
e sync
e build electron:dist
hlevring commented 10 months ago

Yeah, this seems to be a problem.

ninja: build stopped: subcommand failed. ERROR Error: Command failed: ninja.exe -v -j 200 electron:electron_dist_zip at checkExecSyncError (node:child_process:690:11) ..

Setting up a batch script that tries to build over and over until finally succeed. Would be great to get this fixed.

@rconde01 did you ever find a proper solution?

rconde01 commented 10 months ago

Unfortunately no.

alexciarlillo commented 8 months ago

I ran into this as well. One thing I noticed was that this seems to only happen when I run the build from Git Bash. If I run it from a regular windows cmd.exe prompt it finishes fine. Might be nothing, but thought I'd mention it in case it helps anyone.