Article ID: 000059217 Content Type: Install & Setup Last Reviewed: 01/13/2023

Unable to Compile ONNX* Model Using CMAKE* in OpenVINO™ 2021.3 Source

Environment

Ubuntu

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

How to properly build OpenVINO™ 2021.3 from source and correctly set up for ONNX* model compilation

Description
  1. Attempted to compile OpenVINO™ from source version 2021.3
  2. Error:
    ~/Projects/OpenVINO/cmake-build-debug/_deps/ext_onnx-src/onnx/onnx_pb.h:50:10: fatal error: onnx/onnx-ml.pb.h: No such file or directory #include "onnx/onnx-ml.pb.h"

 

  • Used the CMAKE* compilation command:
    cmake -DVERBOSE_BUILD=ON -DENABLE_TEMPLATE_PLUGIN=ON -DCMAKE_BUILD_TYPE=Debug -DENABLE_PYTHON=ON -DPYTHON_EXECUTABLE=/usr/local/bin/python3 -DENABLE_WHEEL=ON -DENABLE_TESTS=ON -DENABLE_FASTER_BUILD=ON -DONNX_ML=1 -DIE_EXTRA_MODULES=${OPENVINO_CONTRIB_REPO_DIR}/modules -G "CodeBlocks - Unix Makefiles" ~/Projects/OpenVINO

 

 

  • File onnx/onnx_pb.h does not exist.

 

Resolution
  1. Ensure the source is the latest version and official from GitHub*.
  2. Click on the Wiki tab.
  3. In How to build section, click on Linux System.
  4. Note the supported Linux* System and the Software Requirements.
  5. Ensure all the requirements are fulfilled in current Linux* System.
  6. Follow the step-by-step build instructions there.
  7. Ensure the CMAKE* and make build processes are successful.
  8. Follow the additional build steps if required.

Related Products

This article applies to 1 products