openvinotoolkit / openvino

OpenVINO™ is an open-source toolkit for optimizing and deploying AI inference
https://docs.openvino.ai
Apache License 2.0
7.22k stars 2.25k forks source link

[Build]: I have an issue while setting up Openvino locally on Windows #25017

Closed hibahassan1 closed 4 months ago

hibahassan1 commented 4 months ago

OpenVINO Version

Master Branch

Operating System

Windows System

Hardware Architecture

x86 (64 bits)

Target Platform

No response

Build issue description

I am trying to set up Openvino locally on my system to attempt a Good First Issue, so I referred the https://github.com/openvinotoolkit/openvino/blob/master/docs/dev/build_windows.md. After this command, cmake -G "Visual Studio 17 2022" <path/to/openvino> I always get an error with a -- Configuring incomplete, errors occurred! at the end

Build script or step-by-step to reproduce

I forked the openvino repo and then I cloned it. then cd openvino git submodule update --init mkdir build && cd build cmake -G "Visual Studio 17 2022" <path/to/openvino>

After this, the issue happens. I also tried git submodule update --init --recursive and then removed the build file and tried it again but it didn't work.

Relevant log output

$ cmake -G "Visual Studio 17 2022" "C:/Users/hibah/OneDrive/Desktop/openvino"
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
-- The C compiler identification is MSVC 19.40.33811.0
-- The CXX compiler identification is MSVC 19.40.33811.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- OpenVINO version is 2024.3.0 (Build 15675)
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
-- Performing Test SUGGEST_OVERRIDE_SUPPORTED
-- Performing Test SUGGEST_OVERRIDE_SUPPORTED - Failed
-- Performing Test UNUSED_BUT_SET_VARIABLE_SUPPORTED
-- Performing Test UNUSED_BUT_SET_VARIABLE_SUPPORTED - Failed
-- Trying to find apivalidator in:
    * C:/Program Files (x86)/Windows Kits/10/bin/10.0.22621.0/x64
    * C:/Program Files (x86)/Windows Kits/10/bin/x64
