Error running e build
on macOS: Input to targets not generated by a dependency #669
Open
Description
I'm looking for some advice on building electron from source.
I'm running the following steps on a macOS arm64 (apple silicon) host on macOS 15.1. I have Xcode 16.1 installed.
-
npm i -g @electron/[email protected]
-
e init mybuilder --import release --reclient none --target-cpu x64
- This outputs:
WARN Automatically detected an unknown macOS SDK null - falling back to default of 15.0 INFO Now using SDK version 15.0
- This outputs:
-
e sync --revision v33.0.2
-
e load-macos-sdk
- This outputs
INFO Now using SDK version 14.0
- This outputs
-
e build
The final e build
step fails with this error:
INFO Building electron with remote execution disabled
Running "/Users/USER/.electron_build_tools/third_party/depot_tools/gn gen out/Release" in /Users/USER/Desktop/actions-runner/_work/custom-electron-builder/custom-electron-builder/electron/src
ERROR Input to targets not generated by a dependency.
The file:
//out/Release/xcode_links/electron/MacOSX14.0.sdk/usr/include/mach/exc.defs
is listed as an input or source for the targets:
//third_party/crashpad/crashpad/util:mig(//build/toolchain/mac:clang_x64)
//third_party/crashpad/crashpad/util:mig(//build/toolchain/mac:clang_arm64_v8_x64)
//third_party/crashpad/crashpad/util:mig(//build/toolchain/mac:clang_arm64)
but no targets in the build generate that file.
ERROR Input to targets not generated by a dependency.
The file:
//out/Release/xcode_links/electron/MacOSX14.0.sdk/usr/include/mach/mach_exc.defs
is listed as an input or source for the targets:
//third_party/crashpad/crashpad/util:mig(//build/toolchain/mac:clang_x64)
//third_party/crashpad/crashpad/util:mig(//build/toolchain/mac:clang_arm64_v8_x64)
//third_party/crashpad/crashpad/util:mig(//build/toolchain/mac:clang_arm64)
but no targets in the build generate that file.
ERROR Input to targets not generated by a dependency.
The file:
//out/Release/xcode_links/electron/MacOSX14.0.sdk/usr/include/mach/notify.defs
is listed as an input or source for the targets:
//third_party/crashpad/crashpad/util:mig(//build/toolchain/mac:clang_x64)
//third_party/crashpad/crashpad/util:mig(//build/toolchain/mac:clang_arm64_v8_x64)
//third_party/crashpad/crashpad/util:mig(//build/toolchain/mac:clang_arm64)
but no targets in the build generate that file.
If you have generated inputs, there needs to be a dependency path between the
two targets in addition to just listing the files. For indirect dependencies,
the intermediate ones must be public_deps. data_deps don't count since they're
only runtime dependencies. If you think a dependency chain exists, it might be
because the chain is private. Try "gn path" to analyze.
3 generated input errors found.
ERROR Error: Command failed: /Users/USER/.electron_build_tools/third_party/depot_tools/gn gen out/Release
at checkExecSyncError (node:child_process:890:11)
at Object.execFileSync (node:child_process:926:15)
at Object.depotExecFileSync [as execFileSync] (/Users/USER/.electron_build_tools/src/utils/depot-tools.js:147:23)
at runGNGen (/Users/USER/.electron_build_tools/src/e-build.js:42:9)
at ensureGNGen (/Users/USER/.electron_build_tools/src/e-build.js:47:41)
at runNinja (/Users/USER/.electron_build_tools/src/e-build.js:70:3)
at Command.<anonymous> (/Users/USER/.electron_build_tools/src/e-build.js:112:7)
at Command.listener [as _actionHandler] (/Users/USER/.electron_build_tools/node_modules/commander/lib/command.js:480:17)
at /Users/USER/.electron_build_tools/node_modules/commander/lib/command.js:1234:65
Any advice would be appreciated. Thanks!