summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2022-07-21 12:09:39 (GMT)
committerAnuj Mittal <anuj.mittal@intel.com>2022-07-28 10:57:44 (GMT)
commitfdde909d2e3d8307b24302f7511131f7fd3934db (patch)
tree383bd53b4d05bfe55e19568ef6edb63d9c5eaf3b
parent79486754252c139aaf3b41e3699bc98785b47891 (diff)
downloadmeta-intel-fdde909d2e3d8307b24302f7511131f7fd3934db.tar.gz
openvino-inference-engine: fix reproducibility issues
Prevent host paths from getting into target packages. Also prevents buildpaths warnings for files: | File /usr/lib/libopenvino.so in package openvino-inference-engine contains reference to TMPDIR [buildpaths] | File /usr/lib/python3.10/site-packages/openvino/inference_engine/ie_api.so in package openvino-inference-engine-python3 contains reference to TMPDIR [buildpaths] | File /usr/src/debug/openvino-inference-engine/2022.1-r0/build/src/plugins/intel_cpu/cross-compiled/proposal_imp_disp.cpp in package openvino-inference-engine-src contains reference to TMPDIR Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/files/cython-cmake.patch19
-rw-r--r--dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2022.1.bb8
2 files changed, 27 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/cython-cmake.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/cython-cmake.patch
new file mode 100644
index 0000000..45ed0d2
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/cython-cmake.patch
@@ -0,0 +1,19 @@
1Change the working directory to source to workaround cython
2embedding absolute path to the pyx file in output.
3
4Upstream-Status: Inappropriate [OE build specific]
5Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
6
7diff --git a/src/bindings/python/src/compatibility/openvino/cmake/UseCython.cmake b/src/bindings/python/src/compatibility/openvino/cmake/UseCython.cmake
8index f14662ad50..8d199fe328 100644
9--- a/src/bindings/python/src/compatibility/openvino/cmake/UseCython.cmake
10+++ b/src/bindings/python/src/compatibility/openvino/cmake/UseCython.cmake
11@@ -259,7 +259,7 @@ function( compile_pyx _name generated_file )
12 add_custom_command( OUTPUT ${_generated_file}
13 COMMAND ${CYTHON_EXECUTABLE}
14 ARGS ${cxx_arg} ${include_directory_arg} ${version_arg}
15- ${annotate_arg} ${no_docstrings_arg} ${cython_debug_arg} ${CYTHON_FLAGS}
16+ ${annotate_arg} ${no_docstrings_arg} ${cython_debug_arg} ${CYTHON_FLAGS} -w ${CMAKE_CURRENT_SOURCE_DIR}
17 --output-file ${_generated_file} ${pyx_locations}
18 DEPENDS ${pyx_locations} ${pxd_dependencies} ${pxi_dependencies}
19 IMPLICIT_DEPENDS ${pyx_lang} ${c_header_dependencies}
diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2022.1.bb b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2022.1.bb
index 5814380..e4b0414 100644
--- a/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2022.1.bb
+++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/openvino-inference-engine_2022.1.bb
@@ -17,6 +17,7 @@ SRC_URI = "git://github.com/openvinotoolkit/openvino.git;protocol=https;branch=r
17 git://github.com/openvinotoolkit/open_model_zoo.git;protocol=https;destsuffix=git/thirdparty/open_model_zoo;name=omz;branch=releases/2022/1 \ 17 git://github.com/openvinotoolkit/open_model_zoo.git;protocol=https;destsuffix=git/thirdparty/open_model_zoo;name=omz;branch=releases/2022/1 \
18 file://0001-inference-engine-use-system-installed-packages.patch \ 18 file://0001-inference-engine-use-system-installed-packages.patch \
19 file://0002-inference-engine-installation-fixes.patch \ 19 file://0002-inference-engine-installation-fixes.patch \
20 file://cython-cmake.patch \
20 " 21 "
21 22
22SRCREV = "cdb9bec7210f8c24fde3e416c7ada820faaaa23e" 23SRCREV = "cdb9bec7210f8c24fde3e416c7ada820faaaa23e"
@@ -92,6 +93,11 @@ PACKAGECONFIG[python3] = "-DENABLE_PYTHON=ON -DPYTHON_LIBRARY=${PYTHON_LIBRARY}
92PACKAGECONFIG[vpu] = "-DENABLE_INTEL_MYRIAD=ON -DVPU_FIRMWARE_USB-MA2X8X_FILE=../mvnc/usb-ma2x8x.mvcmd -DVPU_FIRMWARE_PCIE-MA2X8X_FILE=../mvnc/pcie-ma2x8x.mvcmd,-DENABLE_INTEL_MYRIAD=OFF,,${PN}-vpu-firmware" 93PACKAGECONFIG[vpu] = "-DENABLE_INTEL_MYRIAD=ON -DVPU_FIRMWARE_USB-MA2X8X_FILE=../mvnc/usb-ma2x8x.mvcmd -DVPU_FIRMWARE_PCIE-MA2X8X_FILE=../mvnc/pcie-ma2x8x.mvcmd,-DENABLE_INTEL_MYRIAD=OFF,,${PN}-vpu-firmware"
93PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0" 94PACKAGECONFIG[verbose] = "-DVERBOSE_BUILD=1,-DVERBOSE_BUILD=0"
94 95
96do_configure:prepend() {
97 # Dont set PROJECT_ROOT_DIR
98 sed -i -e 's:\${CMAKE_CURRENT_SOURCE_DIR}::;' ${S}/src/CMakeLists.txt
99}
100
95do_install:append() { 101do_install:append() {
96 if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then 102 if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then
97 install -d ${D}${datadir}/openvino 103 install -d ${D}${datadir}/openvino
@@ -108,6 +114,8 @@ do_install:append() {
108 114
109 # Remove the samples source directory. We install the built samples. 115 # Remove the samples source directory. We install the built samples.
110 rm -rf ${D}/usr/samples 116 rm -rf ${D}/usr/samples
117
118 sed -i -e 's:^#include.*imp.hpp"$:#include "/usr/src/debug/${PN}/${EXTENDPE}${PV}-${PR}/git/src/plugins/intel_cpu/src/nodes/proposal_imp.hpp":g;' ${B}/src/plugins/intel_cpu/cross-compiled/proposal_imp_disp.cpp
111} 119}
112 120
113# Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR 121# Otherwise e.g. ros-openvino-toolkit-dynamic-vino-sample when using dldt-inference-engine uses dldt-inference-engine WORKDIR