-- OpenVINO Runtime enabled features:
--
--     CI_BUILD_NUMBER: 2024.3.0-15675-528d2c61fce
--     CPACK_GENERATOR = TGZ
--     ENABLE_LTO = OFF
--     OS_FOLDER = OFF
--     USE_BUILD_TYPE_SUBFOLDER = OFF
--     CMAKE_COMPILE_WARNING_AS_ERROR = OFF
--     ENABLE_QSPECTRE = OFF
--     ENABLE_INTEGRITYCHECK = OFF
--     ENABLE_SANITIZER = OFF
--     ENABLE_UB_SANITIZER = OFF
--     ENABLE_THREAD_SANITIZER = OFF
--     ENABLE_COVERAGE = OFF
--     ENABLE_SSE42 = ON
--     ENABLE_AVX2 = ON
--     ENABLE_AVX512F = ON
--     BUILD_SHARED_LIBS = ON
--     ENABLE_LIBRARY_VERSIONING = OFF
--     ENABLE_FASTER_BUILD = OFF
--     ENABLE_CPPLINT = OFF
--     ENABLE_CPPLINT_REPORT = OFF
--     ENABLE_CLANG_FORMAT = OFF
--     ENABLE_NCC_STYLE = OFF
--     ENABLE_UNSAFE_LOCATIONS = OFF
--     ENABLE_FUZZING = OFF
--     ENABLE_PROXY = ON
--     ENABLE_INTEL_CPU = ON
--     ENABLE_ARM_COMPUTE_CMAKE = OFF
--     ENABLE_TESTS = OFF
--     ENABLE_INTEL_GPU = ON
--     ENABLE_ONEDNN_FOR_GPU = ON
--     ENABLE_INTEL_NPU = ON
--     ENABLE_DEBUG_CAPS = OFF
--     ENABLE_NPU_DEBUG_CAPS = OFF
--     ENABLE_GPU_DEBUG_CAPS = OFF
--     ENABLE_CPU_DEBUG_CAPS = OFF
--     ENABLE_SNIPPETS_DEBUG_CAPS = OFF
--     ENABLE_SNIPPETS_LIBXSMM_TPP = OFF
--     ENABLE_PROFILING_ITT = OFF
--     ENABLE_PROFILING_FILTER = ALL
--     ENABLE_PROFILING_FIRST_INFERENCE = ON
--     SELECTIVE_BUILD = OFF
--     ENABLE_DOCS = OFF
--     ENABLE_PKGCONFIG_GEN = OFF
--     THREADING = TBB
--     ENABLE_TBBBIND_2_5 = ON
--     ENABLE_TBB_RELEASE_ONLY = OFF
--     ENABLE_MULTI = ON
--     ENABLE_AUTO = ON
--     ENABLE_AUTO_BATCH = ON
--     ENABLE_HETERO = ON
--     ENABLE_TEMPLATE = ON
--     ENABLE_PLUGINS_XML = OFF
--     ENABLE_FUNCTIONAL_TESTS = OFF
--     ENABLE_SAMPLES = ON
--     ENABLE_OV_ONNX_FRONTEND = ON
--     ENABLE_OV_PADDLE_FRONTEND = ON
--     ENABLE_OV_IR_FRONTEND = ON
--     ENABLE_OV_PYTORCH_FRONTEND = ON
--     ENABLE_OV_IR_FRONTEND = ON
--     ENABLE_OV_TF_FRONTEND = ON
--     ENABLE_OV_TF_LITE_FRONTEND = ON
--     ENABLE_SNAPPY_COMPRESSION = ON
--     ENABLE_STRICT_DEPENDENCIES = OFF
--     ENABLE_SYSTEM_TBB = OFF
--     ENABLE_SYSTEM_PUGIXML = OFF
--     ENABLE_SYSTEM_FLATBUFFERS = ON
--     ENABLE_SYSTEM_OPENCL = OFF
--     ENABLE_SYSTEM_PROTOBUF = OFF
--     ENABLE_SYSTEM_SNAPPY = OFF
--     ENABLE_PYTHON_PACKAGING = OFF
--     ENABLE_JS = ON
--     ENABLE_OPENVINO_DEBUG = OFF
--
-- CMAKE_VERSION ......................... 3.30.0-rc2
-- CMAKE_CROSSCOMPILING .................. FALSE
-- OpenVINO_SOURCE_DIR ................... C:/Users/hibah/OneDrive/Desktop/openvino
-- OpenVINO_BINARY_DIR ................... C:/Users/hibah/OneDrive/Desktop/openvino/build
-- CMAKE_GENERATOR ....................... Visual Studio 17 2022
-- CPACK_GENERATOR ....................... TGZ
-- CMAKE_C_COMPILER_ID ................... MSVC
-- CMAKE_CXX_COMPILER_ID ................. MSVC
-- CMAKE_CXX_STANDARD .................... 14
-- CMAKE_CONFIGURATION_TYPES ............. Debug Release MinSizeRel RelWithDebInfo
-- Looking for secure_getenv
-- Looking for secure_getenv - not found
-- Looking for __secure_getenv
-- Looking for __secure_getenv - not found
-- Defining OpenCL::Headers through OPENCL_ICD_LOADER_HEADERS_DIR
-- Protocol Buffers Configuring...
--
-- 3.20.3.0
-- Configuration script parsing status [
--   Description : Protocol Buffers
--   Version     : 3.20.3.0 (3.20.3)
--   Contact     : protobuf@googlegroups.com
-- ]
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT
-- Performing Test protobuf_HAVE_LD_VERSION_SCRIPT - Failed
-- Protocol Buffers Configuring done
-- Proceeding with version: 23.5.26.0
-- Looking for _strtof_l
-- Looking for _strtof_l - found
-- Looking for _strtoui64_l
-- Looking for _strtoui64_l - found
-- CMAKE_CXX_FLAGS: /DWIN32 /D_WINDOWS /GR /EHsc /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /EHsc /Gy /W3 /bigobj /MP /wd4251 /wd4275
-- Looking for sys/mman.h
-- Looking for sys/mman.h - not found
-- Looking for sys/resource.h
-- Looking for sys/resource.h - not found
-- Looking for sys/time.h
-- Looking for sys/time.h - not found
-- Looking for sys/uio.h
-- Looking for sys/uio.h - not found
-- Looking for unistd.h
-- Looking for unistd.h - not found
-- Looking for windows.h
-- Looking for windows.h - found
-- Looking for zlibVersion in z
-- Looking for zlibVersion in z - not found
-- Looking for lzo1x_1_15_compress in lzo2
-- Looking for lzo1x_1_15_compress in lzo2 - not found
-- Looking for LZ4_compress_default in lz4
-- Looking for LZ4_compress_default in lz4 - not found
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX - Success
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX2
-- Performing Test HAVE_VISUAL_STUDIO_ARCH_AVX2 - Success
-- Performing Test HAVE_CLANG_MAVX
-- Performing Test HAVE_CLANG_MAVX - Failed
-- Performing Test HAVE_CLANG_MBMI2
-- Performing Test HAVE_CLANG_MBMI2 - Failed
-- Performing Test SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS
-- Performing Test SNAPPY_HAVE_NO_MISSING_FIELD_INITIALIZERS - Failed
-- Performing Test HAVE_BUILTIN_EXPECT
-- Performing Test HAVE_BUILTIN_EXPECT - Failed
-- Performing Test HAVE_BUILTIN_CTZ
-- Performing Test HAVE_BUILTIN_CTZ - Failed
-- Performing Test HAVE_ATTRIBUTE_ALWAYS_INLINE
-- Performing Test HAVE_ATTRIBUTE_ALWAYS_INLINE - Failed
-- Performing Test SNAPPY_HAVE_SSSE3
-- Performing Test SNAPPY_HAVE_SSSE3 - Success
-- Performing Test SNAPPY_HAVE_X86_CRC32
-- Performing Test SNAPPY_HAVE_X86_CRC32 - Success
-- Performing Test SNAPPY_HAVE_NEON_CRC32
-- Performing Test SNAPPY_HAVE_NEON_CRC32 - Failed
-- Performing Test SNAPPY_HAVE_BMI2
-- Performing Test SNAPPY_HAVE_BMI2 - Success
-- Performing Test SNAPPY_HAVE_NEON
-- Performing Test SNAPPY_HAVE_NEON - Failed
-- Looking for mmap
-- Looking for mmap - not found
-- Looking for sysconf
-- Looking for sysconf - not found
-- Build type not set - defaulting to Release
CMake Warning (dev) at thirdparty/onnx/onnx/CMakeLists.txt:112 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found PythonInterp: C:/Python311/python.exe (found version "3.11")
Generated: C:/Users/hibah/OneDrive/Desktop/openvino/build/thirdparty/onnx/onnx/onnx/onnx_openvino_onnx-ml.proto
Generated: C:/Users/hibah/OneDrive/Desktop/openvino/build/thirdparty/onnx/onnx/onnx/onnx-operators_openvino_onnx-ml.proto
Generated: C:/Users/hibah/OneDrive/Desktop/openvino/build/thirdparty/onnx/onnx/onnx/onnx-data_openvino_onnx.proto
--
-- ******** Summary ********
--   CMake version                     : 3.30.0-rc2
--   CMake command                     : C:/Program Files/CMake/bin/cmake.exe
--   System                            : Windows
--   C++ compiler                      : C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.40.33807/bin/Hostx64/x64/cl.exe
--   C++ compiler version              : 19.40.33811.0
--   CXX flags                         : /DWIN32 /D_WINDOWS /GR /EHsc /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS /EHsc /Gy /W3 /bigobj /MP /wd4251 /wd4275 /wd4244 /EHsc /wd26812
--   Build type                        : Release
--   Compile definitions               : OV_BUILD_POSTFIX="$<$<CONFIG:Debug>:d>$<$<CONFIG:Release>:>";OV_NATIVE_PARENT_PROJECT_ROOT_DIR="openvino";__STDC_FORMAT_MACROS
--   CMAKE_PREFIX_PATH                 :
--   CMAKE_INSTALL_PREFIX              : C:/Program Files (x86)/OpenVINO
--   CMAKE_MODULE_PATH                 :
--
--   ONNX version                      : 1.15.0
--   ONNX NAMESPACE                    : openvino_onnx
--   ONNX_USE_LITE_PROTO               : ON
--   USE_PROTOBUF_SHARED_LIBS          : OFF
--   Protobuf_USE_STATIC_LIBS          : ON
--   ONNX_DISABLE_EXCEPTIONS           : OFF
--   ONNX_DISABLE_STATIC_REGISTRATION  : OFF
--   ONNX_WERROR                       : OFF
--   ONNX_BUILD_TESTS                  : OFF
--   ONNX_BUILD_BENCHMARKS             : OFF
--   ONNX_BUILD_SHARED_LIBS            :
--   BUILD_SHARED_LIBS                 : OFF
--
--   Protobuf compiler                 :
--   Protobuf includes                 :
--   Protobuf libraries                :
--   BUILD_ONNX_PYTHON                 : OFF
-- Using the multi-header code from C:/Users/hibah/OneDrive/Desktop/openvino/thirdparty/json/nlohmann_json/include/
-- TBB (2021.2.2) is found at C:/Users/hibah/OneDrive/Desktop/openvino/temp/tbb/lib/cmake/TBB
-- Static tbbbind_2_5 package usage is disabled, since oneTBB (ver. 2021.2.2) provides dynamic TBBBind 2.5+
CMake Error at src/plugins/intel_cpu/thirdparty/CMakeLists.txt:157 (add_subdirectory):
  The source directory

    C:/Users/hibah/OneDrive/Desktop/openvino/src/plugins/intel_cpu/thirdparty/mlas

  does not contain a CMakeLists.txt file.

