homuler / MediaPipeUnityPlugin

Unity plugin to run MediaPipe
MIT License
1.76k stars 461 forks source link

Run cmd "bazel --output_user_root=C:\_bzl build --java_runtime_version=remotejdk_11 //src:bazel.exe " has some error and can't do next step #637

Closed a591537394 closed 2 years ago

a591537394 commented 2 years ago

Plugin Version or Commit ID

v0.10.0

Unity Version

2021.2.13f1

Your Host OS

Windows10 Education

Target Platform

Windows Standalone

[Windows Only] Visual Studio C++ and Windows SDK Version

Visual Studio C++: 14.30.30704.0 Window SDK: 10.1.19041.685

[Linux Only] GCC/G++ and GLIBC Version

No response

[Android Only] Android Build Tools and NDK Version

No response

[iOS Only] XCode Version

No response

Command Sequences

I had change the docker file, because i can't download successful the corresponding file via Shell. So i download the corresponding file to my blob services, the version or any other thing is same to source

Dockerfile

ARG NODE_VERSION=16.13.0 ARG PYTHON_VERSION=3.9.9 ARG ANDROID_SDK_VERSION=30 ARG ANDROID_NDK_VERSION=21.4.7075529 FROM mcr.microsoft.com/windows/servercore:ltsc2019 as base SHELL ["cmd", "/C"]

RUN mkdir C:\TEMP FROM base as builder ARG NODE_VERSION

RUN setx path "C:\msys64\usr\bin;%PATH%"

RUN curl -L https://ipench.cn/static/msys2-base-x86_64-20210604.sfx.exe -o C:\TEMP\msys2-installer.exe && C:\TEMP\msys2-installer.exe -y -oC:\ && del C:\TEMP\msys2-installer.exe

RUN bash.exe -l -c "pacman -Syuu --needed --noconfirm --noprogressbar" && bash.exe -l -c "pacman -Syu --needed --noconfirm --noprogressbar" && bash.exe -l -c "pacman -Sy --needed --noconfirm --noprogressbar" && bash.exe -l -c "pacman -S --needed --noconfirm git patch unzip zip p7zip" && bash.exe -l -c "rm -r /var/cache/pacman/pkg/*"

ARG CHANNEL_URL=https://aka.ms/vs/16/release/channel

RUN curl -L https://nodejs.org/dist/v%NODE_VERSION%/node-v%NODE_VERSION%-x64.msi -o C:\TEMP\node-install.msi && start /wait msiexec.exe /i C:\TEMP\node-install.msi /l*vx "%TEMP%\MSI-node-install.log" /qn ADDLOCAL=ALL && del C:\TEMP\node-install.msi && curl -L %CHANNEL_URL% -o C:\TEMP\VisualStudio.chman && curl -L https://aka.ms/vs/16/release/vs_buildtools.exe -o C:\TEMP\vs_buildtools.exe && C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache --installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" --channelUri C:\TEMP\VisualStudio.chman --installChannelUri C:\TEMP\VisualStudio.chman --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended && curl -L https://aka.ms/vs/16/release/vc_redist.x64.exe -o C:\TEMP\vc_redist.x64.exe && start /wait C:\TEMP\vc_redist.x64.exe /install /quiet /norestart && del C:\TEMP\vc_redist.x64.exe

FROM base as python

ARG PYTHON_VERSION

RUN curl -L https://www.python.org/ftp/python/%PYTHON_VERSION%/python-%PYTHON_VERSION%-amd64.exe -o C:\TEMP\python-installer.exe && C:\TEMP\python-installer.exe -Wait /quiet InstallAllUsers=1 TargetDir=C:\Python PrependPath=1 Shortcuts=0 Include_doc=0 Include_test=0 && del C:\TEMP\python-installer.exe && C:\Python\python.exe -m pip install --upgrade pip && C:\Python\python.exe -m pip install numpy

FROM base as opencv

