Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] protocol buffer compiler error MSB8066 #23529

Open
omelentyev opened this issue Jan 29, 2025 · 6 comments
Open

[Build] protocol buffer compiler error MSB8066 #23529

omelentyev opened this issue Jan 29, 2025 · 6 comments
Labels
build build issues; typically submitted using template ep:OpenVINO issues related to OpenVINO execution provider

Comments

@omelentyev
Copy link

omelentyev commented Jan 29, 2025

Describe the issue

I am following instructions https://onnxruntime.ai/docs/execution-providers/OpenVINO-ExecutionProvider.html
and I cannot compile the runtime

Urgency

Not urgent, learning

Target platform

Windows

Build script

build.bat --config RelWithDebInfo --use_openvino AUTO:CPU,GPU,NPU --build_shared_lib --cmake_generator "Visual Studio 17 2022"

Error / output

CustomBuild:

"The build of 'C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\CMakeFiles\3f3cda2113739aa063b7e68a17ce2d7f\gen_onnx_proto.rule' depends on 'C:\GITHUB\ONNXRUNTIME\BUILD\WINDOWS\RELWITHDEBINF
O_DEPS\ONNX-BUILD\ONNX\ONNX-ML.PB.CC' which is produced by the build of 'C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\CMakeFiles\2d5faef842602e45854e17cc4e5d2793\onnx-ml.pb.cc.rule'. Th
e items cannot be built in parallel."
Running C++ protocol buffer compiler on C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/onnx-build/onnx/onnx-ml.proto
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\GitHub\onnxruntime\build\Windows\RelWith
DebInfo\CMakeFiles\2d5faef842602e45854e17cc4e5d2793\onnx-ml.pb.cc.rule;C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\CMakeFiles\3f3cda2113739aa063b7e68a17ce2d7f\gen_onnx_proto.rule;C:\GitHu
b\onnxruntime\build\Windows\RelWithDebInfo\_deps\onnx-src\CMakeLists.txt' exited with code -1073741819. [C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\_deps\onnx-build\gen_onnx_proto.vcxpro
j]
Done Building Project "C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\_deps\onnx-build\gen_onnx_proto.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\_deps\onnx-build\gen_onnx_data_proto.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\_deps\onnx-build\onnx_proto.vcxproj" (default targets) -- FAILED.

Visual Studio Version

2022 Version 17.12.4

GCC / Compiler Version

No response

@omelentyev omelentyev added the build build issues; typically submitted using template label Jan 29, 2025
@github-actions github-actions bot added the ep:OpenVINO issues related to OpenVINO execution provider label Jan 29, 2025
@snnn
Copy link
Member

snnn commented Jan 29, 2025

Could you try my branch "snnn/vcpkg2" and build the code with "--use_vcpkg" ? Then I believe the problem will be gone.

@omelentyev
Copy link
Author

The original error gone, however, build fails still with following error:

CMake Error at external/onnxruntime_external_deps.cmake:541 (find_package):
Could not find a package configuration file provided by "wil" with any of
the following names:

wilConfig.cmake
wil-config.cmake

Add the installation prefix of "wil" to CMAKE_PREFIX_PATH or set "wil_DIR"
to a directory containing one of the above files. If "wil" provides a
separate development package or SDK, be sure it has been installed.

Terminal output:

2025-01-29 21:59:05,349 build [DEBUG] - Command line arguments:
--build_dir 'C:\GitHub\onnxruntime\build\Windows' --config RelWithDebInfo --use_openvino AUTO:CPU,GPU,NPU --build_shared_lib --cmake_generator 'Visual Studio 17 2022' --use_vcpkg
Namespace(build_dir='C:\GitHub\onnxruntime\\build\Windows', config=['RelWithDebInfo'], update=False, build=False, clean=False, parallel=1, nvcc_threads=-1, test=False, skip_tests=False, compile_no_warning_as_error=False, enable_nvtx_profile=False, enable_memory_profile=False, enable_training=False, enable_training_apis=False, enable_training_ops=False, enable_nccl=False, mpi_home=None, nccl_home=None, use_mpi=False, enable_onnx_tests=False, path_to_protoc_exe=None, fuzz_testing=False, enable_symbolic_shape_infer_tests=False, gen_doc=None, gen_api_doc=False, use_cuda=False, cuda_version=None, cuda_home=None, cudnn_home=None, enable_cuda_line_info=False, enable_cuda_nhwc_ops=False, disable_cuda_nhwc_ops=False, enable_cuda_minimal_build=False, enable_pybind=False, build_wheel=False, wheel_name_suffix=None, skip_keras_test=False, build_csharp=False, build_nuget=False, msbuild_extra_options=None, build_java=False, build_nodejs=False, build_objc=False, build_shared_lib=True, build_apple_framework=False, cmake_extra_defines=None, target=None, x86=False, rv64=False, arm=False, arm64=False, arm64ec=False, buildasx=False, riscv_toolchain_root='', riscv_qemu_path='', msvc_toolset=None, windows_sdk_version=None, android=False, android_abi='arm64-v8a', android_api=27, android_sdk_path='C:\Android\android-sdk', android_ndk_path='', android_cpp_shared=False, android_run_emulator=False, use_gdk=False, gdk_edition='.', gdk_platform='Scarlett', enable_wasm_memory64=False, ios=False, visionos=False, macos=None, apple_sysroot='', ios_toolchain_file='', visionos_toolchain_file='', xcode_code_signing_team_id='', xcode_code_signing_identity='', cmake_generator='Visual Studio 17 2022', osx_arch='x86_64', apple_deploy_target=None, enable_address_sanitizer=False, use_binskim_compliant_compile_flags=False, disable_memleak_checker=False, use_vcpkg=True, build_wasm=False, build_wasm_static_lib=False, emsdk_version='3.1.59', enable_wasm_simd=False, enable_wasm_threads=False, disable_wasm_exception_catching=False, enable_wasm_api_exception_catching=False, enable_wasm_exception_throwing_override=True, wasm_run_tests_in_browser=False, enable_wasm_profiling=False, enable_wasm_debug_info=False, wasm_malloc=None, emscripten_settings=None, use_extensions=False, extensions_overridden_path=None, cmake_path='cmake', ctest_path='ctest', skip_submodule_sync=False, use_mimalloc=False, use_dnnl=False, dnnl_gpu_runtime='', dnnl_opencl_root='', use_openvino='AUTO:CPU,GPU,NPU', dnnl_aarch64_runtime='', dnnl_acl_root='', use_coreml=False, use_webnn=False, use_snpe=False, snpe_root=None, use_nnapi=False, use_vsinpu=False, nnapi_min_api=None, use_jsep=False, use_webgpu=False, use_external_dawn=False, use_qnn=None, qnn_home=None, use_rknpu=False, use_preinstalled_eigen=False, eigen_path=None, enable_msinternal=False, use_vitisai=False, use_tensorrt=False, use_tensorrt_builtin_parser=True, use_tensorrt_oss_parser=False, tensorrt_home=None, test_all_timeout='10800', use_migraphx=False, migraphx_home=None, use_full_protobuf=False, skip_onnx_tests=False, skip_winml_tests=False, skip_nodejs_tests=False, enable_msvc_static_runtime=False, use_dml=False, dml_path='', use_winml=False, winml_root_namespace_override=None, dml_external_project=False, use_telemetry=False, enable_wcos=False, enable_lto=False, enable_transformers_tool_test=False, use_acl=False, acl_home=None, acl_libs=None, use_armnn=False, armnn_relu=False, armnn_bn=False, armnn_home=None, armnn_libs=None, build_micro_benchmarks=False, minimal_build=None, include_ops_by_config=None, enable_reduced_operator_type_support=False, disable_contrib_ops=False, disable_ml_ops=False, disable_rtti=False, disable_types=[], disable_exceptions=False, rocm_version=None, use_rocm=False, rocm_home=None, code_coverage=False, enable_lazy_tensor=False, ms_experimental=False, enable_external_custom_op_schemas=False, external_graph_transformer_path=None, enable_cuda_profiling=False, use_cann=False, cann_home=None, enable_rocm_profiling=False, use_xnnpack=False, use_avx512=False, use_azure=False, use_cache=False, use_triton_kernel=False, use_lock_free_queue=False, enable_generic_interface=False)
2025-01-29 21:59:05,397 build [DEBUG] - Defaulting to running update, build [and test for native builds].
2025-01-29 21:59:05,404 build [INFO] - Build started
2025-01-29 21:59:05,404 build [INFO] - git submodule sync --recursive
Synchronizing submodule url for 'cmake/external/emsdk'
Synchronizing submodule url for 'cmake/external/libprotobuf-mutator'
Synchronizing submodule url for 'cmake/external/onnx'
Synchronizing submodule url for 'cmake/external/onnx/third_party/pybind11'
2025-01-29 21:59:05,861 build [INFO] - git submodule update --init --recursive
2025-01-29 21:59:06,266 build [INFO] - Generating CMake build tree
2025-01-29 21:59:06,277 build [INFO] - setting target triplet to x64-windows-static-md
2025-01-29 21:59:06,277 build [INFO] - C:\Program Files\CMake\bin\cmake.EXE C:\GitHub\onnxruntime\cmake -Donnxruntime_RUN_ONNX_TESTS=OFF -Donnxruntime_GENERATE_TEST_REPORTS=ON -DPython_EXECUTABLE=C:\Users\omele\AppData\Local\Programs\Python\Python313\python.exe -Donnxruntime_USE_VCPKG=ON -Donnxruntime_USE_MIMALLOC=OFF -Donnxruntime_ENABLE_PYTHON=OFF -Donnxruntime_BUILD_CSHARP=OFF -Donnxruntime_BUILD_JAVA=OFF -Donnxruntime_BUILD_NODEJS=OFF -Donnxruntime_BUILD_OBJC=OFF -Donnxruntime_BUILD_SHARED_LIB=ON -Donnxruntime_BUILD_APPLE_FRAMEWORK=OFF -Donnxruntime_USE_DNNL=OFF -Donnxruntime_USE_NNAPI_BUILTIN=OFF -Donnxruntime_USE_VSINPU=OFF -Donnxruntime_USE_RKNPU=OFF -Donnxruntime_ENABLE_MICROSOFT_INTERNAL=OFF -Donnxruntime_USE_VITISAI=OFF -Donnxruntime_USE_TENSORRT=OFF -Donnxruntime_USE_TENSORRT_BUILTIN_PARSER=ON -Donnxruntime_USE_TENSORRT_INTERFACE=OFF -Donnxruntime_USE_CUDA_INTERFACE=OFF -Donnxruntime_USE_OPENVINO_INTERFACE=OFF -Donnxruntime_USE_VITISAI_INTERFACE=OFF -Donnxruntime_USE_QNN_INTERFACE=OFF -Donnxruntime_USE_MIGRAPHX=OFF -Donnxruntime_DISABLE_CONTRIB_OPS=OFF -Donnxruntime_DISABLE_ML_OPS=OFF -Donnxruntime_DISABLE_RTTI=OFF -Donnxruntime_DISABLE_EXCEPTIONS=OFF -Donnxruntime_MINIMAL_BUILD=OFF -Donnxruntime_EXTENDED_MINIMAL_BUILD=OFF -Donnxruntime_MINIMAL_BUILD_CUSTOM_OPS=OFF -Donnxruntime_REDUCED_OPS_BUILD=OFF -Donnxruntime_USE_DML=OFF -Donnxruntime_USE_WINML=OFF -Donnxruntime_BUILD_MS_EXPERIMENTAL_OPS=OFF -Donnxruntime_USE_TELEMETRY=OFF -Donnxruntime_ENABLE_LTO=OFF -Donnxruntime_USE_ACL=OFF -Donnxruntime_USE_ARMNN=OFF -Donnxruntime_ARMNN_RELU_USE_CPU=ON -Donnxruntime_ARMNN_BN_USE_CPU=ON -Donnxruntime_USE_JSEP=OFF -Donnxruntime_USE_WEBGPU=OFF -Donnxruntime_USE_EXTERNAL_DAWN=OFF -Donnxruntime_ENABLE_NVTX_PROFILE=OFF -Donnxruntime_ENABLE_TRAINING=OFF -Donnxruntime_ENABLE_TRAINING_OPS=OFF -Donnxruntime_ENABLE_TRAINING_APIS=OFF -Donnxruntime_ENABLE_CPU_FP16_OPS=OFF -Donnxruntime_USE_NCCL=OFF -Donnxruntime_BUILD_BENCHMARKS=OFF -Donnxruntime_USE_ROCM=OFF -Donnxruntime_GCOV_COVERAGE=OFF -Donnxruntime_USE_MPI=OFF -Donnxruntime_ENABLE_MEMORY_PROFILE=OFF -Donnxruntime_ENABLE_CUDA_LINE_NUMBER_INFO=OFF -Donnxruntime_USE_CUDA_NHWC_OPS=OFF -Donnxruntime_BUILD_WEBASSEMBLY_STATIC_LIB=OFF -Donnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING=ON -Donnxruntime_ENABLE_WEBASSEMBLY_API_EXCEPTION_CATCHING=OFF -Donnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_THROWING=ON -Donnxruntime_WEBASSEMBLY_RUN_TESTS_IN_BROWSER=OFF -Donnxruntime_ENABLE_WEBASSEMBLY_THREADS=OFF -Donnxruntime_ENABLE_WEBASSEMBLY_MEMORY64=OFF -Donnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO=OFF -Donnxruntime_ENABLE_WEBASSEMBLY_PROFILING=OFF -Donnxruntime_ENABLE_LAZY_TENSOR=OFF -Donnxruntime_ENABLE_EXTERNAL_CUSTOM_OP_SCHEMAS=OFF -Donnxruntime_ENABLE_CUDA_PROFILING=OFF -Donnxruntime_ENABLE_ROCM_PROFILING=OFF -Donnxruntime_USE_XNNPACK=OFF -Donnxruntime_USE_WEBNN=OFF -Donnxruntime_USE_CANN=OFF -Donnxruntime_USE_TRITON_KERNEL=OFF -Donnxruntime_DISABLE_FLOAT8_TYPES=OFF -Donnxruntime_DISABLE_SPARSE_TENSORS=OFF -Donnxruntime_DISABLE_OPTIONAL_TYPE=OFF -Donnxruntime_CUDA_MINIMAL=OFF -Donnxruntime_USE_OPENVINO=ON -Donnxruntime_NPU_NO_FALLBACK=OFF -Donnxruntime_USE_OPENVINO_GPU=OFF -Donnxruntime_USE_OPENVINO_CPU=OFF -Donnxruntime_USE_OPENVINO_NPU=OFF -Donnxruntime_USE_OPENVINO_GPU_NP=OFF -Donnxruntime_USE_OPENVINO_CPU_NP=OFF -Donnxruntime_USE_OPENVINO_NPU_NP=OFF -Donnxruntime_USE_OPENVINO_HETERO=OFF -Donnxruntime_USE_OPENVINO_DEVICE=AUTO:CPU,GPU,NPU -Donnxruntime_USE_OPENVINO_MULTI=OFF -Donnxruntime_USE_OPENVINO_AUTO=ON -Donnxruntime_USE_FULL_PROTOBUF=ON -DProtobuf_USE_STATIC_LIBS=ON -DCMAKE_VS_GLOBALS=UseMultiToolTask=true;EnforceProcessCountAcrossBuilds=true -DCMAKE_TOOLCHAIN_FILE=C:\GitHub\onnxruntime\build\Windows\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_INSTALL_OPTIONS=--x-feature=tests;--overlay-triplets=C:\GitHub\onnxruntime\cmake\vcpkg-triplets\default -DVCPKG_TARGET_TRIPLET=x64-windows-static-md -DCMAKE_TLS_VERIFY=ON -DFETCHCONTENT_QUIET=OFF -DONNX_USE_MSVC_STATIC_RUNTIME=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=OFF -DABSL_MSVC_STATIC_RUNTIME=OFF -Dgtest_force_shared_crt=ON -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=ProgramDatabase -A x64 -T host=x64 -G Visual Studio 17 2022 -DCMAKE_BUILD_TYPE=RelWithDebInfo
CMake Warning:
Ignoring empty string ("") provided on the command line.