CMake Error at src/plugins/intel_cpu/thirdparty/CMakeLists.txt:131 (add_subdirectory):
  The source directory

    C:/Users/hibah/OneDrive/Desktop/openvino/src/plugins/intel_cpu/thirdparty/onednn

  does not contain a CMakeLists.txt file.
Call Stack (most recent call first):
  src/plugins/intel_cpu/thirdparty/CMakeLists.txt:161 (ov_add_onednn)

-- Found Python3: C:/Python311/python.exe (found version "3.11.0") found components: Interpreter
-- Found Git: C:/Program Files/Git/mingw64/bin/git.exe (found version "2.44.0.windows.1")
-- Using patch version from commit count in git repository: 4
Microsoft (R) Library Manager Version 14.40.33811.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library C:/Users/hibah/OneDrive/Desktop/openvino/src/bindings/js/node/thirdparty/node.lib and object C:/Users/hibah/OneDrive/Desktop/openvino/src/bindings/js/node/thirdparty/node.exp
-- Python3 executable: C:/Python311/python.exe
-- Python3 version: 3.11.0
-- Python3 interpreter ID: Python
-- Python3 SOABI: cp311-win_amd64
-- Python3 include dirs: C:/Python311/include
-- Python3 libraries: C:/Python311/libs/python311.lib
CMake Warning at cmake/developer_package/python_requirements.cmake:118 (message):
  Python requirement file
  C:/Users/hibah/OneDrive/Desktop/openvino/src/bindings/python/wheel/requirements-dev.txt
  is not installed,
