google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.07k stars 5.11k forks source link

bazel:23:11: configurable attribute "srcs" in @windows_opencv//:opencv doesn't match this configuration #3728

Closed nurshafiza closed 2 years ago

nurshafiza commented 2 years ago

Command: bazel build //mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_example:mediapipe_face_detection.aar

Error:

Starting local Bazel server and connecting to it...
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_google_absl' because it already exists.
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_google_benchmark' because it already exists.
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'flatbuffers' because it already exists.
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'pybind11_bazel' because it already exists.
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_googlesource_code_re2' because it already exists.
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_google_protobuf' because it already exists.
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_google_googletest' because it already exists.
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists.
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'zlib' because it already exists.
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists.
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists.
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'build_bazel_apple_support' because it already exists.
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'xctestrunner' because it already exists.
DEBUG: C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:132:14:
Warning: skipping import of repository 'pybind11' because it already exists.
WARNING: C:/users/user/mediapipe_repo/mediapipe-0.8.11/mediapipe/framework/BUILD:54:24: in cc_library rule //mediapipe/framework:calculator_cc_proto: target '//mediapipe/framework:calculator_cc_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use.
ERROR: C:/users/user/_bazel_user/qcd27abe/external/windows_opencv/BUILD.bazel:23:11: configurable attribute "srcs" in @windows_opencv//:opencv doesn't match this configuration. Would a default condition help?

Conditions checked:
 @windows_opencv//:opt_build
 @windows_opencv//:dbg_build

To see a condition's definition, run: bazel query --output=build <condition label>.

This instance of @windows_opencv//:opencv has configuration identifier 9884703. To inspect its configuration, run: bazel config 9884703.

For more help, see https://docs.bazel.build/configurable-attributes.html#why-doesnt-my-select-choose-what-i-expect.

INFO: Repository eigen_archive instantiated at:
  C:/users/user/mediapipe_repo/mediapipe-0.8.11/WORKSPACE:484:14: in <toplevel>
  C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/tensorflow/workspace2.bzl:882:28: in workspace
  C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/tensorflow/workspace2.bzl:59:11: in _initialize_third_party
  C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/eigen3/workspace.bzl:14:20: in repo
  C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:136:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
  C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:89:35: in <toplevel>
INFO: Repository com_github_grpc_grpc instantiated at:
  C:/users/user/mediapipe_repo/mediapipe-0.8.11/WORKSPACE:484:14: in <toplevel>
  C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/tensorflow/workspace2.bzl:889:21: in workspace
  C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/tensorflow/workspace2.bzl:501:20: in _tf_repositories
  C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:136:21: in tf_http_archive
Repository rule _tf_http_archive defined at:
  C:/users/user/_bazel_user/qcd27abe/external/org_tensorflow/third_party/repo.bzl:89:35: in <toplevel>
INFO: Repository android_opencv instantiated at:
  C:/users/user/mediapipe_repo/mediapipe-0.8.11/WORKSPACE:285:13: in <toplevel>
Repository rule http_archive defined at:
  C:/users/user/_bazel_user/qcd27abe/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in <toplevel>
INFO: Repository flatbuffers instantiated at:
  C:/users/user/mediapipe_repo/mediapipe-0.8.11/WORKSPACE:152:12: in <toplevel>
  C:/users/user/mediapipe_repo/mediapipe-0.8.11/third_party/flatbuffers/workspace.bzl:6:29: in repo
Repository rule third_party_http_archive defined at:
  C:/users/user/mediapipe_repo/mediapipe-0.8.11/third_party/repo.bzl:132:43: in <toplevel>
INFO: Repository remotejdk11_win instantiated at:
  /DEFAULT.WORKSPACE.SUFFIX:140:6: in <toplevel>
  C:/users/user/_bazel_user/qcd27abe/external/bazel_tools/tools/build_defs/repo/utils.bzl:233:18: in maybe
  C:/users/user/_bazel_user/qcd27abe/external/bazel_tools/tools/jdk/remote_java_repository.bzl:48:17: in remote_java_repository
Repository rule http_archive defined at:
  C:/users/user/_bazel_user/qcd27abe/external/bazel_tools/tools/build_defs/repo/http.bzl:355:31: in <toplevel>
ERROR: Analysis of target '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/aar_example:mediapipe_face_detection.aar' failed; build aborted:
INFO: Elapsed time: 14.195s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (109 packages loaded, 9040 targets configured)
    currently loading: @org_tensorflow//tensorflow/lite/delegates/gpu/common ... (2 packages)
    Fetching @com_google_absl; fetching
    Fetching ...l_user/qcd27abe/external/com_google_absl; Extracting C:/users/user/_bazel_user/qcd27abe/external/com_google_absl/temp7033273750009165027/20210324.2.tar.gz
    Fetching @zlib; fetching
    Fetching C:/users/user/_bazel_user/qcd27abe/external/zlib; Extracting C:/users/user/_bazel_user/qcd27abe/external/zlib/temp14704991465063697304/zlib-1.2.11.tar.gz
    Fetching https://storage.googleapis.com/.../libeigen/eigen/-/archive/34780d8bd13d0af0cf17a22789ef286e8512594d/eigen-34780d8bd13d0af0cf17a22789ef286e8512594d.tar.gz
    Fetching https://storage.googleapis.com/mirror.tensorflow.org/github.com/grpc/grpc/archive/b54a5b338637f92bfcf4b0bc05e0f57a5fd8fadd.tar.gz
    Fetching https://github.com/opencv/opencv/releases/download/3.4.3/opencv-3.4.3-android-sdk.zip
    Fetching https://storage.googleapis.com/mirror.tensorflow.org/github.com/google/flatbuffers/archive/v2.0.6.tar.gz ... (9 fetches)

Seems like there's a problem for Bazel to deal with opencv. Can anyone help me with this issue? Thank you!

kuaashish commented 2 years ago

Hi @nurshafiza, It seems, opencv installed but did not link properly with bazel. Could you please follow this thread and add mentioned opencv library into the WORKSPACE. Thank you!

google-ml-butler[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

google-ml-butler[bot] commented 2 years ago

Closing as stale. Please reopen if you'd like to work on this further.

google-ml-butler[bot] commented 2 years ago

Are you satisfied with the resolution of your issue? Yes No