CMake Deprecation Warning at CMakeLists.txt:9 (cmake_policy):
The OLD behavior for policy CMP0104 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.

-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
Patch found: C:/Program Files/Git/usr/bin/patch.exe
-- Loading Dependencies URLs ...
-- Loading Dependencies ...
-- Populating abseil_cpp
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/abseil_cpp-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
-- Abseil source dir:C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/abseil_cpp-src
-- Populating re2
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/re2-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
-- Populating googletest
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/googletest-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
-- Populating utf8_range
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/utf8_range-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
CMake Deprecation Warning at C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/utf8_range-src/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument value. Or, use the ... syntax
to tell CMake that the project requires at least but has been updated
to work with policies introduced by or earlier.

-- Populating protobuf
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/protobuf-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
CMake Deprecation Warning at C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/protobuf-src/CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument value. Or, use the ... syntax
to tell CMake that the project requires at least but has been updated
to work with policies introduced by or earlier.

--
-- 3.21.12.0
-- Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR)
-- Populating date
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/date-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
CMake Deprecation Warning at C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/date-src/CMakeLists.txt:18 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument value. Or, use the ... syntax
to tell CMake that the project requires at least but has been updated
to work with policies introduced by or earlier.

-- Populating mp11
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/mp11-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
-- Populating nlohmann_json
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/nlohmann_json-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
CMake Deprecation Warning at C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/nlohmann_json-src/CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument value. Or, use the ... syntax
to tell CMake that the project requires at least but has been updated
to work with policies introduced by or earlier.

