Correct ONNX and Protobuf version in vcpkg build#23285
Conversation
* 3.21.12 fails in find_package(ONNX)
* comment CLI commands for vcpkg install * triplets are forked from https://github.com/microsoft/vcpkg/tree/2024.12.16/triplets
|
/azp run Big Models, Linux Android Emulator QNN CI Pipeline, Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline |
|
/azp run Linux OpenVINO CI Pipeline, Linux QNN CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, Windows ARM64 QNN CI Pipeline, Windows CPU CI Pipeline, Windows GPU CUDA CI Pipeline |
|
/azp run Windows GPU DML CI Pipeline, Windows GPU Doc Gen CI Pipeline, Windows GPU TensorRT CI Pipeline, Windows x64 QNN CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline |
|
Azure Pipelines successfully started running 6 pipeline(s). |
|
Azure Pipelines successfully started running 5 pipeline(s). |
|
Azure Pipelines successfully started running 7 pipeline(s). |
### Description Changes vcpkg manifest and configuration file (vcpkg.json & vcpkg-configuration.json) * Update vcpkg version to https://github.com/microsoft/vcpkg/releases/tag/2024.12.16 * Use protobuf 3.21.12(= `v21.12`) to sync with [cmake/deps.txt](https://github.com/microsoft/onnxruntime/blob/main/cmake/deps.txt) * Resolve #22750 * Add `onnx` to vcpkg manifest so `find_package(ONNX)` and `find_dependency(Protobuf)` can work as expected. * Currently, It uses 1.16.2 * v1.17.0 will become available after microsoft/vcpkg#42942 However, `onnx` in vcpkg doesn't configure `ONNX_DISABLE_STATIC_REGISTRATION` build option. * microsoft/vcpkg#38879 * Create "cmake/vcpkg-triplets/" folder and triplet files which use `VCPKG_CMAKE_CONFIGURE_OPTIONS` for the option * This requires `VCPKG_OVERLAY_TRIPLETS` environment variable for CI steps, which is a bit inconvenient. I will try to find simple way to get same result ### Motivation and Context * Help #23158 * "ONNX is not consumed from vcpkg" * "Mismatch protobuf version. When vcpkg is enabled , we should not fetch protoc from Github which may cause version mismatches." * microsoft/vcpkg#43126 * #21348
|
@luncliff , the onnx port pulled in python3. Now we need to build python from source, for every platform. And python itself has a lot of dependencies. Can we avoid doing that? |
|
Most developers would rather using a prebuilt python binary. |
Yes. There is an alternative of using |
|
Thanks! |
### Description Changes vcpkg manifest and configuration file (vcpkg.json & vcpkg-configuration.json) * Update vcpkg version to https://github.com/microsoft/vcpkg/releases/tag/2024.12.16 * Use protobuf 3.21.12(= `v21.12`) to sync with [cmake/deps.txt](https://github.com/microsoft/onnxruntime/blob/main/cmake/deps.txt) * Resolve microsoft#22750 * Add `onnx` to vcpkg manifest so `find_package(ONNX)` and `find_dependency(Protobuf)` can work as expected. * Currently, It uses 1.16.2 * v1.17.0 will become available after microsoft/vcpkg#42942 However, `onnx` in vcpkg doesn't configure `ONNX_DISABLE_STATIC_REGISTRATION` build option. * microsoft/vcpkg#38879 * Create "cmake/vcpkg-triplets/" folder and triplet files which use `VCPKG_CMAKE_CONFIGURE_OPTIONS` for the option * This requires `VCPKG_OVERLAY_TRIPLETS` environment variable for CI steps, which is a bit inconvenient. I will try to find simple way to get same result ### Motivation and Context * Help microsoft#23158 * "ONNX is not consumed from vcpkg" * "Mismatch protobuf version. When vcpkg is enabled , we should not fetch protoc from Github which may cause version mismatches." * microsoft/vcpkg#43126 * microsoft#21348
### Description Changes vcpkg manifest and configuration file (vcpkg.json & vcpkg-configuration.json) * Update vcpkg version to https://github.com/microsoft/vcpkg/releases/tag/2024.12.16 * Use protobuf 3.21.12(= `v21.12`) to sync with [cmake/deps.txt](https://github.com/microsoft/onnxruntime/blob/main/cmake/deps.txt) * Resolve #22750 * Add `onnx` to vcpkg manifest so `find_package(ONNX)` and `find_dependency(Protobuf)` can work as expected. * Currently, It uses 1.16.2 * v1.17.0 will become available after microsoft/vcpkg#42942 However, `onnx` in vcpkg doesn't configure `ONNX_DISABLE_STATIC_REGISTRATION` build option. * microsoft/vcpkg#38879 * Create "cmake/vcpkg-triplets/" folder and triplet files which use `VCPKG_CMAKE_CONFIGURE_OPTIONS` for the option * This requires `VCPKG_OVERLAY_TRIPLETS` environment variable for CI steps, which is a bit inconvenient. I will try to find simple way to get same result ### Motivation and Context * Help #23158 * "ONNX is not consumed from vcpkg" * "Mismatch protobuf version. When vcpkg is enabled , we should not fetch protoc from Github which may cause version mismatches." * microsoft/vcpkg#43126 * #21348
…#23554) ### Description `python3` dependency is removed in `onnx` port of https://github.com/microsoft/vcpkg upstream. * microsoft/vcpkg#43236 * #23285 (comment) (Previous work) Removed `nsync`, and use ONNX 1.70.0+ in vcpkg.json(manifest) ### Motivation and Context * Help #23158 * #23456
…microsoft#23554) ### Description `python3` dependency is removed in `onnx` port of https://github.com/microsoft/vcpkg upstream. * microsoft/vcpkg#43236 * microsoft#23285 (comment) (Previous work) Removed `nsync`, and use ONNX 1.70.0+ in vcpkg.json(manifest) ### Motivation and Context * Help microsoft#23158 * microsoft#23456
…microsoft#23554) ### Description `python3` dependency is removed in `onnx` port of https://github.com/microsoft/vcpkg upstream. * microsoft/vcpkg#43236 * microsoft#23285 (comment) (Previous work) Removed `nsync`, and use ONNX 1.70.0+ in vcpkg.json(manifest) ### Motivation and Context * Help microsoft#23158 * microsoft#23456
…#23554) ### Description `python3` dependency is removed in `onnx` port of https://github.com/microsoft/vcpkg upstream. * microsoft/vcpkg#43236 * #23285 (comment) (Previous work) Removed `nsync`, and use ONNX 1.70.0+ in vcpkg.json(manifest) ### Motivation and Context * Help #23158 * #23456
…#23554) ### Description `python3` dependency is removed in `onnx` port of https://github.com/microsoft/vcpkg upstream. * microsoft/vcpkg#43236 * #23285 (comment) (Previous work) Removed `nsync`, and use ONNX 1.70.0+ in vcpkg.json(manifest) ### Motivation and Context * Help #23158 * #23456
### Description Changes vcpkg manifest and configuration file (vcpkg.json & vcpkg-configuration.json) * Update vcpkg version to https://github.com/microsoft/vcpkg/releases/tag/2024.12.16 * Use protobuf 3.21.12(= `v21.12`) to sync with [cmake/deps.txt](https://github.com/microsoft/onnxruntime/blob/main/cmake/deps.txt) * Resolve #22750 * Add `onnx` to vcpkg manifest so `find_package(ONNX)` and `find_dependency(Protobuf)` can work as expected. * Currently, It uses 1.16.2 * v1.17.0 will become available after microsoft/vcpkg#42942 However, `onnx` in vcpkg doesn't configure `ONNX_DISABLE_STATIC_REGISTRATION` build option. * microsoft/vcpkg#38879 * Create "cmake/vcpkg-triplets/" folder and triplet files which use `VCPKG_CMAKE_CONFIGURE_OPTIONS` for the option * This requires `VCPKG_OVERLAY_TRIPLETS` environment variable for CI steps, which is a bit inconvenient. I will try to find simple way to get same result ### Motivation and Context * Help #23158 * "ONNX is not consumed from vcpkg" * "Mismatch protobuf version. When vcpkg is enabled , we should not fetch protoc from Github which may cause version mismatches." * microsoft/vcpkg#43126 * #21348
…#23554) ### Description `python3` dependency is removed in `onnx` port of https://github.com/microsoft/vcpkg upstream. * microsoft/vcpkg#43236 * #23285 (comment) (Previous work) Removed `nsync`, and use ONNX 1.70.0+ in vcpkg.json(manifest) ### Motivation and Context * Help #23158 * #23456
Description
Changes vcpkg manifest and configuration file (vcpkg.json & vcpkg-configuration.json)
v21.12) to sync with cmake/deps.txtvcpkgdue to an incorrect protobuf version. #22750onnxto vcpkg manifest sofind_package(ONNX)andfind_dependency(Protobuf)can work as expected.However,
onnxin vcpkg doesn't configureONNX_DISABLE_STATIC_REGISTRATIONbuild option.VCPKG_CMAKE_CONFIGURE_OPTIONSfor the optionVCPKG_OVERLAY_TRIPLETSenvironment variable for CI steps, which is a bit inconvenient.I will try to find simple way to get same result
Motivation and Context
Protobuf_INCLUDE_DIRin ONNXConfig.cmake and usefind_dependency(protobuf)vcpkg#43126onnxruntime_USE_VCPKG#21348