google / simhospital

Apache License 2.0
666 stars 76 forks source link

Running on Windows #2

Open alexanderbarnhill opened 3 years ago

alexanderbarnhill commented 3 years ago

Has anyone had any luck running the bazel build on Windows? I either get the message that there are no targets and no modules are loaded

$ bazel build
WARNING: Usage: bazel build <options> <targets>.
Invoke `bazel help build` for full description of usage and options.
Your request is correct, but requested an empty set of targets. Nothing will be built.
Loading:
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Loading: 0 packages loaded
Analyzing: 0 targets (0 packages loaded, 0 targets configured)
INFO: Analyzed 0 targets (0 packages loaded, 0 targets configured).
INFO: Found 0 targets...
[0 / 1] [Prepa] BazelWorkspaceStatusAction stable-status.txt
INFO: Elapsed time: 5.928s, Critical Path: 0.03s
INFO: 1 process: 1 internal.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action

Or that the bazel_gazelle_go_repository_tools repository cannot be found, with the error:

INFO: Repository bazel_gazelle_go_repository_tools instantiated at:
  no stack (--record_rule_instantiation_callstack not enabled)
Repository rule go_repository_tools defined at:
  C:/users/z00405bj.ad005/_bazel_z00405bj/xnsmx27y/external/bazel_gazelle/internal/go_repository_tools.bzl:116:38: in <toplevel>
ERROR: An error occurred during the fetch of repository 'bazel_gazelle_go_repository_tools':
   Traceback (most recent call last):
        File "C:/users/z00405bj.ad005/_bazel_z00405bj/xnsmx27y/external/bazel_gazelle/internal/go_repository_tools.bzl", line 42, column 25, in _go_repository_tools_impl
                env = read_cache_env(ctx, str(ctx.path(ctx.attr.go_cache)))
        File "C:/users/z00405bj.ad005/_bazel_z00405bj/xnsmx27y/external/bazel_gazelle/internal/go_repository_cache.bzl", line 81, column 13, in read_cache_env
                fail("failed to read cache environment: " + result.stderr)
Error in fail: failed to read cache environment: java.io.IOException: ERROR: src/main/native/windows/process.cc(202): CreateProcessW("cat" C:/users/z00405bj.ad005/_bazel_z00405bj/xnsmx
27y/external/bazel_gazelle_go_repository_cache/go.env): The system cannot find the file specified.
 (error: 2)
ERROR: error loading package '': Encountered error while reading extension file 'bazel/go_dependencies.bzl': no such package '@com_google_fhir//bazel': no such package '@bazel_gazelle_
go_repository_config//': no such package '@bazel_gazelle_go_repository_tools//': failed to read cache environment: java.io.IOException: ERROR: src/main/native/windows/process.cc(202):
CreateProcessW("cat" C:/users/z00405bj.ad005/_bazel_z00405bj/xnsmx27y/external/bazel_gazelle_go_repository_cache/go.env): The system cannot find the file specified.
 (error: 2)
INFO: Elapsed time: 0.465s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

On my linux box this works just fine. Has anybody encountered this?