RUN curl -L https://www.ipench.cn/static/opencv-3.4.16-vc14_vc15.exe -o C:\TEMP\opencv-installer.exe && start /wait C:\TEMP\opencv-installer.exe -gm2 -y -oC:\ && del C:\TEMP\opencv-installer.exe

FROM builder as android

ARG ANDROID_SDK_VERSION ARG ANDROID_NDK_VERSION

ENV OPENJDK_ZIP OpenJDK11U-jdk_x64.zip ENV OPENJDK_SHA256 087d096032efe273d7e754a25c85d8e8cf44738a3e597ad86f55e0971acc3b8e ENV JAVA_HOME C:\Java\jdk-11.0.13+8

RUN curl -L https://ipench.cn/static/OpenJDK11U-jdk_x64_windows_hotspot_11.0.13_8.zip -o C:\TEMP\%OPENJDK_ZIP% && for /F %s in ('sha256sum /c/TEMP/%OPENJDK_ZIP%') do ((test "%s" = "%OPENJDK_SHA256%" || (echo %s 'Checksum Failed' && exit 1))) && unzip C:\TEMP\%OPENJDK_ZIP% -d C:\Java && ` del C:\TEMP\%OPENJDK_ZIP%

ENV COMMANDLINETOOLS_ZIP commandlinetools.zip ENV COMMANDLINETOOLS_SHA256 f9e6f91743bcb1cc6905648ca751bc33975b0dd11b50d691c2085d025514278c

RUN curl -L https://ipench.cn/static/commandlinetools-win-7583922_latest.zip -o C:\TEMP\%COMMANDLINETOOLS_ZIP% && for /F %s in ('sha256sum /c/TEMP/%COMMANDLINETOOLS_ZIP%') do ((test "%s" = "%COMMANDLINETOOLS_SHA256%" || (echo 'Checksum Failed' && exit 1))) && unzip C:\TEMP\%COMMANDLINETOOLS_ZIP% -d C:\Android && ` del C:\TEMP\%COMMANDLINETOOLS_ZIP%

