0

I trying to compile OpenVINO from sources for release 2021-3

I've faced with issue:

~/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"

I use the following options:

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

Also this header file is absent in ~/Projects/OpenVINO/cmake-build-debug/_deps/ext_onnx-src/onnx/ ...

Seems like onnx should be compiled during build time in directory ~/Projects/OpenVINO/cmake-build-debug/_deps/ext_onnx-src ...

Maybe I've missed some option ?

Denis Kotov
  • 857
  • 2
  • 10
  • 29
  • Did you see the following issue https://github.com/onnx/onnx/issues/1947 ? It looks to be related to the error you are experiencing – jwalton Apr 12 '21 at 16:51
  • @jwalton I saw it and it help, but only in case when I compile onnx separately, but as you can see onnx is provided in cmake-build directory with sources for building – Denis Kotov Apr 12 '21 at 16:59
  • I mean it should work without compiling onnx separatly – Denis Kotov Apr 12 '21 at 16:59

3 Answers3

0

First of all, it is recommended for you to use the latest OpenVINO version 2021.3 and refer to the wiki section from the link I provide below.

Build the OpenVINO from source correctly according to your OS here

Make sure you could successfully build it (means all pre-requisite had been installed & setup correctly)

I had attached in the mentioned thread below, the snapshot of successfully built from source of OpenVINO 2021.3 & I'm using Ubuntu 18.04

My steps are the same as this guide: https://github.com/openvinotoolkit/openvino/wiki/BuildingForLinux

NOTE: make sure you are using CMake* 3.13 or higher

Fyi, this question is similar to this thread.

Rommel_Intel
  • 1,369
  • 1
  • 4
  • 8
0

Try to disable faster build by setting -DENABLE_FASTER_BUILD=OFF. I had a similar problem and this worked for me.

0

Building the onyx_proto project showed that my python path was not correct. Since python is needed to generate the header files, you may need to set this correctly in the cmake setup.

  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 05 '22 at 09:15