tflite-support
tflite-support copied to clipboard
"Label '//tools/build_defs/js/jspb_proto_library:rules.bzl' is invalid because 'tools/build_defs/js/jspb_proto_library' is not a package;" when building ImageSearcher
After I downloaded the tflite file as instructed in the instructions for ImageSearcher, and git cloned the tflite-support repository in the same directory, I ran the command and got the following error:
$ bazel run -c opt tensorflow_lite_support/examples/task/vision/desktop:image_embedder_demo -- --model_path=../mobilenet_v3_embedder.tflite --l2_norm
alize --first_image_path=$(pwd)/tensorflow_lite_support/cc/test/testdata/task/vision/burger.jpg --second_image_path=$(pwd)/tensorflow_lite_support/cc/test/testdata/task/vision/burger_crop.jpg
WARNING: Option 'java_toolchain' is deprecated
WARNING: Option 'host_java_toolchain' is deprecated
INFO: Options provided by the client:
Inherited 'common' options: --isatty=1 --terminal_columns=238
INFO: Reading rc options for 'run' from /home/bperel/image_searchertflite-support/.bazelrc:
Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'run' from /home/bperel/image_searchertflite-support/.bazelrc:
Inherited 'build' options: --java_toolchain=//third_party/toolchains/java:tf_java_toolchain --host_java_toolchain=//third_party/toolchains/java:tf_java_toolchain --action_env ANDROID_NDK_HOME --action_env ANDROID_NDK_API_LEVEL --action_env ANDROID_BUILD_TOOLS_VERSION --action_env ANDROID_SDK_API_LEVEL --action_env ANDROID_SDK_HOME --define framework_shared_object=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --spawn_strategy=local -c opt --announce_rc --define=grpc_no_ares=true --noincompatible_remove_legacy_whole_archive --enable_platform_specific_config --config=short_logs --config=v2
INFO: Found applicable config definition build:short_logs in file /home/bperel/image_searchertflite-support/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /home/bperel/image_searchertflite-support/.bazelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:linux in file /home/bperel/image_searchertflite-support/.bazelrc: --copt=-w --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
DEBUG: Rule 'robolectric' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "97f169d39f19412bdd07fd6c274dcda0a7c8f623f7f00aa5a3b94994fc6f0ec4"
DEBUG: Repository robolectric instantiated at:
/home/bperel/image_searchertflite-support/WORKSPACE:10:26: in <toplevel>
/home/bperel/image_searchertflite-support/workspace8.bzl:78:17: in tflite_support_workspace8
Repository rule http_archive defined at:
/home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/bazel_tools/tools/build_defs/repo/http.bzl:353:31: in <toplevel>
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/llvm/llvm-project/archive/0258a53521cfedf5cb80c2b1d4a66c942615de74.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/tensorflow/runtime/archive/7d879c8b161085a4374ea481b93a52adb19c0529.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_google_absl' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'flatbuffers' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'icu' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_googlesource_code_re2' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'six_archive' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'absl_py' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_google_protobuf' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_google_googletest' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'zlib' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'fft2d' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'snappy' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'build_bazel_apple_support' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'pybind11' because it already exists.
DEBUG: /home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'pybind11_protobuf' because it already exists.
WARNING: Download from https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/benchmark/archive/f7547e29ccaed7b64ef4f7495ecfff1c9f6f3d03.tar.gz failed: class java.io.FileNotFoundException GET returned 404 Not Found
DEBUG: Rule 'android_test_support' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "0c5d67ea781c25d9400394279a12eac3d75eda09cabe8ef73c0185575ec90e4d"
DEBUG: Repository android_test_support instantiated at:
/home/bperel/image_searchertflite-support/WORKSPACE:28:26: in <toplevel>
/home/bperel/image_searchertflite-support/workspace2.bzl:25:17: in tflite_support_workspace2
Repository rule http_archive defined at:
/home/bperel/.cache/bazel/_bazel_bperel/7437cd7142e00480c0bc4c0ecbd2224b/external/bazel_tools/tools/build_defs/repo/http.bzl:353:31: in <toplevel>
ERROR: /home/bperel/image_searchertflite-support/tensorflow_lite_support/examples/task/vision/desktop/BUILD:88:10: error loading package 'tensorflow_lite_support/cc/task/core/proto': Label '//tools/build_defs/js/jspb_proto_library:rules.bzl' is invalid because 'tools/build_defs/js/jspb_proto_library' is not a package; perhaps you meant to put the colon here: '//:tools/build_defs/js/jspb_proto_library/rules.bzl'? and referenced by '//tensorflow_lite_support/examples/task/vision/desktop:image_embedder_demo'
ERROR: Analysis of target '//tensorflow_lite_support/examples/task/vision/desktop:image_embedder_demo' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.102s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
currently loading: tensorflow_lite_support/cc/task/vision/utils ... (6 packages)
I see some warnings about missing files to download but I'm not sure if that's related to the error at the end.
System: Ubuntu 22.04.2 Bazel version: 5.1.1
Let me know if I can provide more system information.
Thanks for flagging this issue. We're looking into a fix now.
Do you have any update for this yet ? @lu-wang-g