-- Using the single-header code from C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/nlohmann_json-src/single_include/
-- Populating pytorch_cpuinfo
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/pytorch_cpuinfo-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
CMake Deprecation Warning at C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/pytorch_cpuinfo-src/CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument value. Or, use the ... syntax
to tell CMake that the project requires at least but has been updated
to work with policies introduced by or earlier.

-- Populating gsl
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/gsl-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.31/Modules/FetchContent.cmake:1953 (message):
Calling FetchContent_Populate(safeint) is deprecated, call
FetchContent_MakeAvailable(safeint) instead. Policy CMP0169 can be set to
OLD to allow FetchContent_Populate(safeint) to be called directly for now,
but the ability to call it with declared details will be removed completely
in a future version.
Call Stack (most recent call first):
external/onnxruntime_external_deps.cmake:429 (FetchContent_Populate)
CMakeLists.txt:693 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Populating safeint
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/safeint-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
-- Populating flatbuffers
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/flatbuffers-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
-- Proceeding with version: 23.5.26.0
-- CMAKE_CXX_FLAGS: /MP /Zc:__cplusplus /EHsc /wd26812 -DEIGEN_HAS_C99_MATH -DCPUINFO_SUPPORTED
-- Populating onnx
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/onnx-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
CMake Warning (dev) at C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/onnx-src/CMakeLists.txt:106 (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.

Generated: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/onnx-build/onnx/onnx-ml.proto
Generated: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/onnx-build/onnx/onnx-operators-ml.proto
Generated: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/onnx-build/onnx/onnx-data.proto

-- ******** Summary ********
-- CMake version : 3.31.4
-- 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.42.34433/bin/Hostx64/x64/cl.exe
-- C++ compiler version : 19.42.34436.0
-- CXX flags : /MP /Zc:__cplusplus /EHsc /wd26812 -DEIGEN_HAS_C99_MATH -DCPUINFO_SUPPORTED /EHsc /wd26812
-- Build type : RelWithDebInfo
-- Compile definitions : ORT_ENABLE_STREAM;EIGEN_MPL2_ONLY;EIGEN_HAS_CONSTEXPR;EIGEN_HAS_VARIADIC_TEMPLATES;EIGEN_HAS_CXX11_MATH;EIGEN_HAS_CXX11_ATOMIC;EIGEN_STRONG_INLINE=inline;__STDC_FORMAT_MACROS
-- CMAKE_PREFIX_PATH : C:\GitHub\onnxruntime\build\Windows/RelWithDebInfo/installed
-- CMAKE_INSTALL_PREFIX : C:/Program Files/onnxruntime
-- CMAKE_MODULE_PATH : C:/GitHub/onnxruntime/cmake/external

-- ONNX version : 1.17.0
-- ONNX NAMESPACE : onnx
-- ONNX_USE_LITE_PROTO : OFF
-- 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_SHARED_LIBS :
-- BUILD_SHARED_LIBS : OFF

-- Protobuf compiler :
-- Protobuf includes :
-- Protobuf libraries :
-- BUILD_ONNX_PYTHON : OFF
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.31/Modules/FetchContent.cmake:1953 (message):
Calling FetchContent_Populate(eigen) is deprecated, call
FetchContent_MakeAvailable(eigen) instead. Policy CMP0169 can be set to
OLD to allow FetchContent_Populate(eigen) to be called directly for now,
but the ability to call it with declared details will be removed completely
in a future version.
Call Stack (most recent call first):
external/eigen.cmake:19 (FetchContent_Populate)
external/onnxruntime_external_deps.cmake:538 (include)
CMakeLists.txt:693 (include)
This warning is for project developers. Use -Wno-dev to suppress it.

-- Populating eigen
-- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.22631.
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/eigen-subbuild
MSBuild version 17.12.12+1cce77968 for .NET Framework

1>
CMake Error at external/onnxruntime_external_deps.cmake:541 (find_package):
Could not find a package configuration file provided by "wil" with any of
the following names:

wilConfig.cmake
wil-config.cmake

Add the installation prefix of "wil" to CMAKE_PREFIX_PATH or set "wil_DIR"
to a directory containing one of the above files. If "wil" provides a
separate development package or SDK, be sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:693 (include)

-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "C:\GitHub\onnxruntime\tools\ci_build\build.py", line 3148, in
sys.exit(main())
~~~~^^
File "C:\GitHub\onnxruntime\tools\ci_build\build.py", line 3011, in main
generate_build_tree(
~~~~~~~~~~~~~~~~~~~^
cmake_path,
^^^^^^^^^^^
...<20 lines>...
cmake_extra_args,
^^^^^^^^^^^^^^^^^
)
^
File "C:\GitHub\onnxruntime\tools\ci_build\build.py", line 1801, in generate_build_tree
run_subprocess(
~~~~~~~~~~~~~~^
[
^
...<10 lines>...
env=env,
^^^^^^^^
)
^
File "C:\GitHub\onnxruntime\tools\ci_build\build.py", line 891, in run_subprocess
return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
File "C:\GitHub\onnxruntime\tools\python\util\run.py", line 50, in run
completed_process = subprocess.run(
cmd,
...<6 lines>...
shell=shell,
)
File "C:\Users\omele\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 577, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['C:\Program Files\CMake\bin\cmake.EXE', 'C:\GitHub\onnxruntime\cmake', '-Donnxruntime_RUN_ONNX_TESTS=OFF', '-Donnxruntime_GENERATE_TEST_REPORTS=ON', '-DPython_EXECUTABLE=C:\Users\omele\AppData\Local\Programs\Python\Python313\python.exe', '-Donnxruntime_USE_VCPKG=ON', '-Donnxruntime_USE_MIMALLOC=OFF', '-Donnxruntime_ENABLE_PYTHON=OFF', '-Donnxruntime_BUILD_CSHARP=OFF', '-Donnxruntime_BUILD_JAVA=OFF', '-Donnxruntime_BUILD_NODEJS=OFF', '-Donnxruntime_BUILD_OBJC=OFF', '-Donnxruntime_BUILD_SHARED_LIB=ON', '-Donnxruntime_BUILD_APPLE_FRAMEWORK=OFF', '-Donnxruntime_USE_DNNL=OFF', '-Donnxruntime_USE_NNAPI_BUILTIN=OFF', '-Donnxruntime_USE_VSINPU=OFF', '-Donnxruntime_USE_RKNPU=OFF', '-Donnxruntime_ENABLE_MICROSOFT_INTERNAL=OFF', '-Donnxruntime_USE_VITISAI=OFF', '-Donnxruntime_USE_TENSORRT=OFF', '-Donnxruntime_USE_TENSORRT_BUILTIN_PARSER=ON', '-Donnxruntime_USE_TENSORRT_INTERFACE=OFF', '-Donnxruntime_USE_CUDA_INTERFACE=OFF', '-Donnxruntime_USE_OPENVINO_INTERFACE=OFF', '-Donnxruntime_USE_VITISAI_INTERFACE=OFF', '-Donnxruntime_USE_QNN_INTERFACE=OFF', '-Donnxruntime_USE_MIGRAPHX=OFF', '-Donnxruntime_DISABLE_CONTRIB_OPS=OFF', '-Donnxruntime_DISABLE_ML_OPS=OFF', '-Donnxruntime_DISABLE_RTTI=OFF', '-Donnxruntime_DISABLE_EXCEPTIONS=OFF', '-Donnxruntime_MINIMAL_BUILD=OFF', '-Donnxruntime_EXTENDED_MINIMAL_BUILD=OFF', '-Donnxruntime_MINIMAL_BUILD_CUSTOM_OPS=OFF', '-Donnxruntime_REDUCED_OPS_BUILD=OFF', '-Donnxruntime_USE_DML=OFF', '-Donnxruntime_USE_WINML=OFF', '-Donnxruntime_BUILD_MS_EXPERIMENTAL_OPS=OFF', '-Donnxruntime_USE_TELEMETRY=OFF', '-Donnxruntime_ENABLE_LTO=OFF', '-Donnxruntime_USE_ACL=OFF', '-Donnxruntime_USE_ARMNN=OFF', '-Donnxruntime_ARMNN_RELU_USE_CPU=ON', '-Donnxruntime_ARMNN_BN_USE_CPU=ON', '-Donnxruntime_USE_JSEP=OFF', '-Donnxruntime_USE_WEBGPU=OFF', '-Donnxruntime_USE_EXTERNAL_DAWN=OFF', '-Donnxruntime_ENABLE_NVTX_PROFILE=OFF', '-Donnxruntime_ENABLE_TRAINING=OFF', '-Donnxruntime_ENABLE_TRAINING_OPS=OFF', '-Donnxruntime_ENABLE_TRAINING_APIS=OFF', '-Donnxruntime_ENABLE_CPU_FP16_OPS=OFF', '-Donnxruntime_USE_NCCL=OFF', '-Donnxruntime_BUILD_BENCHMARKS=OFF', '-Donnxruntime_USE_ROCM=OFF', '-Donnxruntime_GCOV_COVERAGE=OFF', '-Donnxruntime_USE_MPI=OFF', '-Donnxruntime_ENABLE_MEMORY_PROFILE=OFF', '-Donnxruntime_ENABLE_CUDA_LINE_NUMBER_INFO=OFF', '-Donnxruntime_USE_CUDA_NHWC_OPS=OFF', '-Donnxruntime_BUILD_WEBASSEMBLY_STATIC_LIB=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING=ON', '-Donnxruntime_ENABLE_WEBASSEMBLY_API_EXCEPTION_CATCHING=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_THROWING=ON', '-Donnxruntime_WEBASSEMBLY_RUN_TESTS_IN_BROWSER=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_THREADS=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_MEMORY64=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO=OFF', '-Donnxruntime_ENABLE_WEBASSEMBLY_PROFILING=OFF', '-Donnxruntime_ENABLE_LAZY_TENSOR=OFF', '-Donnxruntime_ENABLE_EXTERNAL_CUSTOM_OP_SCHEMAS=OFF', '-Donnxruntime_ENABLE_CUDA_PROFILING=OFF', '-Donnxruntime_ENABLE_ROCM_PROFILING=OFF', '-Donnxruntime_USE_XNNPACK=OFF', '-Donnxruntime_USE_WEBNN=OFF', '-Donnxruntime_USE_CANN=OFF', '-Donnxruntime_USE_TRITON_KERNEL=OFF', '-Donnxruntime_DISABLE_FLOAT8_TYPES=OFF', '-Donnxruntime_DISABLE_SPARSE_TENSORS=OFF', '-Donnxruntime_DISABLE_OPTIONAL_TYPE=OFF', '-Donnxruntime_CUDA_MINIMAL=OFF', '-Donnxruntime_USE_OPENVINO=ON', '-Donnxruntime_NPU_NO_FALLBACK=OFF', '-Donnxruntime_USE_OPENVINO_GPU=OFF', '-Donnxruntime_USE_OPENVINO_CPU=OFF', '-Donnxruntime_USE_OPENVINO_NPU=OFF', '-Donnxruntime_USE_OPENVINO_GPU_NP=OFF', '-Donnxruntime_USE_OPENVINO_CPU_NP=OFF', '-Donnxruntime_USE_OPENVINO_NPU_NP=OFF', '-Donnxruntime_USE_OPENVINO_HETERO=OFF', '-Donnxruntime_USE_OPENVINO_DEVICE=AUTO:CPU,GPU,NPU', '-Donnxruntime_USE_OPENVINO_MULTI=OFF', '-Donnxruntime_USE_OPENVINO_AUTO=ON', '-Donnxruntime_USE_FULL_PROTOBUF=ON', '-DProtobuf_USE_STATIC_LIBS=ON', '-DCMAKE_VS_GLOBALS=UseMultiToolTask=true;EnforceProcessCountAcrossBuilds=true', '-DCMAKE_TOOLCHAIN_FILE=C:\GitHub\onnxruntime\build\Windows\vcpkg\scripts\buildsystems\vcpkg.cmake', '-DVCPKG_INSTALL_OPTIONS=--x-feature=tests;--overlay-triplets=C:\GitHub\onnxruntime\cmake\vcpkg-triplets\default', '-DVCPKG_TARGET_TRIPLET=x64-windows-static-md', '-DCMAKE_TLS_VERIFY=ON', '-DFETCHCONTENT_QUIET=OFF', '-DONNX_USE_MSVC_STATIC_RUNTIME=OFF', '-Dprotobuf_MSVC_STATIC_RUNTIME=OFF', '-DABSL_MSVC_STATIC_RUNTIME=OFF', '-Dgtest_force_shared_crt=ON', '-DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=ProgramDatabase', '-A', 'x64', '-T', 'host=x64', '-G', 'Visual Studio 17 2022', '-DCMAKE_BUILD_TYPE=RelWithDebInfo', '']' returned non-zero exit status 1.
 omele   onnxruntime   snnn/vcpkg2≡   

@omelentyev
Copy link
Author

WIL headers are available at
WIL_DIR="C:\GitHub\onnxruntime\external\wil\include\wil"

There are no cmake files available in the WIL cloned repository

wilConfig.cmake
wil-config.cmake

also tried setup WIL via vcpkg

same result as in the previous comment

@snnn
Copy link
Member

snnn commented Jan 31, 2025

I am still trying to reproduce the issue.

@omelentyev
Copy link
Author

omelentyev commented Jan 31, 2025

This is where the WIL comes from:

C:\GitHub\onnxruntime\cmake\external\onnxruntime_external_deps.cmake

if(onnxruntime_USE_VCPKG AND WIN32)
find_package(wil CONFIG REQUIRED)
set(WIL_TARGET "WIL::WIL")
else()
include(wil) # FetchContent
endif()

Wil is installed by vcpkg in the folder
C:\GitHub\vcpkg\packages\wil_x64-windows

wilConfig.cmake is in the folder
C:\GitHub\vcpkg\packages\wil_x64-windows\share\wil\

I've added the path into env:PATH list

Why cannot it find it?

Also tried renaming to wil-config.cmake

microsoft/vcpkg#21141

@omelentyev
Copy link
Author

omelentyev commented Jan 31, 2025

It has found WIL after I explicitly set CMAKE_PREFIX_PATH to my WIL location:

if(onnxruntime_USE_VCPKG AND WIN32)
set(CMAKE_PREFIX_PATH "C:/GitHub/vcpkg/installed/x64-windows")
find_package(wil CONFIG REQUIRED)
set(WIL_TARGET "WIL::WIL")
else()
include(wil) # FetchContent
endif()

the build process moved forward but failed later:

.\build.bat --config RelWithDebInfo --use_openvino AUTO:CPU,GPU,NPU --build_shared_lib --cmake_generator "Visual Studio 17 2022" --use_vcpkg --skip_tests

CustomBuild:
"The build of 'C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\CMakeFiles\3f3cda2113739aa063b7e68a17ce2d7f\gen_onnx_proto.rule' depends on 'C:\GITHUB\ONNXRUNTIME\BUILD\WINDO
WS\RELWITHDEBINFO_DEPS\ONNX-BUILD\ONNX\ONNX-ML.PB.CC' which is produced by the build of 'C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\CMakeFiles\2d5faef842602e45854e17cc
4e5d2793\onnx-ml.pb.cc.rule'. The items cannot be built in parallel."
Running C++ protocol buffer compiler on C:/GitHub/onnxruntime/build/Windows/RelWithDebInfo/_deps/onnx-build/onnx/onnx-ml.proto
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\GitHub\onnxruntime\build
\Windows\RelWithDebInfo\CMakeFiles\2d5faef842602e45854e17cc4e5d2793\onnx-ml.pb.cc.rule;C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\CMakeFiles\3f3cda2113739aa063b7e68a17ce2
d7f\gen_onnx_proto.rule' exited with code -1073741819. [C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo_deps\onnx-build\gen_onnx_proto.vcxproj]
Done Building Project "C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo_deps\onnx-build\gen_onnx_proto.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo_deps\onnx-build\gen_onnx_data_proto.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo_deps\onnx-build\onnx_proto.vcxproj" (default targets) -- FAILED.

Project "C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\onnxruntime_providers_openvino.vcxproj" (8) is building "C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\onnxruntim
e_providers_shared.vcxproj" (81) on node 1 (default targets).
PrepareForBuild:
Structured output is enabled. The formatting of compiler diagnostics will reflect the error hierarchy. See https://aka.ms/cpp/structured-output for more details.
InitializeBuildStatus:
Creating "onnxruntime_providers_shared.dir\RelWithDebInfo\onnxrunt.B305E092.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
Touching "onnxruntime_providers_shared.dir\RelWithDebInfo\onnxrunt.B305E092.tlog\unsuccessfulbuild".
CustomBuild:
All outputs are up-to-date.
ClCompile:
All outputs are up-to-date.
ResourceCompile:
All outputs are up-to-date.
Link:
All outputs are up-to-date.
onnxruntime_providers_shared.vcxproj -> C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\RelWithDebInfo\onnxruntime_providers_shared.dll
FinalizeBuildStatus:
Deleting file "onnxruntime_providers_shared.dir\RelWithDebInfo\onnxrunt.B305E092.tlog\unsuccessfulbuild".
Touching "onnxruntime_providers_shared.dir\RelWithDebInfo\onnxrunt.B305E092.tlog\onnxruntime_providers_shared.lastbuildstate".
Done Building Project "C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\onnxruntime_providers_shared.vcxproj" (default targets).

Done Building Project "C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\onnxruntime_providers_openvino.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\ALL_BUILD.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\onnxruntime_providers_openvino.vcxproj" (default target) (8) ->
"C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo_deps\onnx-build\onnx_proto.vcxproj" (default target) (74) ->
"C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo_deps\onnx-build\gen_onnx_data_proto.vcxproj" (default target) (75) ->
"C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo_deps\onnx-build\gen_onnx_proto.vcxproj" (default target) (76) ->
(CustomBuild target) ->
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: Custom build for 'C:\GitHub\onnxruntime\bui
ld\Windows\RelWithDebInfo\CMakeFiles\2d5faef842602e45854e17cc4e5d2793\onnx-ml.pb.cc.rule;C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo\CMakeFiles\3f3cda2113739aa063b7e68a17c
e2d7f\gen_onnx_proto.rule' exited with code -1073741819. [C:\GitHub\onnxruntime\build\Windows\RelWithDebInfo_deps\onnx-build\gen_onnx_proto.vcxproj]

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:03.29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template ep:OpenVINO issues related to OpenVINO execution provider
Projects
None yet
Development

No branches or pull requests

2 participants