OpenVINO build from source failed in Ubuntu 20.04 in Raspberry Pi.
nilutpolkashyap opened this issue · 22 comments
Hi,
I am trying to build OpenVINO from source in Ubuntu 20.04 in Raspberry Pi 4 4-GB.
I followed the build steps from https://github.com/openvinotoolkit/openvino/wiki/BuildingForLinux
I used the command inside the build folder to create CMake dependencies which works correctly :
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_PYTHON=ON -DENABLE_WHEEL=ON ..
When I try to build the project using the following command, I get the error at [98%] :
make --jobs=$(nproc --all)
The build process took almost 4-5 hours. I was stuck at 98% for an hour and then I got this error for build fail.
Error message
[ 98%] Built target py_onnx_frontend
[ 98%] Built target py_ov_frontends
[ 98%] Built target template_extension
c++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[2]: *** [src/plugins/template/backend/CMakeFiles/interpreter_backend.dir/build.make:174: src/plugins/template/backend/CMakeFiles/interpreter_backend.dir/evaluates_map.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:4975: src/plugins/template/backend/CMakeFiles/interpreter_backend.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
I have attached a screenshot of the error I get while building OpenVINO
Hi @nilutpolkashyap
Please, try:
cmake -DENABLE_TEMPLATE=OFF
make ie_wheel -j8
In this case evaluates_map.cpp
will not be compiled (it's a very big file and we need to split it into smaller ones to avoid such issues)
@nilutpolkashyap Raspberry Pi 4 RAM size is not big enough(4GB), you can set less number building jobs to avoid it is killed due to lack of memory.
Hi,
I tried using -DENABLE_TEMPLATE=OFF and the build was 100% done but after that I got the error as follows -
Cleaning ie_libs: libs.core
Cleaning hetero_plugin: libs.hetero
Cleaning gpu_plugin: libs.gpu
Cleaning cpu_plugin: libs.cpu
Cleaning multi_plugin: libs.multi
Cleaning batch_plugin: libs.batch
Cleaning tbb_libs: libs.tbb
Cleaning pugixml_libs: libs.pugixml
Cleaning ir_libs: libs.ir
Cleaning paddle_libs: libs.paddle
Cleaning pytorch_libs: libs.pytorch
Cleaning onnx_libs: libs.onnx
Cleaning tensorflow_libs: libs.tensorflow
Cleaning tensorflow_lite_libs: libs.tensorflow_lite
Cleaning ie_py: site-packages
Cleaning ngraph_py: site-packages
Cleaning pyopenvino: site-packages
[100%] Run 'fdupes' checks for wheel openvino-2023.0.0-9646--cp38-manylinux_2_31_aarch64.whl
CMake Error at /home/pi/openvino/src/bindings/python/wheel/fdupes_check.cmake:31 (message):
Failed to unpack wheel packagemake[3]: *** [src/bindings/python/wheel/CMakeFiles/ie_wheel.dir/build.make:74: src/bindings/python/wheel/fdupes_report.txt] Error 1
make[2]: *** [CMakeFiles/Makefile2:4446: src/bindings/python/wheel/CMakeFiles/ie_wheel.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:4453: src/bindings/python/wheel/CMakeFiles/ie_wheel.dir/rule] Error 2
make: *** [Makefile:1434: ie_wheel] Error 2
Does
python3 -c "import wheel.vendored.packaging.tags as tags ; print(f'{tags.interpreter_name()}{tags.interpreter_version()}')"
prints nothing for you?
Hi @ilya-lavrenov
Doing so, I get the following
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'wheel.vendored'
Have you installed dependencies for wheel build?
$ cd openvino
$ pip3 install -r src/bindings/python/wheel/requirements.txt
Now, please, try to make ie_wheel
once again.
@ilya-lavrenov I got the same error again after running make ie_wheel -j4
inside the build folder.
But you have some files in build/wheels folder? Try to install it
Hi,
Yes I found a wheel file inside openvino/build/wheels/ and installed it using pip
. It installed perfectly and I am able to access it in Python.
I have also setup the udev rules for my Neural compute stick 2 as shown from this link How to run OpenVINO with Neural Compute Stick 2 on Linux
But my NCS 2 is not visible to the inference engine in python. It is shown by the lsusb
command though.
Can you please help me out with this?
Could you run ./hello_query_device
to check the available devices?
Hi @riverlijunjie ,
I tried running the python sample code for hello_query_device and it does not detect my NCS 2.
I tried to install openvino after compiling it by running the command sudo make install
inside the build directory but I get the following error
Python module 'cython>=0.29.32' is missed, IE Python API 1.0 will
not be built (ENABLE_PYTHON is OFF)
Call Stack (most recent call first):
src/bindings/python/CMakeLists.txt:90 (message)
src/bindings/python/CMakeLists.txt:111 (ov_check_python_build_conditions)-- Configuring incomplete, errors occurred!
See also "/home/pi/openvino/build/CMakeFiles/CMakeOutput.log".
See also "/home/pi/openvino/build/CMakeFiles/CMakeError.log".
make: *** [Makefile:1942: cmake_check_build_system] Error 1
Because of this, I am not able to set my Openvino environment variables
MYRIAD plugin is not a part of the wheel package
BTW, MYRIAD plugin is even removed from the latest master branch and available only in releases/2022/3
To utilize MYRIAD plugin after build, you can go to:
$ cd bin/intel64/Release/python_api/python_3.<x>
$ export PYTHONPATH=`pwd`
Could you check plugins.xml
whether it contains "MYRIAD" plugin?
</plugin>
<plugin name="MYRIAD" location="libopenvino_intel_myriad_plugin.so">
</plugin>
And also run c++ application: ./hello_query_device in your build binary directory: bin/xx/xx, check whether get the same result with python application.
I am still not able to detect my myriad device in Python. So do I need to change to the ' releases/2022/3' branch and build again? Also, is there any specific reason why myriad support was removed after 2022.3 release?
where can I find the plugins.xml
file?
Also, is there any specific reason why myriad support was removed after 2022.3 release?
Deprioritized HW, lack of resources to support it.
So should I change to 'releases/2022/3' or an older branch and build again?
Yes, and use the approach:
$ cd bin/intel64/Release/python_api/python_3.<x>
$ export PYTHONPATH=`pwd`
Hi,
I built Openvino 'releases/2022/3' branch and the inference engine was able to detect the Myriad device.
Thanks a lot for your help. @ilya-lavrenov @riverlijunjie
I got 3 Myriad devices with me. They won't be of much use to me for the newer versions of OpenVINO I guess🙂
Closing this as issue has been resolved. Feel free to reopen to ask any questions related to this topic.
The proper fix is #16216, where we are splitting a big problematic file into smaller ones