google-ai-edge / ai-edge-torch

Supporting PyTorch models with the Google AI Edge TFLite runtime.
Apache License 2.0
228 stars 26 forks source link

failed to build text_generator_main #10

Closed huanyingjun closed 2 months ago

huanyingjun commented 2 months ago

Description of the bug:

Dear I am trying to build text_generator_main Ubuntu 20.04 and bazel version is 6.5.0 bazel build -c opt //ai_edge_torch/generative/examples/c++:text_generator_main got below error: ERROR: Analysis of target '//ai_edge_torch/generative/examples/c++:text_generator_main' failed; build aborted: error loading package '@org_tensorflow//tensorflow': at /home/wj/.cache/bazel/_bazel_wj/e92654fd95961aa769d9c27b68cd04f9/external/org_tensorflow/tensorflow/core/platform/build_config.bzl:4:5: at /home/wj/.cache/bazel/_bazel_wj/e92654fd95961aa769d9c27b68cd04f9/external/local_tsl/tsl/platform/build_config.bzl:4:5: at /home/wj/.cache/bazel/_bazel_wj/e92654fd95961aa769d9c27b68cd04f9/external/local_tsl/tsl/platform/default/build_config.bzl:4:6: at /home/wj/.cache/bazel/_bazel_wj/e92654fd95961aa769d9c27b68cd04f9/external/com_google_protobuf/protobuf.bzl:4:6: Unable to find package for @rules_python//python:defs.bzl: The repository '@rules_python' could not be resolved: Repository '@rules_python' is not defined. INFO: Elapsed time: 0.117s INFO: 0 processes. ERROR: Build failed. Not running target FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured) currently loading: @org_tensorflow//tensorflow Fetching repository @com_github_grpc_grpc; starting

could you please help check this issue ?

Actual vs expected behavior:

No response

Any other information you'd like to share?

No response

hheydary commented 2 months ago

Greetings,

Please update your bazel installation to the latest version. That should fix the error you are seeing.