[Build] Cross-compile for Android on Windows error #23796
Labels
build
build issues; typically submitted using template
ep:QNN
issues related to QNN exeution provider
platform:mobile
issues related to ONNX Runtime mobile; typically submitted using template
platform:windows
issues related to the Windows platform
Describe the issue
When attempting to build ONNX Runtime for the Android platform with QNN EP enabled using the shared library build option, the following error occurs. Although the documentation (https://onnxruntime.ai/docs/build/eps.html#qnn) provides an example build command for QNN EP in a shared library configuration, the actual build process produces the error message "Only support Android + QNN builds with QNN EP built as a static library." This raises the question of whether there is an internal requirement for QNN EP to be built as a static library or if there is a discrepancy between the documentation and the build scripts.
Urgency
No response
Target platform
Android
Build script
build.bat --android --config Release --use_qnn --qnn_home C:\Qualcomm\AIStack\QAIRT\2.31.0.250130 --android_sdk_path C:\Users\User\AppData\Local\Android\Sdk --android_ndk_path C:\Users\User\AppData\Local\Android\Sdk\ndk\28.0.13004108 --android_abi arm64-v8a --android_api 34 --cmake_generator Ninja --build_dir build\Android
Error / output
Visual Studio Version
No response
GCC / Compiler Version
cmake version 4.0.0-rc1 (also tested with version 3.31.5)
ninja 1.12.1
The text was updated successfully, but these errors were encountered: