Article ID: 000088676 Content Type: Troubleshooting Last Reviewed: 08/08/2022

Unable to Build Open Source OpenVINO™ for Raspbian* Bullseye

Environment

Raspbian Bullseye Open Source OpenVINO

BUILT IN - ARTICLE INTRO SECOND COMPONENT
Summary

Workaround steps to build Open SourceOpenVINO™ for Raspbian* Bullseye

Description
  1. ​​​​​Edited  openvino/ngraph/cmake/external_protobuf.cmakefile and changed the following code at ~ lines 26-30:

    if (MSVC)

    set(protobuf_MSVC_STATIC_RUNTIME OFF CACHE BOOL "")

    else()

    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-error -latomic")

    endif()

  2. Used the following configuration but the compilation still failed:

    CFLAGS="-mcpu=cortex-a72 -mfpu=neon-fp-armv8" \

    CXXFLAGS="-mcpu=cortex-a72 -mfpu=neon-fp-armv8" \

    cmake -DCMAKE_BUILD_TYPE=Release \

    -DCMAKE_INSTALL_PREFIX=/opt/intel/openvino \

    -DENABLE_MKL_DNN=OFF \

    -DENABLE_CLDNN=OFF \

    -DENABLE_GNA=OFF \

    -DENABLE_SSE42=OFF \

    -DTHREADING=SEQ \

    -DENABLE_OPENCV=OFF \

    -DNGRAPH_PYTHON_BUILD_ENABLE=ON \

    -DNGRAPH_ONNX_IMPORT_ENABLE=ON \

    -DENABLE_PYTHON=ON \

    -DPYTHON_EXECUTABLE=$(which python3.9) \

    -DPYTHON_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython3.9m.so \

    -DPYTHON_INCLUDE_DIR=/usr/include/python3.9 \

    -DCMAKE_CXX_FLAGS=-latomic \

    -DOPENCV_EXTRA_EXE_LINKER_FLAGS=-latomic ..

Resolution
Note

OpenVINO™ is not validated to work on Raspbian Bullseye. Only Raspbian Buster 32-bit is currently supported by Intel

The following configuration, provided by the Github community, comprises a workaround to allow building OpenVINO™ from source for Raspbian Bullseye. Issues may still occur after following this workaround.

  1. Disable the protobuf compilation within OpenVINO™ since libprotobufis already available in the Debian repository:-DNGRAPH_USE_SYSTEM_PROTOBUF=ON -DProtobuf_INCLUDE_DIR=/usr/include

  2. Disable ONNX_IMPORT since it is not mandatory and fails on cmake:-DNGRAPH_ONNX_IMPORT_ENABLE=OFF

  3. Install additional dependencies:sudo apt-get install cython3 libprotobuf-dev

  4. Make with make -j1 to use less memory.

  5. Use the static library of libpython3.9..so that comes with Python* 3.9 in Rasbian Bullseye:-DPYTHON_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython3.9.so

  6. The full configuration:

    LDFLAGS="-L/usr/lib/gcc/arm-linux-gnueabihf/10/ -latomic" \

    CFLAGS="-mcpu=cortex-a72 -mfpu=neon-fp-armv8" \

    CXXFLAGS="-mcpu=cortex-a72 -mfpu=neon-fp-armv8" \

    cmake -DCMAKE_BUILD_TYPE=Release \

    -DCMAKE_INSTALL_PREFIX=/opt/intel/openvino \

    -DENABLE_MKL_DNN=OFF \

    -DENABLE_CLDNN=OFF \

    -DENABLE_GNA=OFF \

    -DENABLE_SSE42=OFF \

    -DTHREADING=SEQ \

    -DENABLE_OPENCV=OFF \

    -DNGRAPH_PYTHON_BUILD_ENABLE=ON \

    -DNGRAPH_USE_SYSTEM_PROTOBUF=ON \

    -DProtobuf_INCLUDE_DIR=/usr/include \

    -DNGRAPH_ONNX_IMPORT_ENABLE=OFF \

    -DENABLE_PYTHON=ON \

    -DPYTHON_EXECUTABLE=$(which python3.9) \

    -DPYTHON_LIBRARY=/usr/lib/arm-linux-gnueabihf/libpython3.9.so \

    -DPYTHON_INCLUDE_DIR=/usr/include/python3.9 \

    -DCMAKE_CXX_FLAGS=-latomic ..

Related Products

This article applies to 1 products