Call Stack (most recent call first):
  src/bindings/python/CMakeLists.txt:155 (ov_check_pip_packages)

-- Found Python3: C:/Python311/python.exe (found version "3.11.0") found components: Interpreter Development.Module
-- pybind11 v2.12.0
-- Performing Test HAS_MSVC_GL_LTCG
-- Performing Test HAS_MSVC_GL_LTCG - Success
CMake Warning at samples/cpp/common/format_reader/CMakeLists.txt:22 (message):
  OpenCV ver.  3.0+ is not found, format_reader will be built without OpenCV
  support

CMake Warning at samples/cpp/benchmark_app/CMakeLists.txt:104 (message):
  OpenCL CPP header is not found, benchmark_app will be built without OpenCL
  support and you will not be able to use the '-use_device_mem' option.
  Please, install '<apt | yum> install opencl-headers' to enable the option

CMake Warning at samples/cpp/benchmark_app/CMakeLists.txt:112 (message):
  OpenCV ver.  3.0+ is not found, benchmark_app will be built without OpenCV
  support.  Set OpenCV_DIR

CMake Warning at samples/c/common/opencv_c_wrapper/CMakeLists.txt:20 (message):
  OpenCV ver.  3.0+ is not found, opencv_c_wrapper is built without OPENCV
  support

-- Register template to be built in build-modules/template
-- Register template_extension to be built in build-modules/template_extension
CMake Warning at cmake/developer_package/shellcheck/shellcheck.cmake:22 (message):
  shellcheck tool is not found
Call Stack (most recent call first):
  scripts/CMakeLists.txt:18 (ov_shellcheck_process)

-- Configuring incomplete, errors occurred!

Issue submission checklist

rkazants commented 4 months ago

Hi @hibahassan1,

Make sure that git submodule update --init --recursive step is fully complete (no errors) because it looks something is missing there. Also, try this cmd-line:

cmake -G "Visual Studio 17 2022" -A x64 -DCMAKE_BUILD_TYPE=Release -DENABLE_TESTS=ON ..

Best regards, Roman

hibahassan1 commented 4 months ago

Thank you. It is fixed.