0

I've been following this https://blog.hackster.io/getting-started-with-the-intel-neural-compute-stick-2-and-the-raspberry-pi-6904ccfe963 and everything worked without problems until I had to execute the following instruction: cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a"
The error I get is the following:

  By not providing "FindInferenceEngine.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "InferenceEngine", but CMake did not find one.

  Could not find a package configuration file provided by "InferenceEngine"
  (requested version 1.6) with any of the following names:

    InferenceEngineConfig.cmake
    inferenceengine-config.cmake

  Add the installation prefix of "InferenceEngine" to CMAKE_PREFIX_PATH or
  set "InferenceEngine_DIR" to a directory containing one of the above files.
  If "InferenceEngine" provides a separate development package or SDK, be
  sure it has been installed.


-- Configuring incomplete, errors occurred!

I looked up for some solution but haven't found anything that could solve this problem. Thanks in advance

Andrei
  • 23
  • 7

1 Answers1

1

CMake checks if you have all the required libraries installed on your computer. To do so, it uses one file per library that describes how to check if the library is installed. For the Inference Engine Files, it did not find any such file on the given paths. One way to fix this is to download the InferenceEngineConfig.cmake file from the internet (use a search engine) and to put it into a path where CMake will look for such files.

Erik Nellessen
  • 402
  • 5
  • 9
  • How do I know the path where CMake looks for such files ? Also, I have the InferenceEngineConfig.cmake in /interference_engine/share . – Andrei Sep 04 '19 at 12:11
  • https://stackoverflow.com/questions/29290285/where-does-cmake-look-for-cmake-scripts – Erik Nellessen Sep 04 '19 at 12:16
  • 1
    If you already have the file, maybe setting CMAKE_MODULE_PATH to the directory where it is already fixes the problem. – Erik Nellessen Sep 04 '19 at 12:18
  • Where do I find CMAKE_MODULE_PATH so I can set it to the path of the InferenceEngineConfig.cmake ? – Andrei Sep 04 '19 at 12:25
  • 1
    CMAKE_MODULE_PATH is an environment variable. Assuming you are on a Linux system, you can do for example CMAKE_MODULE_PATH=/path/to/the/file:$CMAKE_MODULE_PATH cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a" – Erik Nellessen Sep 04 '19 at 12:26
  • If I understand the tutorial correctly, the environment variable might have been set by the inference_engine_vpu_arm/bin/setupvars.sh shell script. Please execute `echo $CMAKE_MODULE_PATH` and post the result (it might be empty, do not be irritated). – Erik Nellessen Sep 04 '19 at 12:39
  • I did ```sudo CMAKE_MODULE_PATH=/openVino/inference_engine_vpu_arm/deployment_tools/inference_engine/share/InferenceEngineConfig.cmake:$CMAKE_MODULE_PATH cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a"``` and got the same error, exatly the same. Did echo and the result is ```/openVino/inference_engine_vpu_arm/deployment_tools/inference_engine/share/InferenceEngineConfig.cmake: ``` It's empty if I execute it before using the first command. – Andrei Sep 04 '19 at 12:40
  • You used the full file path, not the path to the directory. Try `sudo CMAKE_MODULE_PATH=/openVino/inference_engine_vpu_arm/deployment_tools/inference_engine/share/:$CMAKE_MODULE_PATH cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="-march=armv7-a"`. Are you sure the path is correct? Using the root directory `/` is a little unusual. – Erik Nellessen Sep 04 '19 at 12:42
  • The result of the `echo` command surprises me. Are you sure that you executed exactly `echo $CMAKE_MODULE_PATH` and not `CMAKE_MODULE_PATH=/openVino/inference_engine_vpu_arm/deployment_tools/inference_engine/share/InferenceEngineConfig.cmake:$CMAKE_MODULE_PATH echo $CMAKE_MODULE_PATH`? – Erik Nellessen Sep 04 '19 at 12:46
  • I restarted, and than I wrote ```echo $CMAKE_MODULE_PATH``` and it was empty. – Andrei Sep 04 '19 at 12:50
  • Ok, that is what I thought. This indicates that something went wrong when you set up the script that configures your environment (or the script is broken). What result do you get when you execute `source .bashrc`? Does it output the string from the tutorial, i.e. "[setupvars.sh] OpenVINO environment initialized"? Did you try using the command with the correct path from my other comment? – Erik Nellessen Sep 04 '19 at 12:56
  • 1
    CMAKE_PREFIX_PATH is the correct variable that needs to be set to the base dir of the package. The cmake config files usually reside under /lib/cmake. See the CMake documentation https://cmake.org/cmake/help/latest/command/find_package.html#search-procedure for how the config files are searched. – vre Sep 04 '19 at 13:05
  • So I checked the command again ```source .bashhrc``` and the result is as expected the same as in the tutorial ```[setupvars.sh] OpenVINO environment initialized```. Ok I checked the full path is ```/home/pi/openVino/ inference_engine_vpu_arm/deployment_tools/inference_engine/share/``` and I tried your command from the other comment adding /home/pi/ but still didn't work same error. – Andrei Sep 04 '19 at 13:06
  • 1
    Renamed ```CMAKE_MODULE_PATH``` to ```CMAKE_PREFIX_PATH``` in the upper comment and it worked.```-- Configuring done -- Generating done -- Build files have been written to: /home/pi/openVino/inference_engine_vpu_arm/deployment_tools/inference_engine/samples/build```. Thanks @vre and @Erik Nellessen very much for the help I've been on this error for hours. – Andrei Sep 04 '19 at 13:09