在本地构建 Chromedriver 时 //skia/BUILD.gn 处出错

ERROR at //skia/BUILD.gn while building Chromedriver locally

提问人:Robin 提问时间:8/2/2023 更新时间:8/2/2023 访问量:62

问:

我正在尝试在 Windows 机器上本地构建 ChromeDriver (114.0.5735.90),并面临以下错误:

ERROR at //skia/BUILD.gn:554:16: Undefined identifier
    sources += skia_gpu_private
               ^---------------
See //BUILD.gn:103:7: which caused the file to be included.
      "//skia:skia_unittests",
      ^----------------------
ninja: error: rebuilding 'build.ninja': subcommand failed
ninja: Entering directory `outDefault'
[0/1] Regenerating ninja files
FAILED: build.ninja.stamp
../buildtools/win/gn.exe --root=./.. -q --regeneration gen .

我尝试过无济于事:

  • gclient 同步
  • 构建最新版本

参考截图:Here is the screenshot for reference:

硒-铬驱动器

评论

0赞 Asesh 8/2/2023
在开始编译过程之前,您是否运行过?gclient sync
0赞 Robin 8/2/2023
是的,@Asesh,在开始编译过程之前运行了“gclient sync”,但结果相同。
0赞 Asesh 8/3/2023
看起来您正在使用 Windows。您可以尝试从 Git bash 中做同样的事情吗?我记得以前遇到过类似的问题......Visual Studio Command Prompt
0赞 Robin 8/4/2023
感谢您的指@asesh
0赞 Robin 8/4/2023
感谢您的指@Asesh。我从 VS 命令提示符尝试了相同的命令,并面临“找不到 build.ninja”。所以我在存储库上做了“git reset --hard HEAD”。后面跟着“git clean -ffd”。运行“gclient sync -f”。然后放弃了VS命令提示符。然后我切换回 Git Bash。运行“gclient sync -D”。在此之后,我在 Visual Studio 中进行了更改,并在 Git bash 中运行了“autoninja -C out\Default chromedriver”。构建之神很高兴,我能够在本地构建 Chromedriver。感谢您的指点,希望将来有人会觉得这很有帮助。🙏

答: 暂无答案