【问题标题】:Cannot CMake NGraph on Raspberry Pi due to NGRAPH_VERSION由于 NGRAPH_VERSION,无法在 Raspberry Pi 上制作图表
【发布时间】:2020-07-23 23:55:25
【问题描述】:

完整的构建日志如下

我正在按照https://github.com/NervanaSystems/ngraph 上的 NGraph 说明进行构建

看着这些,我假设这些变量

NGRAPH_VERSION
NGRAPH_VERSION_SHORT
NGRAPH_API_VERSION

由于某种原因未设置,即使说明从未明确要求设置它们

我的安装步骤是:

git clone https://github.com/csullivan/ngraph.git
cd ngraph
mkdir build
cd build
cmake .. -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DCMAKE_INSTALL_PREFIX=/home/pi/openvino_files/ngraph/install
make -j install

我尝试在命令行和 cmake 文件中手动设置它们,添加

SET(NGRAPH_VERSION 1)
SET(NGRAPH_VERSION_SHORT 1)
SET(NGRAPH_API_VERSION 1)

但错误仍然没有消失。而且我不想每次都手动设置版本。

这里出了点问题,我做错了什么? 我需要输入什么命令才能正确构建?

谢谢,

pi@raspberrypi:~/openvino_files/ngraph/build $ cmake .. -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++ -DCMAKE_INSTALL_PREFIX=/home/pi/openvino_files/ngraph/install
-- Found Git: /usr/bin/git (found version "2.20.1")
From https://github.com/csullivan/ngraph.git
CMake Error at cmake/Modules/git_tags.cmake:39 (string):
  string sub-command REGEX, mode MATCH needs at least 5 arguments total to
  command.
Call Stack (most recent call first):
  cmake/Modules/git_tags.cmake:60 (NGRAPH_GET_TAG_OF_CURRENT_HASH)
  CMakeLists.txt:21 (NGRAPH_GET_VERSION_LABEL)


CMake Error at CMakeLists.txt:27 (list):
  list GET given empty list


CMake Error at CMakeLists.txt:28 (list):
  list GET given empty list


CMake Error at CMakeLists.txt:29 (list):
  list GET given empty list


-- NGRAPH_VERSION
-- NGRAPH_VERSION_SHORT
-- NGRAPH_API_VERSION
CMake Deprecation Warning at CMakeLists.txt:41 (cmake_policy):
  The OLD behavior for policy CMP0042 will be removed from a future version
  of CMake.

  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.


-- The C compiler identification is GNU 8.3.0
-- The CXX compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-gcc
-- Check for working C compiler: /usr/bin/arm-linux-gnueabihf-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: /usr/bin/arm-linux-gnueabihf-g++
-- Check for working CXX compiler: /usr/bin/arm-linux-gnueabihf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Installation directory: /home/pi/openvino_files/ngraph/install
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/openvino_files/ngraph/build/tbb
Scanning dependencies of target ext_tbb
[ 12%] Creating directories for 'ext_tbb'
[ 25%] Performing download step (git clone) for 'ext_tbb'
Cloning into 'tbb-src'...
Switched to a new branch 'tbb_2018'
Branch 'tbb_2018' set up to track remote branch 'tbb_2018' from 'origin'.
[ 37%] No patch step for 'ext_tbb'
[ 50%] No update step for 'ext_tbb'
[ 62%] No configure step for 'ext_tbb'
[ 75%] No build step for 'ext_tbb'
[ 87%] No install step for 'ext_tbb'
[100%] Completed 'ext_tbb'
[100%] Built target ext_tbb
CMake Error at src/ngraph/runtime/interpreter/CMakeLists.txt:27 (set_target_properties):
  set_target_properties called with incorrect number of arguments.


-- Found OpenMP_C: -fopenmp (found version "4.5")
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- Building Intel TBB: /usr/bin/make -j4 compiler=gcc tbb_build_dir=/home/pi/openvino_files/ngraph/build/src/ngraph/runtime/cpu/tbb_build tbb_build_prefix=tbb
CMake Warning (dev) at src/ngraph/runtime/cpu/CMakeLists.txt:125 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  CMake variable TBB_ROOT is set to:

    /home/pi/openvino_files/ngraph/build/tbb/tbb-src

  For compatibility, CMake is ignoring the variable.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found TBB and imported target TBB::tbb
-- tools enabled
-- Adding unit test for backend INTERPRETER
-- Adding unit test for backend CPU
-- unit tests enabled
-- Configuring incomplete, errors occurred!
See also "/home/pi/openvino_files/ngraph/build/CMakeFiles/CMakeOutput.log".

【问题讨论】:

    标签: linux tensorflow cmake openvino


    【解决方案1】:

    我建议您使用包含所有组件(包括 ngraph)的经过验证的 OpenVINO 工具包版本。您可以从https://download.01.org/opencv/2020/openvinotoolkit/2020.4/下载最新的树莓派 OpenVINO 版本

    OpenVINO Raspberry Pi 安装指南可在 https://docs.openvinotoolkit.org/2020.4/openvino_docs_install_guides_installing_openvino_raspbian.html

    【讨论】:

      猜你喜欢
      • 2018-04-26
      • 1970-01-01
      • 2014-10-03
      • 2017-07-31
      • 1970-01-01
      • 1970-01-01
      • 2016-02-08
      • 2016-01-16
      • 1970-01-01
      相关资源
      最近更新 更多