Bazelisk: error during the fetch of repository 'google_bazel_common'
See original GitHub issueI’m trying to build Closure-Compiler v20201006 using Bazelisk under Windows 7 x64.
I get the following error:
A:\Desktop\closure-compiler-20201006> ..\bazelisk build //:compiler_unshaded_deploy.jar
Loading:
Loading: 0 packages loaded
INFO: Call stack for the definition of repository 'google_bazel_common' which is a git_repository (rule definition at C:/users/administrator/_bazel_<user>/zflckzzj/external/bazel_tools/tools/build_defs/repo/git.bzl:195:18):
- <builtin>
- A:/desktop/closure-compiler-20201006/WORKSPACE.bazel:5:1
ERROR: An error occurred during the fetch of repository 'google_bazel_common':
Traceback (most recent call last):
File "C:/users/administrator/_bazel_<user>/zflckzzj/external/bazel_tools/tools/build_defs/repo/git.bzl", line 177
_clone_or_update(ctx)
File "C:/users/administrator/_bazel_<user>/zflckzzj/external/bazel_tools/tools/build_defs/repo/git.bzl", line 36, in _clone_or_update
git_repo(ctx, directory)
File "C:/users/administrator/_bazel_<user>/zflckzzj/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 91, in git_repo
_update(ctx, git_repo)
File "C:/users/administrator/_bazel_<user>/zflckzzj/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 101, in _update
init(ctx, git_repo)
File "C:/users/administrator/_bazel_<user>/zflckzzj/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 115, in init
_error(ctx.name, cl, st.stderr)
File "C:/users/administrator/_bazel_<user>/zflckzzj/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 181, in _error
fail(<1 more arguments>)
error running 'git init C:/users/administrator/_bazel_<user>/zflckzzj/external/google_bazel_common' while working with @google_bazel_common:
java.io.IOException: ERROR: src/main/native/windows/process.cc(199): CreateProcessW("git" init C:/users/administrator/_bazel_<user>/zflckzzj/external/google_bazel_common): The system cannot find the file specified.
(error: 2)
ERROR: no such package '@google_bazel_common//': Traceback (most recent call last):
File "C:/users/administrator/_bazel_<user>/zflckzzj/external/bazel_tools/tools/build_defs/repo/git.bzl", line 177
_clone_or_update(ctx)
File "C:/users/administrator/_bazel_<user>/zflckzzj/external/bazel_tools/tools/build_defs/repo/git.bzl", line 36, in _clone_or_update
git_repo(ctx, directory)
File "C:/users/administrator/_bazel_<user>/zflckzzj/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 91, in git_repo
_update(ctx, git_repo)
File "C:/users/administrator/_bazel_<user>/zflckzzj/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 101, in _update
init(ctx, git_repo)
File "C:/users/administrator/_bazel_<user>/zflckzzj/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 115, in init
_error(ctx.name, cl, st.stderr)
File "C:/users/administrator/_bazel_<user>/zflckzzj/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 181, in _error
fail(<1 more arguments>)
error running 'git init C:/users/administrator/_bazel_<user>/zflckzzj/external/google_bazel_common' while working with @google_bazel_common:
java.io.IOException: ERROR: src/main/native/windows/process.cc(199): CreateProcessW("git" init C:/users/administrator/_bazel_<user>/zflckzzj/external/google_bazel_common): The system cannot find the file specified.
(error: 2)
INFO: Elapsed time: 0.542s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)
FAILED: Build did NOT complete successfully (0 packages loaded)
I’m not certain who is to blame here. Is it Closure Compiler’s fault? Is it Bazelisk’s fault? Is it Bazel’s fault?
The output of bazelisk version
is:
Bazelisk version: v1.7.4
Build label: 2.2.0
Build target: bazel-out/x64_windows-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Mar 3 09:28:29 2020 (1583227709)
Build timestamp: 1583227709
Build timestamp as int: 1583227709
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
HTTP-401 when building Gerrit after Starlark warning fix
ERROR : An error occurred during the fetch of repository 'rules_python': java.io. ... When using Bazelisk with a .bazelversion showing 0.29.0, you may...
Read more >Error building TensorFlow 2.8 in Windows 10
ERROR: An error occurred during the fetch of repository 'llvm-project': Here are the warnings and errors when building for CUDA: WARNING: ...
Read more >Errors After Renaming WORKSPACE to WORKSPACE.bazel
bazel:45:1 ERROR : An error occurred during the fetch of repository 'com_github_pkg_errors': Not a regular file: /home/flolu/Desktop/workspace- ...
Read more >Gerrit Code Review - Building with Bazel
zip, unzip. gcc. Bazel. Bazelisk includes a Bazel version check and downloads the correct bazel version for the git project/repository. Bazelisk is the ......
Read more >What Do I Do If "An error occurred during the fetch of ... - 华为云
The message "ERROR: An error occurred during the fetch of repository 'io_bazel_rules_docker'" is displayed when you run the command bazel ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found a linux-compatible zip.exe here: http://stahlworks.com/dev/index.php?tool=zipunzip I added it to the PATH and now the build process completed successfully.
Where I work they use a custom version of Closure Compiler that was built from version 20190121. There are several bugs in that version that have been fixed in these two years, so I needed to rebuild that custom Closure Compiler using the latest version as a base.
Bottom line, the missing prerequisites are:
It will help others if you specify them in the build instructions. Thanks for your help.
I remember I did open the project in vscode, but my debugging consisted of simple log lines to a text file. i.e. I didn’t use breakpoints, step by step or anything like that.