Closed emirvision closed 2 years ago
I just upgraded my Windows version and could not reproduce this error.
Edition Windows 10 Pro Version 21H2 OS Build 19044.1348 Experience Windows Feature Experience Pack 120.2212.3920.0
Can you upgrade the version to 21H2, recreate the image (without cache) and check it again?
docker build --no-cache -t mediapipe_unity:windows . -f docker/windows/x86_64/Dockerfile
If the error still persists, run the following command instead as a workaround.
python build.py build --desktop cpu --include_opencv_libs -vv
I just upgraded my Windows version and could not reproduce this error.
Edition Windows 10 Pro Version 21H2 OS Build 19044.1348 Experience Windows Feature Experience Pack 120.2212.3920.0
Can you upgrade the version to 21H2, recreate the image (without cache) and check it again?
docker build --no-cache -t mediapipe_unity:windows . -f docker/windows/x86_64/Dockerfile
If the error still persists, run the following command instead as a workaround.
python build.py build --desktop cpu --include_opencv_libs -vv
Thank you, i tried the second command and it worked.
System information
error for opencv=cmake when running "python build.py build --desktop cpu --opencv=cmake -v"
I follewed instructions on docker for windows section.
Full logs
INFO: Found 1 target... ERROR: C:/_bzl/3vmcl3ou/external/opencv/BUILD.bazel:83:6: Foreign Cc - CMake: Building opencv_cmake failed: (Exit 1): bash.exe failed: error executing command C:/msys64/usr/bin/bash.exe -c bazel-out/x64_windows-opt/bin/external/opencv/op encv_cmake_foreign_cc/wrapper_build_script.sh rules_foreign_cc: Build failed! rules_foreign_cc: Keeping temp build directory and dependencies directory for debug. rules_foreign_cc: Please note that the directories inside a sandbox are still cleaned unless you specify --sandbox_debug Bazel command line flag. rules_foreigncc: Printing build logs: ____ BEGIN BUILD LOGS _____
Bazel external C/C++ Rules. Building library opencv_cmake
Environment:__ PROCESSOR_LEVEL=6 BUILD_SCRIPT=bazel-out/x64_windows-opt/bin/external/opencv/opencv_cmake_foreign_cc/build_script.sh EXT_BUILD_ROOT=C:_bzl\3vmcl3ou\execroot\mediapipe_api BUILD_LOG=bazel-out/x64_windows-opt/bin/external/opencv/opencv_cmake_foreign_cc/CMake.log PWD=/c/_bzl/3vmcl3ou/execroot/mediapipe_api MSYS_NO_PATHCONV=1 HOME=/ BUILD_WRAPPER_SCRIPT=bazel-out/x64_windows-opt/bin/external/opencv/opencv_cmake_foreign_cc/wrapper_build_script.sh PYTHON_BIN_PATH=C://Python//python.exe EXT_BUILD_DEPS=C:_bzl\3vmcl3ou\execroot\mediapipe_api/bazel-out/x64_windows-opt/bin/external/opencv/opencv_cmake.ext_build_deps SYSTEMROOT=C:\Windows TERM=xterm-256color TEMP=C:\Users\ContainerAdministrator\AppData\Local\Temp BUILD_TMPDIR=C:_bzl\3vmcl3ou\execroot\mediapipe_api/bazel-out/x64_windows-opt/bin/external/opencv/opencv_cmake.build_tmpdir INCLUDE=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.30.30705\include;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt;C:\Prog ram Files (x86)\Windows Kits\10\include\10.0.19041.0\shared;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um;C:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt;C:\Program Files (x86)\Windows Kits\10\include\1 0.0.19041.0\cppwinrt SHLVL=2 PROCESSOR_REVISION=a502 RUNFILES_MANIFEST_ONLY=1 PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 165 Stepping 2, GenuineIntel MSYS2_ARG_CONV_EXCL=* INSTALLDIR=C:_bzl\3vmcl3ou\execroot\mediapipe_api/bazel-out/x64_windows-opt/bin/external/opencv/opencv_cmake TMP=C:\Users\ContainerAdministrator\AppData\Local\Temp PATH=C:_bzl\3vmcl3ou\execroot\mediapipe_api:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.30.30705/bin/HostX64/x64:/usr/bin:/bin:/c/Windows:/c/Windows/System32:/c/Windows/System32/WindowsPowerShell/v1.0 :/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program Files/dotnet:/c/Users/ContainerAdministrator/AppData/Local/Microsoft/WindowsApps:/c/Users/Containe rAdministrator/.dotnet/tools:/c/Program Files/NuGet:/c/Program Files (x86)/Microsoft Visual Studio/2022/TestAgent/Common7/IDE/CommonExtensions/Microsoft/TestWindow:/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Cu rrent/Bin:/c/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools:/c/Program Files (x86)/Microsoft SDKs/ClickOnce/SignTool:/c/Program Files/nodejs:/c/bin:/c/Python:/c/Python/Scripts:/usr/bin:/c/Users/ContainerAdministrat or/AppData/Roaming/npm:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.30.30705/bin/HostX64/x64:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/Common7/IDE/VC/VCPackages:/c/Program Files (x8 6)/Microsoft Visual Studio/2019/BuildTools/Common7/IDE/CommonExtensions/Microsoft/TestWindow:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer:/c/Program Fi les (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Current/bin/Roslyn:/c/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.8 Tools/x64/:/c/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0//x64:/c/Program Files (x86 )/Windows Kits/10/bin//x64:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools//MSBuild/Current/Bin/amd64:/c/Windows/Microsoft.NET/Framework64/v4.0.30319:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/Common7/I DE/:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/Common7/Tools/::/c/Windows/system32:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin:/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja WINDIR=C:\Windows PROCESSORARCHITECTURE=AMD64 LIB=C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.30.30705\lib\x64;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64 SYSTEMDRIVE=C: ProgramData=C:\ProgramData =/usr/bin/env
'C:_bzl\3vmcl3ou\execroot\mediapipe_api/external/cmake-3.21.2-windows-x86_64/bin/cmake.exe' -DBUILD_LIST=calib3d,core,features2d,highgui,imgcodecs,imgproc,video,videoio -DBUILD_opencv_apps=OFF -DBUILD_opencv_python=OFF -DBUILDopencv world=ON -DBUILD_EXAMPLES=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DBUILD_JPEG=ON -DBUILD_OPENEXR=ON -DBUILD_PNG=ON -DBUILD_TIFF=ON -DBUILD_ZLIB=ON -DWITH_1394=OFF -DWITH_FFMPEG=OFF -DWITH_GSTREAMER=OFF -DWITH_GTK=OFF -DWITH_IPP=OFF -DWITH_ITT=OFF -DWITH_JASPER=OFF -DWITH_V4L=OFF -DWITH_WEBP=OFF -DCV_ENABLE_INTRINSICS=ON -DWITH_EIGEN=ON -DENABLE_CCACHE=OFF -DBUILD_SHARED_LIBS=OFF -DOPENCV_SKIP_PYTHON_LOADER=ON -DOPENCV_SKIP_VISIBILITY_HIDDEN=ON -DBUILD_WITHSTATIC CRT=OFF -DWITH_LAPACK=ON -DCMAKE_TOOLCHAIN_FILE=crosstool_bazel.cmake -DCMAKE_BUILD_TYPE=Release '-DCMAKE_INSTALL_PREFIX=C:_bzl\3vmcl3ou\execroot\mediapipe_api/bazel-out/x64_windows-opt/bin/external/opencv/opencv_cmake' '-DCMAKEPREFIX PATH=C:_bzl\3vmcl3ou\execroot\mediapipe_api/bazel-out/x64_windows-opt/bin/external/opencv/opencv_cmake.ext_build_deps' -DCMAKE_RANLIB= -A x64 -G 'Visual Studio 16 2019' 'C:_bzl\3vmcl3ou\execroot\mediapipe_api/external/opencv' CMake Error at CMakeLists.txt:106 (enable_language): Generator
Visual Studio 16 2019
could not find any instance of Visual Studio.
-- Configuring incomplete, errors occurred! See also "C:/_bzl/3vmcl3ou/execroot/mediapipe_api/bazel-out/x64_windows-opt/bin/external/opencv/opencv_cmake.buildtmpdir/CMakeFiles/CMakeOutput.log". ____ END BUILD LOGS _____ rules_foreign_cc: Build wrapper script location: bazel-out/x64_windows-opt/bin/external/opencv/opencv_cmake_foreign_cc/wrapper_build_script.sh rules_foreign_cc: Build script location: bazel-out/x64_windows-opt/bin/external/opencv/opencv_cmake_foreign_cc/build_script.sh rules_foreign_cc: Build log location: bazel-out/x64_windows-opt/bin/external/opencv/opencv_cmake_foreign_cc/CMake.log
Target //mediapipe_api:mediapipe_desktop failed to build Use --verbose_failures to see the command lines of failed build steps. ERROR: C:/mediapipe/mediapipe_api/BUILD:64:10 Linking mediapipe_api/libmediapipe_c.dll failed: (Exit 1): bash.exe failed: error executing command C:/msys64/usr/bin/bash.exe -c bazel-out/x64_windows-opt/bin/external/opencv/opencv_cmake_fo reign_cc/wrapper_build_script.sh INFO: Elapsed time: 4.399s, Critical Path: 1.15s INFO: 136 processes: 133 internal, 3 local. FAILED: Build did NOT complete successfully Traceback (most recent call last): File "C:\mediapipe\build.py", line 444, in
Argument().command().run()
File "C:\mediapipe\build.py", line 141, in run
self._run_command(self._build_desktop_commands())
File "C:\mediapipe\build.py", line 52, 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 --
action_env PROCESSOR_LEVEL --action_env PROCESSOR_REVISION --define MEDIAPIPE_DISABLE_GPU=1 --@opencv//:switch=cmake //mediapipe_api:mediapipe_desktop' returned non-zero exit status 1.