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.46k stars 5.15k forks source link

Building issue forr hand_tracking_cpu #4471

Closed LuckyMan26 closed 1 year ago

LuckyMan26 commented 1 year ago

OS Platform and Distribution

Windows 10

Compiler version

MSVC 14.35.32215

Programming Language and version

C++

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

No response

MediaPipe version

0.10.0

Bazel version

6.2.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)

3.4.10

Describe the problem

Hi, everybody! I am new here. Recently, I have installed mediapipe. It has no problems of building hello world application. However, following error occurs when I am trying to build hand_tracking on cpu.
My setup:
OS: windows 10
visual studio 2022 with MSVC of version 14.35.32215
SDK version is 10.0.22000.0
Bazel version 6.2.0
OpenCV version is 3.10.0
Python 3.10.11
Java 20.0.1
So at all it is problem with building tenserflow, however I cann`t figure out why it is happening and how to solve it

Complete Logs

ERROR: C:/mediapipe/mediapipe/mediapipe/calculators/core/BUILD:893:11: Compiling mediapipe/calculators/core/split_vector_calculator.cc failed: (Exit 2): cl.exe failed: error executing command (from target //mediapipe/calculators/core:split_vector_calculator)
  cd /d C:/users/artempc/_bazel_artempc/cpr34qgy/execroot/mediapipe
  SET INCLUDE=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\ATLMFC\include;C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include;C:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt;C:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt
    SET PATH=C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX64\x64;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\VCPackages;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\bin\Roslyn;C:\Program Files\Microsoft Visual Studio\2022\Community\Team Tools\Performance Tools\x64;C:\Program Files\Microsoft Visual Studio\2022\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\\x64;C:\Program Files (x86)\Windows Kits\10\bin\\x64;C:\Program Files\Microsoft Visual Studio\2022\Community\\MSBuild\Current\Bin\amd64;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\;;C:\WINDOWS\system32;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\VC\Linux\bin\ConnectionManagerExe
    SET PWD=/proc/self/cwd
    SET PYTHON_BIN_PATH=C://python_36//python.exe
    SET RUNFILES_MANIFEST_ONLY=1
    SET TEMP=C:\Users\ArtemPC\AppData\Local\Temp
    SET TMP=C:\Users\ArtemPC\AppData\Local\Temp
  C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX64\x64\cl.exe /nologo /DCOMPILER_MSVC /DNOMINMAX /D_WIN32_WINNT=0x0601 /D_CRT_SECURE_NO_DEPRECATE /D_CRT_SECURE_NO_WARNINGS /bigobj /Zm500 /EHsc /wd4351 /wd4291 /wd4250 /wd4996 /I. /Ibazel-out/x64_windows-opt/bin /Iexternal/com_google_protobuf /Ibazel-out/x64_windows-opt/bin/external/com_google_protobuf /Iexternal/com_github_glog_glog /Ibazel-out/x64_windows-opt/bin/external/com_github_glog_glog /Iexternal/com_github_gflags_gflags /Ibazel-out/x64_windows-opt/bin/external/com_github_gflags_gflags /Iexternal/com_google_absl /Ibazel-out/x64_windows-opt/bin/external/com_google_absl /Iexternal/org_tensorflow /Ibazel-out/x64_windows-opt/bin/external/org_tensorflow /Iexternal/eigen_archive /Ibazel-out/x64_windows-opt/bin/external/eigen_archive /Iexternal/bazel_tools /Ibazel-out/x64_windows-opt/bin/external/bazel_tools /Iexternal/flatbuffers /Ibazel-out/x64_windows-opt/bin/external/flatbuffers /Iexternal/ruy /Ibazel-out/x64_windows-opt/bin/external/ruy /Iexternal/cpuinfo /Ibazel-out/x64_windows-opt/bin/external/cpuinfo /Iexternal/gemmlowp /Ibazel-out/x64_windows-opt/bin/external/gemmlowp /Iexternal/pthreadpool /Ibazel-out/x64_windows-opt/bin/external/pthreadpool /Iexternal/FXdiv /Ibazel-out/x64_windows-opt/bin/external/FXdiv /Iexternal/arm_neon_2_x86_sse /Ibazel-out/x64_windows-opt/bin/external/arm_neon_2_x86_sse /Iexternal/fft2d /Ibazel-out/x64_windows-opt/bin/external/fft2d /Iexternal/XNNPACK /Ibazel-out/x64_windows-opt/bin/external/XNNPACK /Iexternal/FP16 /Ibazel-out/x64_windows-opt/bin/external/FP16 /Iexternal/farmhash_archive /Ibazel-out/x64_windows-opt/bin/external/farmhash_archive /Ibazel-out/x64_windows-opt/bin/external/com_github_glog_glog/_virtual_includes/windows_glog_headers /Ibazel-out/x64_windows-opt/bin/external/com_github_gflags_gflags/_virtual_includes/gflags /Ibazel-out/x64_windows-opt/bin/external/flatbuffers/_virtual_includes/runtime_cc /Ibazel-out/x64_windows-opt/bin/external/flatbuffers/_virtual_includes/flatbuffers /Ibazel-out/x64_windows-opt/bin/external/flatbuffers/src/_virtual_includes/flatbuffers /Ibazel-out/x64_windows-opt/bin/external/flatbuffers/src/_virtual_includes/code_generators /Ibazel-out/x64_windows-opt/bin/external/flatbuffers/src/_virtual_includes/generate_fbs /Ibazel-out/x64_windows-opt/bin/external/cpuinfo/_virtual_includes/cpuinfo /Ibazel-out/x64_windows-opt/bin/external/pthreadpool/_virtual_includes/pthreadpool /Ibazel-out/x64_windows-opt/bin/external/FXdiv/_virtual_includes/FXdiv /Ibazel-out/x64_windows-opt/bin/external/FP16/_virtual_includes/FP16 /Iexternal/com_google_protobuf/src /Ibazel-out/x64_windows-opt/bin/external/com_google_protobuf/src /Iexternal/org_tensorflow/third_party/eigen3/mkl_include /Ibazel-out/x64_windows-opt/bin/external/org_tensorflow/third_party/eigen3/mkl_include /Iexternal/eigen_archive /Ibazel-out/x64_windows-opt/bin/external/eigen_archive /Iexternal/org_tensorflow/tensorflow/lite/schema /Ibazel-out/x64_windows-opt/bin/external/org_tensorflow/tensorflow/lite/schema /Iexternal/org_tensorflow/tensorflow/lite/experimental/acceleration/configuration /Ibazel-out/x64_windows-opt/bin/external/org_tensorflow/tensorflow/lite/experimental/acceleration/configuration /Iexternal/cpuinfo/include /Ibazel-out/x64_windows-opt/bin/external/cpuinfo/include /Iexternal/cpuinfo/src /Ibazel-out/x64_windows-opt/bin/external/cpuinfo/src /Iexternal/pthreadpool/include /Ibazel-out/x64_windows-opt/bin/external/pthreadpool/include /Iexternal/FXdiv/include /Ibazel-out/x64_windows-opt/bin/external/FXdiv/include /Iexternal/XNNPACK/include /Ibazel-out/x64_windows-opt/bin/external/XNNPACK/include /Iexternal/XNNPACK/src /Ibazel-out/x64_windows-opt/bin/external/XNNPACK/src /Iexternal/FP16/include /Ibazel-out/x64_windows-opt/bin/external/FP16/include /Iexternal/farmhash_archive/src /Ibazel-out/x64_windows-opt/bin/external/farmhash_archive/src /DMEDIAPIPE_DISABLE_GPU=1 /DGOOGLE_GLOG_DLL_DECL=__declspec(dllexport) /DMEDIAPIPE_PROFILER_AVAILABLE /DEIGEN_MPL2_ONLY /DEIGEN_MAX_ALIGN_BYTES=64 /DTFLITE_KERNEL_USE_XNNPACK /DXNNPACK_DELEGATE_ENABLE_QS8=1 /DXNNPACK_DELEGATE_ENABLE_QU8=1 /DPTHREADPOOL_NO_DEPRECATED_API /DEIGEN_NEON_GEBP_NR=4 /DEIGEN_ALTIVEC_USE_CUSTOM_PACK=0 /DGEMM_KERNEL_H /DXNN_IGNORED_PLATFORM_JIT=0 /DXNN_LOG_LEVEL=0 /DXNN_ENABLE_ARM_FP16_SCALAR=0 /DXNN_ENABLE_ARM_FP16_VECTOR=0 /DXNN_ENABLE_ARM_BF16=0 /DXNN_ENABLE_ARM_DOTPROD=0 /DXNN_ENABLE_GEMM_M_SPECIALIZATION=1 /DXNN_ENABLE_JIT=0 /DXNN_ENABLE_ASSEMBLY=1 /DXNN_ENABLE_DWCONV_MULTIPASS=0 /DXNN_ENABLE_SPARSE=1 /DXNN_ENABLE_MEMOPT=1 /DTFLITE_BUILD_WITH_XNNPACK_DELEGATE /DBAZEL_CURRENT_REPOSITORY="" /showIncludes /MD /O2 /Oy- /DNDEBUG /wd4117 -D__DATE__="redacted" -D__TIMESTAMP__="redacted" -D__TIME__="redacted" /Gy /Gw /w /D_USE_MATH_DEFINES /std:c++17 /Fobazel-out/x64_windows-opt/bin/mediapipe/calculators/core/_objs/split_vector_calculator/split_vector_calculator.obj /c mediapipe/calculators/core/split_vector_calculator.cc
# Configuration: 9b04bf06a82633a97c652a18c85ac8a3ef96d071040aaab068079ddf2e036a17
# Execution platform: @local_execution_config_platform//:platform
Target //mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu failed to build
LuckyMan26 commented 1 year ago

By the way I am using following build command bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --action_env PYTHON_BIN_PATH="C://python_36//python.exe" --verbose_failures mediapipe/examples/desktop/hand_tracking:hand_tracking_cpu

kuaashish commented 1 year ago

@LuckyMan26,

Have you followed the instructions mentioned here to install the MP in Windows? From the issue description we can see that you using the Visual C++ Build Tools 2022, Which has been not tested yet. Please install Microsoft Visual C++ 2019 Redistributable and Microsoft Build Tools 2019.

Further, Python version being used is 3.10.11 But PYTHON_BIN_PATH="C://python_36//python.exe" providing the path of Python 3.6. Moreover, if you can build using the Bazel 6.1.1 probably build will not likely to fail. Please follow the instructions described above with supported version of the dependency and revet back if error still persists.

Thank you!!

LuckyMan26 commented 1 year ago

Thank you. It helped.

google-ml-butler[bot] commented 1 year ago

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