STMicroelectronics / meta-st-x-linux-ai

OpenEmbedded meta layer to install AI frameworks and tools for the STM32MPU series
Other
47 stars 18 forks source link

Add missing dependency to numpy of onnxruntime. #8

Closed Richardn2002 closed 1 year ago

Richardn2002 commented 1 year ago

Without the changes, cmake will fail building python3-onnxruntime.

The error prints of the direct cause are given as:

| CMake Error at CMakeLists.txt:1252 (target_compile_definitions):
|   Error evaluating generator expression:
| 
|     $<TARGET_PROPERTY:Python::NumPy,INTERFACE_COMPILE_DEFINITIONS>
| 
|   Target "Python::NumPy" not found.
| Call Stack (most recent call first):
|   onnxruntime_python.cmake:76 (onnxruntime_add_include_to_target)
|   CMakeLists.txt:1965 (include)
| 
| 
| CMake Error at CMakeLists.txt:1251 (target_include_directories):
|   Error evaluating generator expression:
| 
|     $<TARGET_PROPERTY:Python::NumPy,INTERFACE_INCLUDE_DIRECTORIES>
| 
|   Target "Python::NumPy" not found.
| Call Stack (most recent call first):
|   onnxruntime_python.cmake:76 (onnxruntime_add_include_to_target)
|   CMakeLists.txt:1965 (include)

And these lines from cmake log indicate the root cause:

| Doing crosscompiling
| -- Could NOT find Python (missing: Python_NumPy_INCLUDE_DIRS NumPy) (found suitable version "3.10.4", minimum required is "3.6")
vinceab commented 1 year ago

Hi @Richardn2002 ,

Thanks for your pull request, We will check it on our side and get back to you.

BR Vincent

vinceab commented 1 year ago

Hello @Richardn2002,

Can you please describe your build environment: 1/ OpenSTLinux version 2/ Yocto Machine used 3/ targeted board (STM32MP15x...)

Thanks Vincent

Richardn2002 commented 1 year ago

OpenSTLinux is downloaded by

repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-5.15-yocto-kirkstone-mp1-v22.11.23
repo sync

MACHINE is stm32mp15-disco

Targeted board is STM32MP157F-DK2

vinceab commented 1 year ago

@Richardn2002

Your patch have been integrated into the X-LINUX-AI v5.0.0 that we just release. Thank for your contribution.

BR Vincent