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

cmkake問題を片付けよう。

cmake問題をどうする?

Ubuntu 20.04.1LTSでcmakeのバージョンは?

$ which cmake
/home/hidemi/.local/bin/cmake
$ cmake --version
cmake version 3.18.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

おぉ?

バージョンは3.18.2で3.5より上なのでいいんだけど、なんで.localの下にあるんだろう?

いやいや、ちょっと待って。

ライブラリはZynqMPSoC上で実行されるものだからローカルホスト向けにビルドしちゃいけないよね。

PetaLinuxの環境を整えてみよう。

$ source /opt/pkg/petalinux/2020.2/settings.sh 
PetaLinux environment set to '/disk/opt/pkg/petalinux/2020.2'
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.2 PetaLinux Tools Documentation Reference Guide" for its impact and solution

さて、cmakeしたらどうなるかな?

$ 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".

うむ、エラーである。

project(ProjectName)ってなんやねん?

それとXilinxVersionってなんやねん?

いまいちわからない、明日にしよう。

write: 2021/01/11/ 00:00:00