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

Compilation task failed ! #5868

Open
sunmooncode opened this issue Feb 24, 2025 · 6 comments
Open

Compilation task failed ! #5868

sunmooncode opened this issue Feb 24, 2025 · 6 comments
Assignees
Labels
legacy:hands Hand tracking/gestures/etc os:linux-non-arm Issues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices. platform:c++ Issues specific to C++ framework in mediapipe stale stat:awaiting response Waiting for user response type:build/install For Build and Installation issues

Comments

@sunmooncode
Copy link

OS Platform and Distribution

ubuntu22.04

Compiler version

gcc-9.5/g++-9.5

Programming Language and version

python=3.12

Installed using virtualenv? pip? Conda?(if python)

conda base

MediaPipe version

0.10.21

Bazel version

6.5.0

XCode and Tulsi versions (if iOS)

No response

Android SDK and NDK versions (if android)

No response

Android AAR (if android)

None

OpenCV version (if running on desktop)

4.10.0-dev

Describe the problem

A bug happened!

Complete Logs

input: 
bazel build -c opt --define EXCLUDE_OPENCV_SO_LIB=1 --copt -DMESA_EGL_NO_X11_HEADERS --copt -DEGL_NO_X11   mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu

error:
ERROR: /home/adam/.cache/bazel/_bazel_adam/dce6a4a8cf6b46261188e884a81496c6/external/linux_opencv/BUILD.bazel:2:1: name 'new_local_repository' is not defined
ERROR: /home/adam/mediapipe/third_party/BUILD:299:6: no such target '@linux_opencv//:opencv': target 'opencv' not declared in package '' defined by /home/adam/.cache/bazel/_bazel_adam/dce6a4a8cf6b46261188e884a81496c6/external/linux_opencv/BUILD.bazel (Tip: use `query "@linux_opencv//:*"` to see all the targets in that package) and referenced by '//third_party:opencv_binary'
ERROR: Analysis of target '//mediapipe/examples/desktop/hand_tracking:hand_tracking_gpu' failed; build aborted: 
INFO: Elapsed time: 0.063s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (1 packages loaded, 15 targets configured)
    Fetching repository @com_google_mediapipe_palm_detection_full_tflite; starting
    Fetching repository @com_google_mediapipe_hand_landmark_full_tflite; starting
@sunmooncode sunmooncode added the type:build/install For Build and Installation issues label Feb 24, 2025
@kuaashish kuaashish added os:linux-non-arm Issues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices. platform:python MediaPipe Python issues platform:c++ Issues specific to C++ framework in mediapipe legacy:hands Hand tracking/gestures/etc type:build/install For Build and Installation issues and removed platform:python MediaPipe Python issues type:build/install For Build and Installation issues platform:c++ Issues specific to C++ framework in mediapipe os:linux-non-arm Issues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices. labels Feb 24, 2025
@kuaashish
Copy link
Collaborator

Hi @sunmooncode,

Please confirm if you can successfully build the Hello_World example as outlined in the documentation. We recommend verifying Hello_World functionality before proceeding to build the libraries.

Thank you!!

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Feb 25, 2025
@sunmooncode
Copy link
Author

Yes, the Hello_World example works!

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Feb 27, 2025
@kuaashish
Copy link
Collaborator

Hi @sunmooncode,

Could you please verify the following include paths within the linux_opencv repository definition in the WORKSPACE file?

Specifically, please confirm that:

  • include/opencv4/opencv2/**/.h correctly captures all header files within the OpenCV 4 include directory.
  • include/opencv4/ correctly specifies the base include directory for OpenCV 4.

Relevant Code Snippet:

# WORKSPACE
new_local_repository(
  name = "linux_opencv",
  build_file = "@//third_party:opencv_linux.BUILD",
  path = "/usr",
)

# opencv_linux.BUILD for OpenCV 4 installed from Debian package
cc_library(
  name = "opencv",
  hdrs = glob([
    "include/opencv4/opencv2/**/.h", # Please verify this line
  ]),
  includes = [
    "include/opencv4/", # Please verify this line
  ],
  linkopts = [
    "lib/libopencv_core.so",
    "lib/libopencv_calib3d.so",
    "lib/libopencv_features2d.so",
    "lib/libopencv_highgui.so",
    "lib/libopencv_imgcodecs.so",
    "lib/libopencv_imgproc.so",
    "lib/libopencv_video.so",
    "lib/libopencv_videoio.so",
  ],
  visibility = ["//visibility:public"],
)

Let me know if we need to reproduce this, In the case still an issue. 


Thank you!!

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Feb 27, 2025
@sunmooncode
Copy link
Author

I imported opencv using the method here, but I can't import it using the one in the official documentation, and I'd like to know why?

@google-ml-butler google-ml-butler bot removed the stat:awaiting response Waiting for user response label Feb 28, 2025
@kuaashish
Copy link
Collaborator

Hi @sunmooncode,

Please confirm the status of the above. For the second query, to ensure proper tracking, if it's an issue, provide the error log. If it's a new request, please open a separate issue with full details and a contextual title.

Thank you!!

@kuaashish kuaashish added the stat:awaiting response Waiting for user response label Feb 28, 2025
Copy link

github-actions bot commented Mar 8, 2025

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

@github-actions github-actions bot added the stale label Mar 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy:hands Hand tracking/gestures/etc os:linux-non-arm Issues on linux distributions which run on x86-64 architecture. DOES NOT include ARM devices. platform:c++ Issues specific to C++ framework in mediapipe stale stat:awaiting response Waiting for user response type:build/install For Build and Installation issues
Projects
None yet
Development

No branches or pull requests

2 participants