Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running e build on macOS: Input to targets not generated by a dependency #669

Open
jtbandes opened this issue Oct 29, 2024 · 4 comments
Labels
🪲 bug Something isn't working macos

Comments

@jtbandes
Copy link

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
      
  • e sync --revision v33.0.2

  • e load-macos-sdk

    • This outputs INFO Now using SDK version 14.0
  • 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!

@codebytere
Copy link
Member

codebytere commented Oct 30, 2024

hey @jtbandes - we've adjusted that logic a fair amount lately so there's definitely a bug or two at play here. I'll take a look - this bug should be on build-tools though so I'm going to transfer it there.

@codebytere codebytere transferred this issue from electron/electron Oct 30, 2024
@codebytere codebytere added 🪲 bug Something isn't working macos labels Oct 30, 2024
@jtbandes
Copy link
Author

jtbandes commented Nov 4, 2024

Any tips for if there's a quick workaround on this before it gets fixed upstream?

@jtbandes
Copy link
Author

jtbandes commented Nov 5, 2024

Actually it seems like running e build a second time works as a workaround 😄

@alirv90
Copy link

alirv90 commented Nov 8, 2024

@jtbandes thank for your workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working macos
Projects
None yet
Development

No branches or pull requests

3 participants