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

errors in generate-synthea.sh: Cannot find Java binary #13

Open
sdeoras opened this issue Aug 22, 2021 · 0 comments
Open

errors in generate-synthea.sh: Cannot find Java binary #13

sdeoras opened this issue Aug 22, 2021 · 0 comments

Comments

@sdeoras
Copy link

sdeoras commented Aug 22, 2021

Hi, My Ubuntu 20.04 system info is as follows:

$ uname -a
Linux <hostname> 5.10.0-1038-oem #40-Ubuntu SMP Fri Jul 16 15:08:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

$ java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.20.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.20.04, mixed mode, sharing)

$ bazel --version
bazel 4.2.0

I am encountering following errors. Any pointers on how to get resolve these? Thanks.

└─ $ ▶ ./generate-synthea.sh $WORKSPACE
~/fhirdata ~/gocode/github.com/google/fhir-examples
Cloning into 'synthea'...

<redacted... lots of lines in between>

BUILD SUCCESSFUL in 1m 20s
4 actionable tasks: 4 executed
~/gocode/github.com/google/fhir-examples
Finished generating Synthea dataset.  Running SplitBundle...
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
ERROR: /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/local_jdk/BUILD.bazel:3:10: in fail_rule rule @local_jdk//:jdk:
Traceback (most recent call last):
        File "/home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/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 /home/<username>/.cache/bazel/_bazel_<username>/install/96e7556c3bbfa3fa31016b638fdff086/embedded_tools/tools/jdk/nosystemjdk; either correct your JAVA_HOME, PATH or specify embedded Java (e.g. --javabase=@bazel_tools//tools/jdk:remote_jdk11)
INFO: Repository rules_proto instantiated at:
  /home/<username>/gocode/github.com/google/fhir-examples/WORKSPACE:14:23: in <toplevel>
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/com_google_fhir/bazel/dependencies.bzl:37:17: in fhirproto_dependencies
Repository rule http_archive defined at:
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
INFO: Repository remote_java_tools_linux instantiated at:
  /DEFAULT.WORKSPACE.SUFFIX:223:6: in <toplevel>
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
Repository rule http_archive defined at:
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in <toplevel>
INFO: Repository maven instantiated at:
  /home/<username>/gocode/github.com/google/fhir-examples/WORKSPACE:20:20: in <toplevel>
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/com_google_fhir/bazel/workspace.bzl:8:18: in fhirproto_workspace
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/rules_jvm_external/defs.bzl:36:19: in maven_install
Repository rule coursier_fetch defined at:
  /home/<username>/.cache/bazel/_bazel_<username>/2884ccfba9ba71fca71c9c77a412dd89/external/rules_jvm_external/coursier.bzl:559:33: in <toplevel>
ERROR: Analysis of target '@com_google_fhir//java/com/google/fhir/examples:SplitBundle' failed; build aborted: Analysis of target '@local_jdk//:jdk' failed
INFO: Elapsed time: 42.634s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (21 packages loaded, 191 targets configured)
    currently loading: @com_google_fhir//proto/google/fhir/proto/r4/core/resources ... (2 packages)
./generate-synthea.sh: line 42: bazel-bin/external/com_google_fhir/java/com/google/fhir/examples/SplitBundle: No such file or directory
mv: cannot stat '/home/<username>/fhirdata/ndjson/*.schema.json': No such file or directory
mv: cannot stat '/home/<username>/fhirdata/ndjson/*.analytic.ndjson': No such file or directory
Done
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