NXP mx8平台tensorflow-lite build error

NXP提供的方案

1、使用bitbake编译tensorflow-lite

bitbake tensorflow-lite -c do_configure -v -f

出现以下错误,您可以看到包的下载错误。

[En]

The following error occurs, and you can see the download error of the package.

FAILED: ruy-populate-prefix/src/ruy-populate-stamp/ruy-populate-download

具体路径为

tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/_deps/ruy-subbuild/ruy-populate-prefix/src/ruy-populate-stamp/ruy-populate-download

tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/_deps/ruy-subbuild/ruy-populate-prefix/src/

查看改目录下是否有相应的zip包,有复制到相应根目录下创建tensorflow-pack文件夹中。

| FAILED: ruy-populate-prefix/src/ruy-populate-stamp/ruy-populate-download
| cd /work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build && /work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/recipe-sysroot-native/usr/bin/cmake -P /work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/_deps/ruy-subbuild/ruy-populate-prefix/src/ruy-populate-stamp/download-ruy-populate.cmake && /work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/recipe-sysroot-native/usr/bin/cmake -P /work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/_deps/ruy-subbuild/ruy-populate-prefix/src/ruy-populate-stamp/verify-ruy-populate.cmake && /work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/recipe-sysroot-native/usr/bin/cmake -P /work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/_deps/ruy-subbuild/ruy-populate-prefix/src/ruy-populate-stamp/extract-ruy-populate.cmake && /work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/recipe-sysroot-native/usr/bin/cmake -E touch /work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/_deps/ruy-subbuild/ruy-populate-prefix/src/ruy-populate-stamp/ruy-populate-download
| ninja: build stopped: subcommand failed.

|
| CMake Error at /work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/recipe-sysroot-native/usr/share/cmake-3.19/Modules/FetchContent.cmake:989 (message):
|   Build step for ruy failed: 1
| Call Stack (most recent call first):
|   /work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/recipe-sysroot-native/usr/share/cmake-3.19/Modules/FetchContent.cmake:1118:EVAL:2 (__FetchContent_directPopulate)
|   /work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/recipe-sysroot-native/usr/share/cmake-3.19/Modules/FetchContent.cmake:1118 (cmake_language)
|   tools/cmake/modules/OverridableFetchContent.cmake:531 (FetchContent_Populate)
|   tools/cmake/modules/ruy.cmake:30 (OverridableFetchContent_Populate)
|   tools/cmake/modules/Findruy.cmake:16 (include)
|   CMakeLists.txt:197 (find_package)
|
|
| -- Configuring incomplete, errors occurred!

| See also "/work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/CMakeFiles/CMakeOutput.log".

| See also "/work/code/temp/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/CMakeFiles/CMakeError.log".

| + bb_sh_exit_handler
| + ret=1
| + [ 1 != 0 ]
| + echo WARNING: exit code 1 from a shell command.

| WARNING: exit code 1 from a shell command.

| + exit 1

第二个错误;

tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/pthreadpool-download

在此目录下查看是否有zip,在copy到到tensorflow-pack文件夹中

ninja: build stopped: subcommand failed.

-- Downloading pthreadpool to /work/code/test/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/pthreadpool-source (define PTHREADPOOL_SOURCE_DIR to avoid it)
-- Configuring done
-- Generating done
-- Build files have been written to: /work/code/test/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/pthreadpool-download
[1/9] Creating directories for 'pthreadpool'
[2/9] Performing download step (download, verify and extract) for 'pthreadpool'
-- Downloading...

   dst='/work/code/test/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/pthreadpool-download/pthreadpool-prefix/src/545ebe9f225aec6dca49109516fac02e973a3de2.zip'
   timeout='none'
   inactivity timeout='none'
-- Using src='https://github.com/Maratyszcza/pthreadpool/archive/545ebe9f225aec6dca49109516fac02e973a3de2.zip'
-- [download 100% complete]
-- verifying file...

       file='/work/code/test/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/pthreadpool-download/pthreadpool-prefix/src/545ebe9f225aec6dca49109516fac02e973a3de2.zip'
-- Downloading... done
-- extracting...

     src='/work/code/test/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/pthreadpool-download/pthreadpool-prefix/src/545ebe9f225aec6dca49109516fac02e973a3de2.zip'
     dst='/work/code/test/ver/build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/pthreadpool-source'
-- extracting... [tar xfz]

3、后续错误依次更改。

4、在进行bitbake tensorflow-lite -c compile -v -f 编译的过程中执行此../cp.sh脚本,此时tensorflow-lite即可编译成功。

#!/bin/bash
mkdir -p ./../build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/_deps/ruy-subbuild/ruy-populate-prefix/src/
cp 54774a7a2cf85963777289193629d4bd42de4a59.zip  ./../build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/_deps/ruy-subbuild/ruy-populate-prefix/src/

mkdir -p ./../build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/cpuinfo-download/cpuinfo-prefix/src/
cp 5916273f79a21551890fd3d56fc5375a78d1598d.zip ../build-imx-robot/tmp/work/cortexa53-crypto-poky-linux/tensorflow-lite/2.5.0-r0/build/cpuinfo-download/cpuinfo-prefix/src/

Original: https://blog.csdn.net/ldinvicible/article/details/121533082
Author: ldinvicible
Title: NXP mx8平台tensorflow-lite build error

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/514296/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球