Workaround steps to build Open SourceOpenVINO™ for Raspbian* Bullseye
-
Edited openvino/ngraph/cmake/external_protobuf.cmake file 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()
-
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 ..
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. |
-
Disable the protobuf compilation within OpenVINO™ since libprotobufis already available in the Debian repository:-DNGRAPH_USE_SYSTEM_PROTOBUF=ON -DProtobuf_INCLUDE_DIR=/usr/include
-
Disable ONNX_IMPORT since it is not mandatory and fails on cmake:-DNGRAPH_ONNX_IMPORT_ENABLE=OFF
-
Install additional dependencies:sudo apt-get install cython3 libprotobuf-dev
-
Make with make -j1 to use less memory.
-
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
-
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 ..