RUN powershell -command "for($i=0;$i -lt 30;$i++) { $response += """yn""" }; $response" | C:\Android\cmdline-tools\bin\sdkmanager --sdk_root=C:\Android --licenses && C:\Android\cmdline-tools\bin\sdkmanager --sdk_root=C:\Android --install "platforms;android-%ANDROID_SDK_VERSION%" "build-tools;30.0.3" ` "ndk;%ANDROID_NDK_VERSION%"

FROM builder

ARG ANDROID_NDK_VERSION

ENV ANDROID_HOME C:\Android ENV ANDROID_NDK_HOME ${ANDROID_HOME}\ndk\${ANDROID_NDK_VERSION} ENV PYTHON_INSTALL_PATH=C:\Python ENV PYTHON_BIN_PATH=${PYTHON_INSTALL_PATH}\python.exe

RUN setx path "C:\bin;%PYTHON_INSTALL_PATH%;%PYTHON_INSTALL_PATH%\Scripts;%PATH%" && mkdir C:\bin && curl -L https://ipench.cn/static/bazelisk-windows-amd64.exe -o C:\bin\bazel.exe && ` curl -L https://ipench.cn/static/nuget.exe -o C:\bin\nuget.exe

COPY --from=python C:\Python C:\Python COPY --from=opencv C:\opencv C:\opencv COPY --from=android C:\Android C:\Android

ENV WS_LONG_PATHS_VERSION 3.4.1 ENV WS_LONG_PATHS_BASE ndk-wsls-${WS_LONG_PATHS_VERSION} ENV WS_LONG_PATHS_7Z ${WS_LONG_PATHS_BASE}.7z

RUN curl -L https://www.ipench.cn/static/%WS_LONG_PATHS_7Z% -o C:\TEMP\%WS_LONG_PATHS_7Z% && bash.exe -c "7z x -o/c/TEMP /c/TEMP/${WS_LONG_PATHS_7Z}" && C:\TEMP\%WS_LONG_PATHS_BASE%\install.bat %ANDROID_NDK_HOME% %ANDROID_HOME%

Must be run in a separated RUN command to avoid "The process cannot access the file because it is being used by another process" error

RUN del C:\TEMP\%WS_LONG_PATHS_7Z% && ` rmdir /s /q C:\TEMP\%WS_LONG_PATHS_BASE%

WORKDIR C:\mediapipe

COPY packages.config . COPY .bazelrc . COPY .bazelversion . COPY build.py . COPY WORKSPACE . COPY mediapipe_api mediapipe_api COPY third_party third_party

CMD ["cmd"]

Run Image docker run --cpus=16 --memory=32g --mount type=bind,src=F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\Packages,dst=C:\mediapipe\Packages --mount type=bind,src=F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\Assets,dst=C:\mediapipe\Assets -it mediapipe_unity:windows

Apply a patch to bazel Rem Run inside the container

git clone https://github.com/bazelbuild/bazel.git C:\bazel cd C:\bazel git checkout 5.2.0 git apply ..\mediapipe\third_party\bazel_android_fixes.diff bazel --output_user_root=C:_bzl build --java_runtime_version=remotejdk_11 //src:bazel.exe

And then ,i got a error and can't run next CMD

Log

PS F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0> docker run --cpus=16 --memory=32g --mount type=bind,src=F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\Packages,dst=C:\mediapipe\Packages --mount type=bind,src=F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\Assets,dst=C:\mediapipe\Assets -it mediapipe_unity:windows Microsoft Windows [Version 10.0.17763.3046] (c) 2018 Microsoft Corporation. All rights reserved.

C:\mediapipe>git clone https://github.com/bazelbuild/bazel.git C:\bazel Cloning into '/c/bazel'... remote: Enumerating objects: 622505, done. remote: Counting objects: 100% (1199/1199), done. remote: Compressing objects: 100% (768/768), done. error: 4803 bytes of body are still expected.23 MiB | 63.00 KiB/s fetch-pack: unexpected disconnect while reading sideband packet fatal: early EOF fatal: fetch-pack: invalid index-pack output

C:\mediapipe>git clone https://github.com/bazelbuild/bazel.git C:\bazel Cloning into '/c/bazel'... remote: Enumerating objects: 622511, done. remote: Counting objects: 100% (1206/1206), done. remote: Compressing objects: 100% (763/763), done. remote: Total 622511 (delta 418), reused 1016 (delta 293), pack-reused 621305 Receiving objects: 100% (622511/622511), 842.53 MiB | 14.71 MiB/s, done. Resolving deltas: 100% (389012/389012), done. Updating files: 100% (9349/9349), done.

C:\mediapipe>cd C:\bazel

C:\bazel>git checkout 5.2.0 Updating files: 100% (3706/3706), done. Note: switching to '5.2.0'.

You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 2e8458b781 Release 5.2.0 (2022-06-07)

C:\bazel>git apply ..\mediapipe\third_party\bazel_android_fixes.diff

C:\bazel>bazel --output_user_root=C:_bzl build --java_runtime_version=remotejdk_11 //src:bazel.exe 2022/07/03 16:36:42 could not resolve the version 'latest' to an actual version number: unable to determine latest versi on: could not list Bazel versions in GCS bucket: could not list GCS objects at https://www.googleapis.com/storage/v1/b/b azel/o?delimiter=/: could not fetch https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: Get "https://www.google apis.com/storage/v1/b/bazel/o?delimiter=/": dial tcp 172.217.160.74:443: i/o timeout

C:\bazel>bazel --output_user_root=C:_bzl build --java_runtime_version=remotejdk_11 //src:bazel.exe 2022/07/03 19:11:25 could not resolve the version 'latest' to an actual version number: unable to determine latest versi on: could not list Bazel versions in GCS bucket: could not list GCS objects at https://www.googleapis.com/storage/v1/b/b azel/o?delimiter=/: could not fetch https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: Get "https://www.google apis.com/storage/v1/b/bazel/o?delimiter=/": read tcp 172.19.244.227:49627->172.217.160.74:443: wsarecv: An existing conn ection was forcibly closed by the remote host.

C:\bazel>bazel --output_user_root=C:_bzl build --java_runtime_version=remotejdk_11 //src:bazel.exe 2022/07/03 19:12:02 could not resolve the version 'latest' to an actual version number: unable to determine latest versi on: could not list Bazel versions in GCS bucket: could not list GCS objects at https://www.googleapis.com/storage/v1/b/b azel/o?delimiter=/: could not fetch https://www.googleapis.com/storage/v1/b/bazel/o?delimiter=/: Get "https://www.google apis.com/storage/v1/b/bazel/o?delimiter=/": dial tcp 142.251.43.10:443: i/o timeout

Additional Context

I had change the docker file, because i can't download successful the corresponding file via Shell. So i download the corresponding file to my blob services, the version or any other thing is same to source. please help me,really very thanks.

homuler commented 2 years ago

You're building bazel.exe, but you can skip that step if you don't need to build for Android (cf. https://github.com/homuler/MediaPipeUnityPlugin/wiki/Installation-Guide#docker-windows-container). If you need to build for Android, you can use a Linux Docker container instead and it's far easier.

a591537394 commented 2 years ago

Okay, i'm trying that

a591537394 commented 2 years ago

You're building bazel.exe, but you can skip that step if you don't need to build for Android (cf. https://github.com/homuler/MediaPipeUnityPlugin/wiki/Installation-Guide#docker-windows-container). If you need to build for Android, you can use a Linux Docker container instead and it's far easier.

I had tryed many way, but i'am still can't download the target file. how can i proxy the target file to other url? the shell log like below, and show "could not download Bazel because handshake timeout."

PS F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0> docker run --cpus=8 --memory=16g --mount type=bind,src=F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\Packages,dst=C:\mediapipe\Packages --mount type=bind,src=F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\Assets,dst=C:\mediapipe\Assets -it mediapipe_unity:windows

Microsoft Windows [Version 10.0.17763.3046] (c) 2018 Microsoft Corporation. All rights reserved. C:\mediapipe>python build.py build --desktop cpu -vv INFO (build.py): Building protobuf sources... DEBUG (build.py): Running bazel --output_user_root C:/_bzl build -c opt --action_env PYTHON_BIN_PATH="C://Python//pytho n.exe" --action_env ProgramData --action_env PROCESSOR_ARCHITECTURE --action_env PROCESSOR_IDENTIFIER --action_env PROCE SSOR_LEVEL --action_env PROCESSOR_REVISION --verbose_failures //mediapipe_api:mediapipe_proto_srcs 2022/07/04 22:03:19 Downloading https://releases.bazel.build/5.0.0/release/bazel-5.0.0-windows-x86_64.exe... 2022/07/04 22:03:30 could not download Bazel: HTTP GET https://releases.bazel.build/5.0.0/release/bazel-5.0.0-windows-x8 6_64.exe failed: Get "https://releases.bazel.build/5.0.0/release/bazel-5.0.0-windows-x86_64.exe": net/http: TLS handshak e timeout Traceback (most recent call last): File "C:\mediapipe\build.py", line 450, in Argument().command().run() File "C:\mediapipe\build.py", line 109, in run self._run_command(self._build_proto_srcs_commands()) File "C:\mediapipe\build.py", line 54, in _run_command return subprocess.run(' '.join(command_list), check=True, shell=shell) File "C:\Python\lib\subprocess.py", line 528, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'bazel --output_user_root C:/_bzl build -c opt --action_env PYTHON_BIN_PATH="C:// Python//python.exe" --action_env ProgramData --action_env PROCESSOR_ARCHITECTURE --action_env PROCESSOR_IDENTIFIER --act ion_env PROCESSOR_LEVEL --action_env PROCESSOR_REVISION --verbose_failures //mediapipe_api:mediapipe_proto_srcs' returne d non-zero exit status 1.

homuler commented 2 years ago

2022/07/04 22:03:19 Downloading https://releases.bazel.build/5.0.0/release/bazel-5.0.0-windows-x86_64.exe...

First, please pull the latest commit. You cannot build with the bazel 5.0.0 anymore (cf. https://github.com/homuler/MediaPipeUnityPlugin/pull/623).

I cannot resolve your network issue. To mitigate it, change the timeout configurations (cf. https://github.com/homuler/MediaPipeUnityPlugin/issues/536#issuecomment-1101220793).

a591537394 commented 2 years ago

2022/07/04 22:03:19 Downloading https://releases.bazel.build/5.0.0/release/bazel-5.0.0-windows-x86_64.exe...

First, please pull the latest commit. You cannot build with the bazel 5.0.0 anymore (cf. #623).

I cannot resolve your network issue. To mitigate it, change the timeout configurations (cf. #536 (comment)).

i'm find that my network is not problem; I can download the bazel directly via “curl https://releases.bazel.build/5.0.0/release/bazel-5.0.0-windows-x86_64.exe” in docker container, but if i input bazel directly, shell will throw "2022/07/04 23:05:11 could not download Bazel: HTTP GET https://releases.bazel.build/5.0.0/release/bazel-5.0.0-windows-x86_64.exe failed: Get "https:// releases.bazel.build/5.0.0/release/bazel-5.0.0-windows-x86_64.exe": net/http: TLS handshake timeout"

a591537394 commented 2 years ago

the run step like below, everything is executed in container. image

homuler commented 2 years ago

I don't know but you may want to set BAZELISK_BASE_URL (cf. https://github.com/bazelbuild/bazelisk/issues/234).

By the way, I'm not sure but if you downloaded the binary, I think this error can be resolved if you place it under %LocalAppData%\bazelisk\downloads. If you have any further questions about bazelisk, please ask at the bazelisk repository.

P.S. Note that you cannot build this plugin with the bazel 5.0.0 (https://github.com/homuler/MediaPipeUnityPlugin/issues/637#issuecomment-1173879080).

a591537394 commented 2 years ago

I don't know but you may want to set BAZELISK_BASE_URL (cf. bazelbuild/bazelisk#234).

By the way, I'm not sure but if you downloaded the binary, I think this error can be resolved if you place it under %LocalAppData%\bazelisk\downloads. If you have any further questions about bazelisk, please ask at the bazelisk repository.

P.S. Note that you cannot build this plugin with the bazel 5.0.0 (#637 (comment)).

I had tryed the other way "Windows -- windows 10" which is in wiki. and then ,the compiler can be running,but some error in build is been throwed

the key log

image

the full log from cmd

F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0>python build.py build --desktop cpu --opencv=cmake -v INFO (build.py): Building protobuf sources... DEBUG (build.py): Running bazel --output_user_root C:/_bzl build -c opt --action_env PYTHON_BIN_PATH="F://DevelopEnvironment//Python//3.10.5//python.exe" --action_env ProgramData --action_env PROCESSOR_ARCHITECTURE --action_env PROCESSOR_IDENTIFIER --action_env PROCESSOR_LEVEL --action_env PROCESSOR_REVISION //mediapipe_api:mediapipe_proto_srcs WARNING: Ignoring JAVA_HOME, because it must point to a JDK, not a JRE. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_google_absl' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_google_benchmark' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'pybind11_bazel' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_google_protobuf' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_google_googletest' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'rules_python' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'build_bazel_apple_support' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'xctestrunner' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'pybind11' because it already exists. INFO: Build options --@opencv//:switch and --define have changed, discarding analysis cache. INFO: Analyzed target //mediapipe_api:mediapipe_proto_srcs (0 packages loaded, 1003 targets configured). INFO: Found 1 target... Target //mediapipe_api:mediapipe_proto_srcs up-to-date: bazel-bin/mediapipe_api/mediapipe_proto_srcs.zip INFO: Elapsed time: 0.428s, Critical Path: 0.00s INFO: 1 process: 1 internal. INFO: Build completed successfully, 1 total action DEBUG (build.py): Unarchiving 'bazel-bin\mediapipe_api\mediapipe_proto_srcs.zip' to 'build\Scripts\Protobuf'... INFO (build.py): Built protobuf sources INFO (build.py): Downloading dlls... DEBUG (build.py): Running nuget install -o .nuget -Source https://api.nuget.org/v3/index.json Feeds used: C:\Users\Administrator.nuget\packages\ https://api.nuget.org/v3/index.json

F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\packages.config 中列出的所有程序包均已安装。 DEBUG (build.py): Copying '.nuget\Google.Protobuf.3.20.0\lib\netstandard2.0\Google.Protobuf.dll' to 'build\Plugins\Protobuf\Google.Protobuf.dll'... DEBUG (build.py): Changing the mode of 'build\Plugins\Protobuf\Google.Protobuf.dll'... DEBUG (build.py): Copying '.nuget\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll' to 'build\Plugins\Protobuf\System.Buffers.dll'... DEBUG (build.py): Changing the mode of 'build\Plugins\Protobuf\System.Buffers.dll'... DEBUG (build.py): Copying '.nuget\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll' to 'build\Plugins\Protobuf\System.Memory.dll'... DEBUG (build.py): Changing the mode of 'build\Plugins\Protobuf\System.Memory.dll'... DEBUG (build.py): Copying '.nuget\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll' to 'build\Plugins\Protobuf\System.Runtime.CompilerServices.Unsafe.dll'... DEBUG (build.py): Changing the mode of 'build\Plugins\Protobuf\System.Runtime.CompilerServices.Unsafe.dll'... INFO (build.py): Downloaded protobuf dlls INFO (build.py): Building resource files DEBUG (build.py): Running bazel --output_user_root C:/_bzl build -c opt --action_env PYTHON_BIN_PATH="F://DevelopEnvironment//Python//3.10.5//python.exe" --action_env ProgramData --action_env PROCESSOR_ARCHITECTURE --action_env PROCESSOR_IDENTIFIER --action_env PROCESSOR_LEVEL --action_env PROCESSOR_REVISION //mediapipe_api:mediapipe_assets WARNING: Ignoring JAVA_HOME, because it must point to a JDK, not a JRE. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_google_absl' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_google_benchmark' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'pybind11_bazel' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_google_protobuf' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_google_googletest' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'rules_python' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'build_bazel_apple_support' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'xctestrunner' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'pybind11' because it already exists. INFO: Analyzed target //mediapipe_api:mediapipe_assets (0 packages loaded, 30 targets configured). INFO: Found 1 target... Target //mediapipe_api:mediapipe_assets up-to-date: bazel-bin/mediapipe_api/mediapipe_assets.zip INFO: Elapsed time: 0.329s, Critical Path: 0.00s INFO: 1 process: 1 internal. INFO: Build completed successfully, 1 total action DEBUG (build.py): Unarchiving 'bazel-bin\mediapipe_api\mediapipe_assets.zip' to 'build\Resources'... DEBUG (build.py): Unarchiving 'bazel-bin\mediapipe_api\mediapipe_assets.zip' to 'Assets\StreamingAssets'... INFO (build.py): Built resource files INFO (build.py): Building native libraries for Desktop... DEBUG (build.py): Running bazel --output_user_root C:/_bzl build -c opt --action_env PYTHON_BIN_PATH="F://DevelopEnvironment//Python//3.10.5//python.exe" --action_env ProgramData --action_env PROCESSOR_ARCHITECTURE --action_env PROCESSOR_IDENTIFIER --action_env PROCESSOR_LEVEL --action_env PROCESSOR_REVISION --define MEDIAPIPE_DISABLE_GPU=1 --@opencv//:switch=cmake_static //mediapipe_api:mediapipe_desktop WARNING: Ignoring JAVA_HOME, because it must point to a JDK, not a JRE. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_google_absl' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_google_benchmark' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'pybind11_bazel' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_google_protobuf' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_google_googletest' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'com_github_gflags_gflags' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'rules_python' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'build_bazel_rules_apple' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'build_bazel_rules_swift' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'build_bazel_apple_support' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'xctestrunner' because it already exists. DEBUG: C:/_bzl/qk4m6ui6/external/org_tensorflow/third_party/repo.bzl:124:14: Warning: skipping import of repository 'pybind11' because it already exists. INFO: Build options --@opencv//:switch and --define have changed, discarding analysis cache. WARNING: C:/_bzl/qk4m6ui6/external/com_google_mediapipe/mediapipe/framework/tool/BUILD:184:24: in cc_library rule @com_google_mediapipe//mediapipe/framework/tool:field_data_cc_proto: target '@com_google_mediapipe//mediapipe/framework/tool:field_data_cc_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use. WARNING: C:/_bzl/qk4m6ui6/external/com_google_mediapipe/mediapipe/framework/BUILD:54:24: in cc_library rule @com_google_mediapipe//mediapipe/framework:calculator_cc_proto: target '@com_google_mediapipe//mediapipe/framework:calculator_cc_proto' depends on deprecated target '@com_google_protobuf//:cc_wkt_protos': Only for backward compatibility. Do not use. INFO: Analyzed target //mediapipe_api:mediapipe_desktop (0 packages loaded, 20447 targets configured). INFO: Found 1 target... ERROR: C:/_bzl/qk4m6ui6/external/com_google_mediapipe/mediapipe/modules/objectron/calculators/BUILD:98:24: Compiling external/com_google_mediapipe/mediapipe/modules/objectron/calculators/lift_2d_frame_annotation_to_3d_calculator.pb.cc [for tool] failed: (Exit 2): cl.exe failed: error executing command (from target @com_google_mediapipe//mediapipe/modules/objectron/calculators:lift_2d_frame_annotation_to_3d_calculator_cc_proto) F:\Axilinary_SoftWare\VisualStudio2022\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\cl.exe ... (remaining 1 argument skipped) 用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.31.31104 版 版权所有(C) Microsoft Corporation。保留所有权利。

cl: 命令行 error D8022 :无法打开“bazel-out/x64_windows-opt-exec-50AE0418/bin/external/com_google_mediapipe/mediapipe/modules/objectron/calculators/_objs/lift_2d_frame_annotation_to_3d_calculator_cc_proto/lift_2d_frame_annotation_to_3d_calculator.pb.obj.params” Target //mediapipe_api:mediapipe_desktop failed to build Use --verbose_failures to see the command lines of failed build steps. INFO: Elapsed time: 1.040s, Critical Path: 0.22s INFO: 129 processes: 129 internal. FAILED: Build did NOT complete successfully Traceback (most recent call last): File "F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\build.py", line 450, in Argument().command().run() File "F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\build.py", line 138, in run self._run_command(self._build_desktop_commands()) File "F:\Game\Cicadawings\InteractiveTech\MediaPipeUnityPlugin-0.10.0\build.py", line 54, in _run_command return subprocess.run(' '.join(command_list), check=True, shell=shell) File "F:\DevelopEnvironment\Python\3.10.5\lib\subprocess.py", line 524, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'bazel --output_user_root C:/_bzl build -c opt --action_env PYTHON_BIN_PATH="F://DevelopEnvironment//Python//3.10.5//python.exe" --action_env ProgramData --action_env PROCESSOR_ARCHITECTURE --action_env PROCESSOR_IDENTIFIER --action_env PROCESSOR_LEVEL --action_env PROCESSOR_REVISION --define MEDIAPIPE_DISABLE_GPU=1 --@opencv//:switch=cmake_static //mediapipe_api:mediapipe_desktop' returned non-zero exit status 1.

homuler commented 2 years ago

Please check if there's the same issue before asking questions (cf. https://github.com/homuler/MediaPipeUnityPlugin/issues?q=D8022).

If you don't know how to build the plugin,

a591537394 commented 2 years ago

Please check if there's the same issue before asking questions (cf. https://github.com/homuler/MediaPipeUnityPlugin/issues?q=D8022).

If you don't know how to build the plugin,

oho, nice ,really very thanks.