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

Issue fetching the repository on windows 10 pro version 10.0.19042 #205

Open
DrewGlinsman opened this issue Jan 28, 2021 · 2 comments
Open

Comments

@DrewGlinsman
Copy link

DrewGlinsman commented Jan 28, 2021

I was trying to load the repository in a bazel workspace file in windows and I was getting an error while fetching the repository. I was wondering if anyone had any idea why this was happening.

Here's the error:

Error in fail: error running 'git init C:/users/panda/_bazel_panda/un2rq2hy/external/com_github_nelhage_rules_boost' while working with @com_github_nelhage_rules_boost:
java.io.IOException: ERROR: src/main/native/windows/process.cc(202): CreateProcessW("git" init C:/users/panda/_bazel_panda/un2rq2hy/external/com_github_nelhage_rules_boost): The system cannot find the file specified.
(error: 2)
ERROR: no such package '@com_github_nelhage_rules_boost//boost': error running 'git init C:/users/panda/_bazel_panda/un2rq2hy/external/com_github_nelhage_rules_boost' while working with @com_github_nelhage_rules_boost:
java.io.IOException: ERROR: src/main/native/windows/process.cc(202): CreateProcessW("git" init C:/users/panda/_bazel_panda/un2rq2hy/external/com_github_nelhage_rules_boost): The system cannot find the file specified.
(error: 2)

Here's the code in the workspace file for loading this repo:

git_repository(
name = "com_github_nelhage_rules_boost",
commit = "1e3a69bf2d5cd10c34b74f066054cd335d033d71",
remote = "https://github.com/nelhage/rules_boost",
shallow_since = "1591047380 -0700",
)
load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")

boost_deps()

@nelhage
Copy link
Owner

nelhage commented Jan 28, 2021

I'm not a Windows expert but

java.io.IOException: ERROR: src/main/native/windows/process.cc(202): CreateProcessW("git" init C:/users/panda/_bazel_panda/un2rq2hy/external/com_github_nelhage_rules_boost): The system cannot find the file specified.

suggests to me you don't have git installed, or perhaps not in your PATH?

See for example https://stackoverflow.com/questions/48043878/createprocess-error-2-the-system-cannot-find-the-file-specified-error for a somewhat similar error.

@gjasny
Copy link
Contributor

gjasny commented Nov 12, 2021

I'd suggest to use http_archive instead. Like here for example: https://github.com/LogMeIn/asyncly/blob/79b376ff71f0337709972a14c51e5a2d8eca58b5/Bazel/repositories.bzl#L47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants