Vitis AIの構造を勉強してみる(5日目)

まずい状況になってきた。

ライブラリ作成に3日費やしている。

SDKってどれ使えばいいんだっけ?

./Vitis-AI/tools/Vitis-AI-Library/README.mdを読んでみると使うSDKを間違えていたようだ。

そういえば、SDKを/opt/petalinuxにインストールしたっけ?

こういうことか?

$ source /opt/petalinux/settings.sh 
PetaLinux environment set to '/disk/opt/petalinux'
WARNING: This is not a supported OS
INFO: Checking free disk space
INFO: Checking installed tools
INFO: Checking installed development libraries
INFO: Checking network and other services
WARNING: No tftp server found - please refer to "UG1144 2020.1 PetaLinux Tools Documentation Reference Guide" for its impact and solution
$ cmake ../
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 9.3.0
-- The CXX compiler identification is GNU 9.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:18 (include):
  include could not find load file:

    XilinxVersion


CMake Error at CMakeLists.txt:51 (install):
  install EXPORT given no DESTINATION!


-- Configuring incomplete, errors occurred!
See also "/home/hidemi/workspace/VitisAI/VitisAI_2020.2/Vitis-AI/tools/Vitis-AI-Library/facedetect/build/CMakeFiles/CMakeOutput.log".

やっぱり、エラーやん。

PetaLinuxの環境設定を間違えてたか?

$ $ source /opt/petalinux/2020.2/environment-setup-aarch64-xilinx-linux 
$ cd build/
$ cmake ../
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Toolchain file defaulted to '/disk/opt/petalinux/2020.2/sysroots/x86_64-petalinux-linux/usr/share/cmake/OEToolchainConfig.cmake'
-- The C compiler identification is GNU 9.2.0
-- The CXX compiler identification is GNU 9.2.0
-- Check for working C compiler: /disk/opt/petalinux/2020.2/sysroots/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-gcc
-- Check for working C compiler: /disk/opt/petalinux/2020.2/sysroots/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /disk/opt/petalinux/2020.2/sysroots/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-g++
-- Check for working CXX compiler: /disk/opt/petalinux/2020.2/sysroots/x86_64-petalinux-linux/usr/bin/aarch64-xilinx-linux/aarch64-xilinx-linux-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:18 (include):
  include could not find load file:

    XilinxVersion


CMake Error at CMakeLists.txt:51 (install):
  install EXPORT given no DESTINATION!


-- Configuring incomplete, errors occurred!
See also "/home/hidemi/workspace/VitisAI/VitisAI_2020.2/Vitis-AI/tools/Vitis-AI-Library/facedetect/build/CMakeFiles/CMakeOutput.log".

やっぱり、エラーだな。

鍵はproject(ProjectName)XilinxVersionか。

もしかして、docker環境じゃないとビルドできないのか?

こりゃまいったなぁ。

ここはいったん、ライブラリ作成は諦めて明日は違うことをしよう。

write: 2021/01/12/ 00:00:00