Skip to content

[Build] how to build onnxruntime with openvino EP for android #23222

Open
@junruizh2021

Description

@junruizh2021

Describe the issue

I want to use openvino as Execution Providers to compile onnxruntime, but need to execute on android x86 device. The compilation command I currently use is as follows:

$ ./build.sh --android --android_sdk_path /home/user/sdk --android_ndk_path /home/junruizh/sdk/ndk/27.0.11718014 --android_abi x86_64 --android_api 34 --config RelWithDebInfo --use_openvino GPU --build_shared_lib --cmake_extra_defines OpenVINO_DIR=/home/user/openvino-android/openvino-install-android/runtime/cmake

The openvino_dir specified here is the installation path of an Android version of openvino.

During the compilation process of onnxruntime, I encountered this error:

CMake Error at onnxruntime_providers_openvino.cmake:49 (add_dependencies):
  The dependency target "onnxruntime_providers_shared" of target
  "onnxruntime_providers_openvino" does not exist.
Call Stack (most recent call first):
  onnxruntime_providers.cmake:143 (include)
  CMakeLists.txt:1768 (include)


-- Generating done (0.3s)
CMake Warning:
  Manually-specified variables were not used by the project:

    ANDROID_MIN_SDK
    onnxruntime_USE_OPENVINO_DEVICE

Urgency

No response

Target platform

x86

Build script

$ ./build.sh --android --android_sdk_path /home/user/sdk --android_ndk_path /home/junruizh/sdk/ndk/27.0.11718014 --android_abi x86_64 --android_api 34 --config RelWithDebInfo --use_openvino GPU --build_shared_lib --cmake_extra_defines OpenVINO_DIR=/home/user/openvino-android/openvino-install-android/runtime/cmake

Error / output

CMake Error at onnxruntime_providers_openvino.cmake:49 (add_dependencies):
The dependency target "onnxruntime_providers_shared" of target
"onnxruntime_providers_openvino" does not exist.
Call Stack (most recent call first):
onnxruntime_providers.cmake:143 (include)
CMakeLists.txt:1768 (include)

Visual Studio Version

No response

GCC / Compiler Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildbuild issues; typically submitted using templateep:OpenVINOissues related to OpenVINO execution providerplatform:mobileissues related to ONNX Runtime mobile; typically submitted using template

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions