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] Better support for vcpkg #23158

Open
1 of 13 tasks
snnn opened this issue Dec 20, 2024 · 2 comments
Open
1 of 13 tasks

[Build] Better support for vcpkg #23158

snnn opened this issue Dec 20, 2024 · 2 comments
Labels
build build issues; typically submitted using template ep:Xnnpack issues related to XNNPACK EP platform:mobile issues related to ONNX Runtime mobile; typically submitted using template platform:web issues related to ONNX Runtime web; typically submitted using template

Comments

@snnn
Copy link
Member

snnn commented Dec 20, 2024

Describe the issue

Thanks @luncliff for adding the support for vcpkg. Now it works for a very basic build. This issue is created for tracking the remaining issues when --use_vcpkg is enabled.

  • ONNX is not consumed from vcpkg.
  • Windows ARM64 cross-compiling support. We need to build protoc for x64 and the rest of the code for ARM64. Which means we may need to run vcpkg install in classic mode first. Need to explore.
  • Add toolchain chain loader support
  • Apply local patches. We need to apply the patches in https://github.com/microsoft/onnxruntime/tree/main/cmake/patches folder when building with vcpkg, which means we need to create custom ports for them?
  • The cpuinfo library is the official vcpkg registry is too old, which doesn't work with the XNNPack version we are using. ([cpuinfo] Update cpuinfo to the latest version vcpkg#42800)
  • winml_dll links to re2 instead of re2::re2 (Fix a tiny problem in winml.cmake #23173)
  • Similar to the above, ORT extension has a lot of similar issues. And we need to update the ORT extension version after fixing the issues.
  • Mismatch protobuf version. When vcpkg is enabled , we should not fetch protoc from Github which may cause version mismatches.
  • BinSkim support. By default the packages are not built with Qspectre. It can be resolved by creating customized triplets for it.
  • WASM build has too many build options:
    - onnxruntime_ENABLE_WEBASSEMBLY_DEBUG_INFO
    - onnxruntime_ENABLE_WEBASSEMBLY_SIMD
    - onnxruntime_ENABLE_WEBASSEMBLY_EXCEPTION_CATCHING
    - onnxruntime_ENABLE_WEBASSEMBLY_MEMORY64
    - onnxruntime_ENABLE_WEBASSEMBLY_THREADS
    It leads to 2^5 = 32 different combinations. We will need to create 32 triplets for them.
  • Would iOS build be possible? I am not sure yet.
  • (low priority) Enable asset cache in CI
  • (low priority) Enable binary cache in CI

Contributions are welcomed. Or if you have any ideas or suggestions, please let us know. This issue is created for listening your feedbacks and suggestions.

Here is my dev branch: https://github.com/microsoft/onnxruntime/tree/snnn/vcpkg

@snnn snnn added the build build issues; typically submitted using template label Dec 20, 2024
@github-actions github-actions bot added ep:Xnnpack issues related to XNNPACK EP platform:web issues related to ONNX Runtime web; typically submitted using template platform:mobile issues related to ONNX Runtime mobile; typically submitted using template labels Dec 20, 2024
@luncliff
Copy link
Contributor

luncliff commented Dec 20, 2024 via email

@snnn
Copy link
Member Author

snnn commented Dec 20, 2024

You may directly create the PRs to main. Meanwhile, I will also gradually migrate our pull request pipelines from Azure DevOps to Github.

snnn added a commit that referenced this issue Dec 20, 2024
### Description
CMake's
[target_link_libraries](https://cmake.org/cmake/help/latest/command/target_link_libraries.html#id2)
function accepts plain library name(like `re2`) or target name(like
`re2::re2`) or some other kinds of names. "plain library names" are
old-fashioned, for compatibility only. We should use target names.

### Motivation and Context
To make vcpkg work with winml build. See #23158
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:Xnnpack issues related to XNNPACK EP platform:mobile issues related to ONNX Runtime mobile; typically submitted using template platform:web issues related to ONNX Runtime web; typically submitted using template
Projects
None yet
Development

No branches or pull requests

2 participants