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 when running bazel build on this repo #1

Open
lencioni opened this issue Mar 8, 2022 · 0 comments
Open

Error when running bazel build on this repo #1

lencioni opened this issue Mar 8, 2022 · 0 comments

Comments

@lencioni
Copy link

lencioni commented Mar 8, 2022

I cloned this repo and attempted to follow the instructions at integration-test by running bazel build :ExecLogDiffer at the repo root. This failed with the following output:

~/exec-log-differ master ❯ bazel build :ExecLogDiffer
Starting local Bazel server and connecting to it...
ERROR: /private/var/tmp/_bazel_joe_lencioni/8d358514d00431413414f0d1b91bdc26/external/local_jdk/BUILD.bazel:2:10: in fail_rule rule @local_jdk//:jdk: 
Traceback (most recent call last):
        File "/private/var/tmp/_bazel_joe_lencioni/8d358514d00431413414f0d1b91bdc26/external/bazel_tools/tools/jdk/fail_rule.bzl", line 19, column 13, in _fail_rule_impl
                fail("%s %s" % (ctx.attr.header, ctx.attr.message))
Error in fail: Auto-Configuration Error: Cannot find Java binary bin/java in /var/tmp/_bazel_joe_lencioni/install/c8706c49991751b43417f135b97a0616/embedded_tools/tools/jdk/nosystemjdk; either correct your JAVA_HOME, PATH or specify Java from remote repository (e.g. --java_runtime_version=remotejdk_11
ERROR: /private/var/tmp/_bazel_joe_lencioni/8d358514d00431413414f0d1b91bdc26/external/local_jdk/BUILD.bazel:2:10: Analysis of target '@local_jdk//:jdk' failed
INFO: Repository com_github_jetbrains_kotlin instantiated at:
  /Users/joe_lencioni/exec-log-differ/WORKSPACE:41:20: in <toplevel>
  /private/var/tmp/_bazel_joe_lencioni/8d358514d00431413414f0d1b91bdc26/external/io_bazel_rules_kotlin/kotlin/internal/repositories/repositories.bzl:48:32: in kotlin_repositories
Repository rule _kotlin_compiler_repository defined at:
  /private/var/tmp/_bazel_joe_lencioni/8d358514d00431413414f0d1b91bdc26/external/io_bazel_rules_kotlin/kotlin/internal/repositories/repositories.bzl:86:46: in <toplevel>
INFO: Repository com_github_bazelbuild_bazel instantiated at:
  /Users/joe_lencioni/exec-log-differ/WORKSPACE:25:13: in <toplevel>
Repository rule http_archive defined at:
  /private/var/tmp/_bazel_joe_lencioni/8d358514d00431413414f0d1b91bdc26/external/bazel_tools/tools/build_defs/repo/http.bzl:364:31: in <toplevel>
ERROR: /private/var/tmp/_bazel_joe_lencioni/8d358514d00431413414f0d1b91bdc26/external/bazel_tools/tools/jdk/BUILD:29:19: errors encountered resolving toolchains for @bazel_tools//tools/jdk:current_java_runtime
ERROR: Analysis of target '//:ExecLogDiffer' failed; build aborted: 
INFO: Elapsed time: 10.548s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (39 packages loaded, 175 targets configured)
    Fetching @local_config_xcode; Fetching the default Xcode version
    Fetching @remote_java_tools; fetching
    Fetching @kt_java_stub_template; fetching

I get a similar error when trying to build :ExecLogParser

bazel build :ExecLogParser
ERROR: /private/var/tmp/_bazel_joe_lencioni/8d358514d00431413414f0d1b91bdc26/external/local_jdk/BUILD.bazel:2:10: in fail_rule rule @local_jdk//:jdk: 
Traceback (most recent call last):
        File "/private/var/tmp/_bazel_joe_lencioni/8d358514d00431413414f0d1b91bdc26/external/bazel_tools/tools/jdk/fail_rule.bzl", line 19, column 13, in _fail_rule_impl
                fail("%s %s" % (ctx.attr.header, ctx.attr.message))
Error in fail: Auto-Configuration Error: Cannot find Java binary bin/java in /var/tmp/_bazel_joe_lencioni/install/c8706c49991751b43417f135b97a0616/embedded_tools/tools/jdk/nosystemjdk; either correct your JAVA_HOME, PATH or specify Java from remote repository (e.g. --java_runtime_version=remotejdk_11
ERROR: /private/var/tmp/_bazel_joe_lencioni/8d358514d00431413414f0d1b91bdc26/external/local_jdk/BUILD.bazel:2:10: Analysis of target '@local_jdk//:jdk' failed
ERROR: /Users/joe_lencioni/exec-log-differ/BUILD:3:15: errors encountered resolving toolchains for //:ExecLogParser
ERROR: Analysis of target '//:ExecLogParser' failed; build aborted: 
INFO: Elapsed time: 4.017s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (3 packages loaded, 0 targets configured)

It seems that I need to install some Java binary?

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

1 participant