mediapipe
mediapipe copied to clipboard
mediapipe failed to build on Windows
OS Platform and Distribution
Windows 10
Compiler version
MSVC 14.29.30133
Installed using virtualenv? pip? Conda?(if python)
No
MediaPipe version
Latest
Bazel version
6.4.0
XCode and Tulsi versions (if iOS)
No
Android SDK and NDK versions (if android)
No
Android AAR (if android)
None
OpenCV version (if running on desktop)
3.4.10
Describe the problem
bazel stopped at llvm-raw extracting
Complete Logs
I've followed document here to build mediapipe on my Windows PC: https://developers.google.com/mediapipe/framework/getting_started/install
Upon executing bazel build, below error popped out all the times:
>bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 --jobs=auto --local_ram_resources=20000 --verbose_failures --action_env PYTHON_BIN_PATH="C://Python312//python.exe" mediapipe/examples/desktop/hello_world
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
Loading:
Fetching repository @llvm-raw; starting 176s
Fetching ...zel_laxus/hr7sucjp/external/llvm-raw; Extracting 8697bbe2d4aed109520e83c6beab52196ec5b702.tar.gz 175s
Server terminated abruptly (error code: 2, error message: 'Stream removed', log file: 'c:\users\laxus\_bazel_laxus\hr7sucjp\server\jvm.out')
Why error code 2 (COMMAND_LINE_ERROR) even happened while extracting tar.gz file?
Above problem is about network connection. maybe need to use vpn. I complie on the same platform:
Windows11
Compiler version BAZEL_SH=D:\msys64\usr\bin\bash.exe BAZEL_VC=D:\Program Files\Microsoft Visual Studio\2022\Community\VC BAZEL_VC_FULL_VERSION=14.29.30133 BAZEL_WINSDK_FULL_VERSION=10.0.22000.0
bazel version bazel 6.4.0
THE Result:
external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(361): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(361): error C2143: 语法错误: 缺少“,”(在“*”的 前面) external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(368): error C2065: “depth”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(368): error C2065: “rank”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(369): error C2065: “output_shape”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(369): error C2065: “depth”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(370): error C2065: “output”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(370): error C2065: “init”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(371): error C2065: “Op”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(371): error C2065: “input”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(371): error C2065: “window_shape”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(371): error C2065: “window_reduce_strides”: 未声明的标识符
I have build the hello-word successfully.
INFO: From Linking mediapipe/examples/desktop/hello_world/hello_world.exe: 正在创建库 bazel-out\x64_windows-opt\bin\mediapipe\examples\desktop\hello_world\hello_world.lib 和对象 bazel-out\x64_windows-opt\bin\mediapipe\examples\desktop\hello_world\hello_world.exp Target //mediapipe/examples/desktop/hello_world:hello_world up-to-date: bazel-bin/mediapipe/examples/desktop/hello_world/hello_world.exe INFO: Elapsed time: 321.398s, Critical Path: 49.54s INFO: 539 processes: 3 internal, 536 local. INFO: Build completed successfully, 539 total actions
Above problem is about network connection. maybe need to use vpn. I complie on the same platform:
Windows11
Compiler version BAZEL_SH=D:\msys64\usr\bin\bash.exe BAZEL_VC=D:\Program Files\Microsoft Visual Studio\2022\Community\VC BAZEL_VC_FULL_VERSION=14.29.30133 BAZEL_WINSDK_FULL_VERSION=10.0.22000.0
bazel version bazel 6.4.0
THE Result:
external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(361): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(361): error C2143: 语法错误: 缺少“,”(在“*”的 前面) external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(368): error C2065: “depth”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(368): error C2065: “rank”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(369): error C2065: “output_shape”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(369): error C2065: “depth”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(370): error C2065: “output”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(370): error C2065: “init”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(371): error C2065: “Op”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(371): error C2065: “input”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(371): error C2065: “window_shape”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(371): error C2065: “window_reduce_strides”: 未声明的标识符
I have build the hello-word successfully.
INFO: From Linking mediapipe/examples/desktop/hello_world/hello_world.exe: 正在创建库 bazel-out\x64_windows-opt\bin\mediapipe\examples\desktop\hello_world\hello_world.lib 和对象 bazel-out\x64_windows-opt\bin\mediapipe\examples\desktop\hello_world\hello_world.exp Target //mediapipe/examples/desktop/hello_world:hello_world up-to-date: bazel-bin/mediapipe/examples/desktop/hello_world/hello_world.exe INFO: Elapsed time: 321.398s, Critical Path: 49.54s INFO: 539 processes: 3 internal, 536 local. INFO: Build completed successfully, 539 total actions
I'm also having the same issue, can you please fix it?
Above problem is about network connection. maybe need to use vpn. I complie on the same platform:
Windows11
Compiler version BAZEL_SH=D:\msys64\usr\bin\bash.exe BAZEL_VC=D:\Program Files\Microsoft Visual Studio\2022\Community\VC BAZEL_VC_FULL_VERSION=14.29.30133 BAZEL_WINSDK_FULL_VERSION=10.0.22000.0
bazel version bazel 6.4.0
THE Result:
external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(361): error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 int external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(361): error C2143: 语法错误: 缺少“,”(在“*”的 前面) external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(368): error C2065: “depth”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(368): error C2065: “rank”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(369): error C2065: “output_shape”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(369): error C2065: “depth”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(370): error C2065: “output”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(370): error C2065: “init”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(371): error C2065: “Op”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(371): error C2065: “input”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(371): error C2065: “window_shape”: 未声明的标识符 external/org_tensorflow/tensorflow/lite/kernels/stablehlo_reduce_window.cc(371): error C2065: “window_reduce_strides”: 未声明的标识符
I have build the hello-word successfully.
INFO: From Linking mediapipe/examples/desktop/hello_world/hello_world.exe: 正在创建库 bazel-out\x64_windows-opt\bin\mediapipe\examples\desktop\hello_world\hello_world.lib 和对象 bazel-out\x64_windows-opt\bin\mediapipe\examples\desktop\hello_world\hello_world.exp Target //mediapipe/examples/desktop/hello_world:hello_world up-to-date: bazel-bin/mediapipe/examples/desktop/hello_world/hello_world.exe INFO: Elapsed time: 321.398s, Critical Path: 49.54s INFO: 539 processes: 3 internal, 536 local. INFO: Build completed successfully, 539 total actions
The solution is simple, Just delete comments in the file stablehlo_reduce_window at line 361, i guess it's a Encoding issues 。 The comment like below: // Recursively computes strided reductions using a sliding window over the // given tensor. // // The window is defined using a shape and a dilation. The shape defines the // elements that the window will let the reduction see. The dilation defines // the step between window elements. // // For instance: the following window has a [2, 2] shape and [2, 3] dilations. // // 3 // ┌────┐ // ┌─┐ ┌─┐ // │X│X X│X│┐ // └─┘ └─┘│2 // X X X X ┘ // ┌─┐ ┌─┐ // │X│X X│X│ // └─┘ └─┘
Hi @bleakcollaroc,
Could you please confirm whether the issue has been resolved on your end, or if you still require assistance from our end?
Thank you!!
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.
已解决,感谢
Hi @kyn817046,
Thank you for the confirmation. We are closing this issue as resolved.