google / fhir-examples

Usage Examples for github.com/google/fhir
Apache License 2.0
109 stars 31 forks source link

"bazel build //cc/google/fhir_examples:ParsePatients" seems to have an URL error #22

Open JsonWang95 opened 4 months ago

JsonWang95 commented 4 months ago

Hi, I was following the instructions to play around with examples for FhirProto. I ran "./generate-synthea.sh $WORKSPACE" and it seemed like I successfully generated $WORKSPACE/bundles/, $WORKSPACE/ndjson/, and $WORKSPACE/analytic/. However, when I was trying to validate that my bazel environment was correct by running "bazel build //cc/google/fhir_examples:ParsePatients", it gave me some errors that might include some invalid URL paths. It looks like this:

Starting local Bazel server and connecting to it... ERROR: no such package '@@bazel_tools//platforms': BUILD file not found in directory 'platforms' of external repository @@bazel_tools. Add a BUILD file to a directory to mark it as a package. ERROR: /private/var/tmp/_bazel_jasonwang/5e6da5e0c0df3beebeb7eaebe5e37e83/external/com_google_absl/absl/BUILD.bazel:42:15: no such package '@@bazel_tools//platforms': BUILD file not found in directory 'platforms' of external repository @@bazel_tools. Add a BUILD file to a directory to mark it as a package. and referenced by '@@com_google_absl//absl:windows' ERROR: /private/var/tmp/_bazel_jasonwang/5e6da5e0c0df3beebeb7eaebe5e37e83/external/com_google_absl/absl/cleanup/BUILD.bazel:39:11: errors encountered resolving select() keys for @@com_google_absl//absl/cleanup:cleanup ERROR: Analysis of target '//cc/google/fhir_examples:ParsePatients' failed; build aborted: Analysis failed INFO: Elapsed time: 10.373s, Critical Path: 0.01s INFO: 1 process: 1 internal. ERROR: Build did NOT complete successfully FAILED: Fetching repository @@bazel_tools~cc_configure_extension~local_config_cc; starting Fetching repository @@nlohmann_json; starting Fetching repository @@icu; starting Fetching repository @@protobuf~; starting Fetching /private/var/tmp/_bazel_jasonwang/5e6da5e0c0df3beebeb7eaebe5e37e83/external/protobuf~; Extracting protobuf-all-21.7.zip Fetching repository @@maven; starting Fetching repository @@rules_java~~toolchains~remotejdk11_macos_aarch64; starting Fetching repository @@rules_java~~toolchains~remote_java_tools_darwin_arm64; starting ... (11 fetches)

Any help would be appreciated, thank you!

JsonWang95 commented 4 months ago

After changing my java version to JDK 11 (using jenv), I was able to get through this step. It seemed like I successfully generated three data direcgtories mentioned on README. Some other errors appeared, though, when I ran the "bazel build //cc/google/fhir_examples:ParsePatients" command.

Screenshot 2024-05-22 at 11 01 50 AM