From b15d2fbc3399c70f4bb5e65fe24195d63e125eb1 Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Thu, 29 Dec 2022 23:30:42 +0800 Subject: openvino-inference-engine: upgrade 2022.2.0 -> 2022.3.0 * OpenVINO now installs libraries and headers correctly so we don't need the local patches anymore. * Switch to using pybind11 from system. json-schema-validator is no longer used and open model zoo submodule is only used when building a specific tool so these submodules have been removed. * Tweak build scripts to include Yocto specific changes. License-Update: xbyak deleted the Japaneses translation from COPYRIGHT and nlohmann_json updated copyright years. Signed-off-by: Yogesh Tyagi Signed-off-by: Anuj Mittal --- .../0001-Use-system-installed-dependencies.patch | 196 ------------ ...ix-installation-of-binaries-and-libraries.patch | 348 --------------------- ...03-Fix-build-issues-due-to-gflag-and-zlib.patch | 40 --- .../recipes-support/opencv/files/fix-build.patch | 128 ++++++++ 4 files changed, 128 insertions(+), 584 deletions(-) delete mode 100644 dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Use-system-installed-dependencies.patch delete mode 100644 dynamic-layers/openembedded-layer/recipes-support/opencv/files/0002-Fix-installation-of-binaries-and-libraries.patch delete mode 100644 dynamic-layers/openembedded-layer/recipes-support/opencv/files/0003-Fix-build-issues-due-to-gflag-and-zlib.patch create mode 100644 dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build.patch (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/files') diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Use-system-installed-dependencies.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Use-system-installed-dependencies.patch deleted file mode 100644 index 2dde9880..00000000 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0001-Use-system-installed-dependencies.patch +++ /dev/null @@ -1,196 +0,0 @@ -From 86fc5a725883cf59086c319fca29ddb3e47fa7de Mon Sep 17 00:00:00 2001 -From: Anuj Mittal -Date: Thu, 7 Apr 2022 21:39:26 +0800 -Subject: [PATCH 1/2] Use system installed dependencies - -Use the system versions of libva, ade and zlib. - -Upstream-Status: Inappropriate -Signed-off-by: Anuj Mittal ---- - cmake/dependencies.cmake | 20 -------------------- - cmake/extra_modules.cmake | 4 ++-- - src/plugins/intel_gpu/include/va/va.h | 6 ------ - tests/fuzz/src/CMakeLists.txt | 3 +-- - thirdparty/CMakeLists.txt | 25 +++++++++++-------------- - thirdparty/cnpy/CMakeLists.txt | 2 +- - 6 files changed, 15 insertions(+), 45 deletions(-) - delete mode 100644 src/plugins/intel_gpu/include/va/va.h - -diff --git a/cmake/dependencies.cmake b/cmake/dependencies.cmake -index 8d66a012b8..75db89b915 100644 ---- a/cmake/dependencies.cmake -+++ b/cmake/dependencies.cmake -@@ -27,26 +27,6 @@ get_linux_name(LINUX_OS_NAME) - - if(CMAKE_CROSSCOMPILING AND CMAKE_HOST_SYSTEM_NAME MATCHES Linux AND CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*") - set(protoc_version "3.18.2") -- -- RESOLVE_DEPENDENCY(SYSTEM_PROTOC_ROOT -- ARCHIVE_LIN "protoc-${protoc_version}-linux-x86_64.tar.gz" -- TARGET_PATH "${TEMP}/protoc-${protoc_version}-linux-x86_64" -- SHA256 "42fde2b6044c1f74c7e86d4e03b43aac87128ddf57ac6ed8c4eab7a1e21bbf21" -- ) -- debug_message(STATUS "host protoc-${protoc_version} root path = " ${SYSTEM_PROTOC_ROOT}) -- -- reset_deps_cache(SYSTEM_PROTOC) -- -- find_host_program( -- SYSTEM_PROTOC -- NAMES protoc -- PATHS "${SYSTEM_PROTOC_ROOT}/bin" -- NO_DEFAULT_PATH) -- if(NOT SYSTEM_PROTOC) -- message(FATAL_ERROR "[ONNX IMPORTER] Missing host protoc binary") -- endif() -- -- update_deps_cache(SYSTEM_PROTOC "${SYSTEM_PROTOC}" "Path to host protoc for ONNX Importer") - endif() - - if(ENABLE_INTEL_MYRIAD) -diff --git a/cmake/extra_modules.cmake b/cmake/extra_modules.cmake -index 72eed6ad3a..39e9674a11 100644 ---- a/cmake/extra_modules.cmake -+++ b/cmake/extra_modules.cmake -@@ -22,7 +22,7 @@ function(ie_generate_dev_package_config) - configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineDeveloperPackageConfig.cmake.in" - "${CMAKE_BINARY_DIR}/InferenceEngineDeveloperPackageConfig.cmake" - INSTALL_DESTINATION share # not used -- PATH_VARS "OpenVINO_SOURCE_DIR;gflags_BINARY_DIR" -+ PATH_VARS "OpenVINO_SOURCE_DIR" - NO_CHECK_REQUIRED_COMPONENTS_MACRO) - - configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/InferenceEngineConfig-version.cmake.in" -@@ -53,7 +53,7 @@ function(ov_generate_dev_package_config) - configure_package_config_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINODeveloperPackageConfig.cmake.in" - "${CMAKE_BINARY_DIR}/OpenVINODeveloperPackageConfig.cmake" - INSTALL_DESTINATION share # not used -- PATH_VARS "OpenVINO_SOURCE_DIR;gflags_BINARY_DIR" -+ PATH_VARS "OpenVINO_SOURCE_DIR" - NO_CHECK_REQUIRED_COMPONENTS_MACRO) - - configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINOConfig-version.cmake.in" -diff --git a/src/plugins/intel_gpu/include/va/va.h b/src/plugins/intel_gpu/include/va/va.h -deleted file mode 100644 -index 5c8a5c6f6e..0000000000 ---- a/src/plugins/intel_gpu/include/va/va.h -+++ /dev/null -@@ -1,6 +0,0 @@ --// Copyright (C) 2018-2022 Intel Corporation --// SPDX-License-Identifier: Apache-2.0 --// -- --typedef cl_uint VASurfaceID; --typedef void* VADisplay; -diff --git a/tests/fuzz/src/CMakeLists.txt b/tests/fuzz/src/CMakeLists.txt -index 5e6b7b168e..a81c51bb77 100644 ---- a/tests/fuzz/src/CMakeLists.txt -+++ b/tests/fuzz/src/CMakeLists.txt -@@ -10,14 +10,13 @@ add_custom_target(fuzz) - FILE(GLOB tests "*-fuzzer.cc") - - add_subdirectory(../../../thirdparty/cnpy ${CMAKE_CURRENT_BINARY_DIR}/cnpy) --add_subdirectory(../../../thirdparty/zlib ${CMAKE_CURRENT_BINARY_DIR}/zlib) - - foreach(test_source ${tests}) - get_filename_component(test_name ${test_source} NAME_WE) - add_fuzzer(${test_name} ${test_source}) - - target_link_libraries(${test_name} PRIVATE -- openvino::runtime cnpy zlib) -+ openvino::runtime cnpy z) - - add_dependencies(fuzz ${test_name}) - -diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt -index 38b0a5439d..4cba1588fe 100644 ---- a/thirdparty/CMakeLists.txt -+++ b/thirdparty/CMakeLists.txt -@@ -14,7 +14,7 @@ add_subdirectory(ittapi) - add_subdirectory(itt_collector EXCLUDE_FROM_ALL) - add_subdirectory(cnpy EXCLUDE_FROM_ALL) - if(ENABLE_INTEL_GPU) -- add_subdirectory(ocl) -+ #add_subdirectory(ocl) - endif() - - add_subdirectory(xbyak EXCLUDE_FROM_ALL) -@@ -72,12 +72,11 @@ endif() - add_library(ocv_hal INTERFACE) - target_include_directories(ocv_hal INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/ocv") - --add_subdirectory(ade EXCLUDE_FROM_ALL) - add_subdirectory(fluid/modules/gapi EXCLUDE_FROM_ALL) --set_target_properties(ade fluid PROPERTIES FOLDER thirdparty) --openvino_developer_export_targets(COMPONENT openvino_common TARGETS ade fluid) -+set_target_properties(fluid PROPERTIES FOLDER thirdparty) -+openvino_developer_export_targets(COMPONENT openvino_common TARGETS fluid) -+ - --ov_install_static_lib(ade openvino_common) - ov_install_static_lib(fluid openvino_common) - - # -@@ -93,8 +92,6 @@ if(gflags_FOUND) - set_target_properties(gflags PROPERTIES IMPORTED_GLOBAL ON) - message(STATUS "gflags (${gflags_VERSION}) is found at ${gflags_DIR}") - else() -- add_subdirectory(gflags EXCLUDE_FROM_ALL) -- openvino_developer_export_targets(COMPONENT openvino_common TARGETS gflags) - endif() - - # -@@ -119,13 +116,13 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND - set(Protobuf_DEBUG ON) - endif() - find_package(Protobuf 3.18.2 REQUIRED) -- set(Protobuf_LITE_LIBRARIES protobuf::libprotobuf-lite) -- set(Protobuf_LIBRARIES protobuf::libprotobuf) -- set(SYSTEM_PROTOC protobuf::protoc) -+ set(Protobuf_LITE_LIBRARIES protobuf::libprotobuf-lite) -+ set(Protobuf_LIBRARIES protobuf::libprotobuf) -+ #set(SYSTEM_PROTOC protobuf::protoc) - set(PROTOC_EXECUTABLE ${SYSTEM_PROTOC}) - - foreach(target ${SYSTEM_PROTOC} ${Protobuf_LIBRARIES} ${Protobuf_LITE_LIBRARIES}) -- set_property(TARGET ${target} PROPERTY IMPORTED_GLOBAL TRUE) -+ #set_property(TARGET ${target} PROPERTY IMPORTED_GLOBAL TRUE) - endforeach() - else() - add_subdirectory(protobuf EXCLUDE_FROM_ALL) -@@ -134,8 +131,8 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND - # forward variables used in the other places - set(SYSTEM_PROTOC ${SYSTEM_PROTOC} PARENT_SCOPE) - set(PROTOC_EXECUTABLE ${PROTOC_EXECUTABLE} PARENT_SCOPE) -- set(Protobuf_LIBRARIES ${Protobuf_LIBRARIES} PARENT_SCOPE) -- set(Protobuf_LITE_LIBRARIES ${Protobuf_LITE_LIBRARIES} PARENT_SCOPE) -+ set(Protobuf_LIBRARIES ${Protobuf_LIBRARY} PARENT_SCOPE) -+ set(Protobuf_LITE_LIBRARIES ${Protobuf_LITE_LIBRARY} PARENT_SCOPE) - set(Protobuf_INCLUDE_DIRS ${Protobuf_INCLUDE_DIRS} PARENT_SCOPE) - set(Protobuf_IN_FRONTEND ON PARENT_SCOPE) - -@@ -146,7 +143,7 @@ if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND - set(link_type INTERFACE) - endif() - if(CMAKE_COMPILER_IS_GNUCXX OR OV_COMPILER_IS_CLANG) -- target_compile_options(${target} ${link_type} -Wno-undef) -+ #target_compile_options(${target} ${link_type} -Wno-undef) - endif() - endforeach() - endif() -diff --git a/thirdparty/cnpy/CMakeLists.txt b/thirdparty/cnpy/CMakeLists.txt -index 556adb03c4..793de9845c 100644 ---- a/thirdparty/cnpy/CMakeLists.txt -+++ b/thirdparty/cnpy/CMakeLists.txt -@@ -13,7 +13,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$") - PRIVATE -Wno-all) - endif() - --target_link_libraries(${TARGET_NAME} PUBLIC zlib::zlib) -+target_link_libraries(${TARGET_NAME} PUBLIC z) - target_include_directories(${TARGET_NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") - - set_target_properties(${TARGET_NAME} PROPERTIES FOLDER thirdparty) --- -2.37.3 - diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0002-Fix-installation-of-binaries-and-libraries.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0002-Fix-installation-of-binaries-and-libraries.patch deleted file mode 100644 index 12c8054e..00000000 --- a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/0002-Fix-installation-of-binaries-and-libraries.patch +++ /dev/null @@ -1,348 +0,0 @@ -From 3d55027cd86db299faeed0a4a97ddcec1baedd61 Mon Sep 17 00:00:00 2001 -From: Anuj Mittal -Date: Mon, 11 Apr 2022 11:11:23 +0800 -Subject: [PATCH 2/2] Fix installation of binaries and libraries - -Make sure binaries are installed correctly. - -Upstream-Status: Inappropriate - -Signed-off-by: Anuj Mittal ---- - CMakeLists.txt | 2 +- - cmake/developer_package/frontends/frontends.cmake | 2 +- - cmake/developer_package/packaging.cmake | 4 ++-- - cmake/developer_package/plugins/plugins.cmake | 2 +- - docs/CMakeLists.txt | 3 ++- - samples/CMakeLists.txt | 2 +- - samples/c/common/opencv_c_wrapper/CMakeLists.txt | 2 ++ - samples/cpp/CMakeLists.txt | 2 ++ - scripts/CMakeLists.txt | 10 +++++----- - src/bindings/c/src/CMakeLists.txt | 4 ++-- - src/cmake/openvino.cmake | 12 ++++++------ - src/common/preprocessing/CMakeLists.txt | 2 +- - src/core/CMakeLists.txt | 4 ++-- - src/inference/CMakeLists.txt | 2 +- - .../intel_gpu/src/kernel_selector/CMakeLists.txt | 2 +- - src/plugins/intel_myriad/myriad_dependencies.cmake | 2 +- - .../intel_myriad/myriad_plugin/CMakeLists.txt | 2 +- - tools/CMakeLists.txt | 2 +- - tools/compile_tool/CMakeLists.txt | 8 ++++---- - 19 files changed, 37 insertions(+), 32 deletions(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index f570d4246c..d20ac60749 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -111,7 +111,7 @@ include(cmake/extra_modules.cmake) - add_subdirectory(docs) - add_subdirectory(tools) - add_subdirectory(scripts) --add_subdirectory(licensing) -+#add_subdirectory(licensing) - - # - # CPack -diff --git a/cmake/developer_package/frontends/frontends.cmake b/cmake/developer_package/frontends/frontends.cmake -index 0779ed286d..f80cb9bb79 100644 ---- a/cmake/developer_package/frontends/frontends.cmake -+++ b/cmake/developer_package/frontends/frontends.cmake -@@ -2,7 +2,7 @@ - # SPDX-License-Identifier: Apache-2.0 - # - --set(FRONTEND_INSTALL_INCLUDE "runtime/include/") -+set(FRONTEND_INSTALL_INCLUDE "include/") - set(FRONTEND_NAME_PREFIX "openvino_") - set(FRONTEND_NAME_SUFFIX "_frontend") - -diff --git a/cmake/developer_package/packaging.cmake b/cmake/developer_package/packaging.cmake -index 458ddade93..626eb6548a 100644 ---- a/cmake/developer_package/packaging.cmake -+++ b/cmake/developer_package/packaging.cmake -@@ -20,8 +20,8 @@ function(ie_cpack_set_library_dir) - set(IE_CPACK_RUNTIME_PATH runtime/lib/${ARCH_FOLDER}/$ PARENT_SCOPE) - set(IE_CPACK_ARCHIVE_PATH runtime/lib/${ARCH_FOLDER}/$ PARENT_SCOPE) - else() -- set(IE_CPACK_LIBRARY_PATH runtime/lib/${ARCH_FOLDER} PARENT_SCOPE) -- set(IE_CPACK_RUNTIME_PATH runtime/lib/${ARCH_FOLDER} PARENT_SCOPE) -+ set(IE_CPACK_LIBRARY_PATH ${CMAKE_INSTALL_LIBDIR} PARENT_SCOPE) -+ set(IE_CPACK_RUNTIME_PATH ${CMAKE_INSTALL_BINDIR} PARENT_SCOPE) - set(IE_CPACK_ARCHIVE_PATH runtime/lib/${ARCH_FOLDER} PARENT_SCOPE) - endif() - endfunction() -diff --git a/cmake/developer_package/plugins/plugins.cmake b/cmake/developer_package/plugins/plugins.cmake -index b748ebddef..fe670e88bc 100644 ---- a/cmake/developer_package/plugins/plugins.cmake -+++ b/cmake/developer_package/plugins/plugins.cmake -@@ -139,7 +139,7 @@ function(ie_add_plugin) - - if(BUILD_SHARED_LIBS) - install(TARGETS ${IE_PLUGIN_NAME} -- LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH} -+ LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} - COMPONENT ${install_component}) - else() - ov_install_static_lib(${IE_PLUGIN_NAME} ${install_component}) -diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt -index 86b0e8652b..4f31d3cc4b 100644 ---- a/docs/CMakeLists.txt -+++ b/docs/CMakeLists.txt -@@ -36,9 +36,10 @@ if(NOT ENABLE_DOCKER) - foreach(target openvino_template_plugin template_extension openvino_template_extension) - if(TARGET ${target}) - install(TARGETS ${target} -- LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH} -+ LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH} - COMPONENT tests - EXCLUDE_FROM_ALL) -+ install(TARGETS ${target} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) - endif() - endforeach() - endif() -diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt -index 8101b5e328..6abe8c20ce 100644 ---- a/samples/CMakeLists.txt -+++ b/samples/CMakeLists.txt -@@ -9,7 +9,7 @@ add_subdirectory(c) - if(TARGET format_reader) - install(TARGETS format_reader - RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT tests EXCLUDE_FROM_ALL -- LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT tests EXCLUDE_FROM_ALL) -+ LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT tests) - endif() - - openvino_developer_export_targets(COMPONENT openvino_common TARGETS format_reader ie_samples_utils) -diff --git a/samples/c/common/opencv_c_wrapper/CMakeLists.txt b/samples/c/common/opencv_c_wrapper/CMakeLists.txt -index 2755579a0f..4a5f5b424f 100644 ---- a/samples/c/common/opencv_c_wrapper/CMakeLists.txt -+++ b/samples/c/common/opencv_c_wrapper/CMakeLists.txt -@@ -34,3 +34,5 @@ install( - RUNTIME DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL - LIBRARY DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL - ) -+ -+install(TARGETS ${TARGET_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR}) -diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt -index 3628c8283a..186540940f 100644 ---- a/samples/cpp/CMakeLists.txt -+++ b/samples/cpp/CMakeLists.txt -@@ -258,6 +258,8 @@ macro(ie_add_sample) - COMPONENT samples_bin - EXCLUDE_FROM_ALL) - -+ install(TARGETS ${IE_SAMPLE_NAME} DESTINATION bin) -+ - # create global target with all samples / demo apps - if(NOT TARGET ie_samples) - add_custom_target(ie_samples ALL) -diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt -index 4e9f76638f..6d8df5f0a1 100644 ---- a/scripts/CMakeLists.txt -+++ b/scripts/CMakeLists.txt -@@ -37,7 +37,7 @@ ie_shellcheck_process(DIRECTORY "${OpenVINO_SOURCE_DIR}" - - # install setupvars - --ie_cpack_add_component(setupvars REQUIRED) -+#ie_cpack_add_component(setupvars REQUIRED) - - if(UNIX) - set(_setupvars_file setupvars/setupvars.sh) -@@ -54,13 +54,13 @@ elseif(WIN32) - file(WRITE "${_setupvars_file}" "${_setupvars_content}") - endif() - endif() --install(PROGRAMS "${_setupvars_file}" -- DESTINATION . -- COMPONENT setupvars) -+#install(PROGRAMS "${_setupvars_file}" -+# DESTINATION . -+# COMPONENT setupvars) - - # install install_dependencies - --if(LINUX) -+if (FALSE) - ie_cpack_add_component(install_dependencies REQUIRED) - install(DIRECTORY install_dependencies/ - DESTINATION install_dependencies -diff --git a/src/bindings/c/src/CMakeLists.txt b/src/bindings/c/src/CMakeLists.txt -index 9200d0bda1..b3636e0716 100644 ---- a/src/bindings/c/src/CMakeLists.txt -+++ b/src/bindings/c/src/CMakeLists.txt -@@ -43,8 +43,8 @@ install(TARGETS ${TARGET_NAME} EXPORT OpenVINOTargets - RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core_c - ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT core_c - LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core_c -- INCLUDES DESTINATION runtime/include/ie) -+ INCLUDES DESTINATION include/ie) - - install(DIRECTORY ${InferenceEngine_C_API_SOURCE_DIR}/include/ -- DESTINATION runtime/include/ie -+ DESTINATION include/ie - COMPONENT core_c_dev) -diff --git a/src/cmake/openvino.cmake b/src/cmake/openvino.cmake -index 340896e3a8..9bda84fe51 100644 ---- a/src/cmake/openvino.cmake -+++ b/src/cmake/openvino.cmake -@@ -62,8 +62,8 @@ install(TARGETS ${TARGET_NAME} EXPORT OpenVINOTargets - RUNTIME DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core - ARCHIVE DESTINATION ${IE_CPACK_ARCHIVE_PATH} COMPONENT core - LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core -- INCLUDES DESTINATION runtime/include -- runtime/include/ie) -+ INCLUDES DESTINATION include -+ include/ie) - - # - # Add openvin::dev target -@@ -107,7 +107,7 @@ ie_cpack_add_component(core_dev REQUIRED DEPENDS core ${core_dev_components}) - - if(BUILD_SHARED_LIBS) - install(FILES $/plugins.xml -- DESTINATION ${IE_CPACK_RUNTIME_PATH} -+ DESTINATION ${IE_CPACK_LIBRARY_PATH} - COMPONENT core) - - # for InferenceEngineUnitTest -@@ -126,7 +126,7 @@ endif() - install(EXPORT OpenVINOTargets - FILE OpenVINOTargets.cmake - NAMESPACE openvino:: -- DESTINATION runtime/cmake -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenVINO - COMPONENT core_dev) - - set(PUBLIC_HEADERS_DIR "${OpenVINO_SOURCE_DIR}/src/inference/include") -@@ -167,10 +167,10 @@ configure_file("${OpenVINO_SOURCE_DIR}/cmake/templates/OpenVINOConfig-version.cm - - install(FILES "${CMAKE_BINARY_DIR}/share/InferenceEngineConfig.cmake" - "${CMAKE_BINARY_DIR}/InferenceEngineConfig-version.cmake" -- DESTINATION runtime/cmake -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/InferenceEngine - COMPONENT core_dev) - - install(FILES "${CMAKE_BINARY_DIR}/share/OpenVINOConfig.cmake" - "${CMAKE_BINARY_DIR}/OpenVINOConfig-version.cmake" -- DESTINATION runtime/cmake -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/OpenVINO - COMPONENT core_dev) -diff --git a/src/common/preprocessing/CMakeLists.txt b/src/common/preprocessing/CMakeLists.txt -index e41e286c95..11aaffca6a 100644 ---- a/src/common/preprocessing/CMakeLists.txt -+++ b/src/common/preprocessing/CMakeLists.txt -@@ -202,7 +202,7 @@ openvino_developer_export_targets(COMPONENT core TARGETS ${TARGET_NAME}) - - if(BUILD_SHARED_LIBS) - install(TARGETS ${TARGET_NAME} -- LIBRARY DESTINATION ${IE_CPACK_RUNTIME_PATH} COMPONENT core) -+ LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT core) - else() - ov_install_static_lib(${TARGET_NAME} core) - endif() -diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt -index 86b195ee1c..867121ee50 100644 ---- a/src/core/CMakeLists.txt -+++ b/src/core/CMakeLists.txt -@@ -127,7 +127,7 @@ target_include_directories(ngraph INTERFACE $ -Date: Fri, 30 Sep 2022 20:26:04 +0800 -Subject: [PATCH] Fix build issues due to gflag and zlib - -Change gflag to shared as we are not building with static library. -We are using zlib from host, so don't add zlib as third party package - -Upstream-Status: Inappropriate - -Signed-off-by: Yogesh Tyagi ---- - thirdparty/CMakeLists.txt | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt -index 4cba1588fe..f82bf3148b 100644 ---- a/thirdparty/CMakeLists.txt -+++ b/thirdparty/CMakeLists.txt -@@ -39,7 +39,7 @@ if(NOT CMAKE_CROSSCOMPILING) - endif() - - if(NOT zlib_FOUND) -- add_subdirectory(zlib EXCLUDE_FROM_ALL) -+ #add_subdirectory(zlib EXCLUDE_FROM_ALL) - endif() - - # -@@ -85,7 +85,7 @@ ov_install_static_lib(fluid openvino_common) - - if(NOT APPLE) - # on Apple only dynamic libraries are available -- find_package(gflags QUIET COMPONENTS nothreads_static) -+ find_package(gflags QUIET COMPONENTS nothreads_shared) - endif() - - if(gflags_FOUND) --- -2.37.3 - diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build.patch new file mode 100644 index 00000000..07a29fe7 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build.patch @@ -0,0 +1,128 @@ +Yocto specific tweaks to the build process: + +* Install python modules to site-packages. +* Dont try to detect glibc version as that doesn't work when cross compiling. +* Use shared protobuf and gflags libs. +* Use system installed ocl headers. +* We have va.h in recipe-sysroot and having a va.h here leads to failures. +* Install sample binaries as well. + +Upstream-Status: Inappropriate +Signed-off-by: Anuj Mittal + +diff --git a/cmake/developer_package/packaging/debian/debian.cmake b/cmake/developer_package/packaging/debian/debian.cmake +index 735160b469..26f51229e2 100644 +--- a/cmake/developer_package/packaging/debian/debian.cmake ++++ b/cmake/developer_package/packaging/debian/debian.cmake +@@ -31,7 +31,11 @@ macro(ov_debian_cpack_set_dirs) + set(OV_CPACK_NGRAPH_CMAKEDIR ${OV_CPACK_RUNTIMEDIR}/cmake/ngraph${OpenVINO_VERSION}) + set(OV_CPACK_OPENVINO_CMAKEDIR ${OV_CPACK_RUNTIMEDIR}/cmake/openvino${OpenVINO_VERSION}) + set(OV_CPACK_DOCDIR ${CMAKE_INSTALL_DATADIR}/doc/openvino-${OpenVINO_VERSION}) +- set(OV_CPACK_PYTHONDIR lib/python3/dist-packages) ++ ++ ov_get_pyversion(pyversion) ++ if(pyversion) ++ set(OV_CPACK_PYTHONDIR lib/${pyversion}/site-packages) ++ endif() + + # non-native stuff + set(OV_CPACK_SHAREDIR ${CMAKE_INSTALL_DATADIR}/openvino) # internal +diff --git a/cmake/developer_package/target_flags.cmake b/cmake/developer_package/target_flags.cmake +index 62831fffab..b123bbad75 100644 +--- a/cmake/developer_package/target_flags.cmake ++++ b/cmake/developer_package/target_flags.cmake +@@ -123,4 +123,4 @@ function(ov_glibc_version) + endif() + endfunction() + +-ov_glibc_version() ++#ov_glibc_version() +diff --git a/samples/c/common/opencv_c_wrapper/CMakeLists.txt b/samples/c/common/opencv_c_wrapper/CMakeLists.txt +index f27e934793..da51c56cf3 100644 +--- a/samples/c/common/opencv_c_wrapper/CMakeLists.txt ++++ b/samples/c/common/opencv_c_wrapper/CMakeLists.txt +@@ -32,5 +32,4 @@ endif() + install( + TARGETS ${TARGET_NAME} + RUNTIME DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL +- LIBRARY DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL +-) ++ LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT samples_bin) +diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt +index 3a10819c47..d82262a714 100644 +--- a/samples/cpp/CMakeLists.txt ++++ b/samples/cpp/CMakeLists.txt +@@ -230,9 +230,8 @@ macro(ie_add_sample) + target_link_libraries(${IE_SAMPLE_NAME} PRIVATE ${ov_link_libraries} Threads::Threads ${IE_SAMPLE_DEPENDENCIES}) + + install(TARGETS ${IE_SAMPLE_NAME} +- RUNTIME DESTINATION samples_bin/ +- COMPONENT samples_bin +- EXCLUDE_FROM_ALL) ++ DESTINATION ${CMAKE_INSTALL_BINDIR} ++ COMPONENT samples_bin) + + # create global target with all samples / demo apps + if(NOT TARGET ie_samples) +diff --git a/samples/cpp/common/format_reader/CMakeLists.txt b/samples/cpp/common/format_reader/CMakeLists.txt +index 44d94e8a27..208edd8e4e 100644 +--- a/samples/cpp/common/format_reader/CMakeLists.txt ++++ b/samples/cpp/common/format_reader/CMakeLists.txt +@@ -44,5 +44,5 @@ endif() + install( + TARGETS ${TARGET_NAME} + RUNTIME DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL +- LIBRARY DESTINATION samples_bin/ COMPONENT samples_bin EXCLUDE_FROM_ALL ++ LIBRARY DESTINATION ${IE_CPACK_LIBRARY_PATH} COMPONENT samples_bin + ) +diff --git a/src/plugins/intel_gpu/include/va/va.h b/src/plugins/intel_gpu/include/va/va.h +deleted file mode 100644 +index 5c8a5c6f6e..0000000000 +--- a/src/plugins/intel_gpu/include/va/va.h ++++ /dev/null +@@ -1,6 +0,0 @@ +-// Copyright (C) 2018-2022 Intel Corporation +-// SPDX-License-Identifier: Apache-2.0 +-// +- +-typedef cl_uint VASurfaceID; +-typedef void* VADisplay; +diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt +index 98067991a7..bb19b592ee 100644 +--- a/thirdparty/CMakeLists.txt ++++ b/thirdparty/CMakeLists.txt +@@ -20,7 +20,7 @@ if(ENABLE_SAMPLES OR ENABLE_TESTS) + endif() + + if(ENABLE_INTEL_GPU) +- add_subdirectory(ocl) ++ #add_subdirectory(ocl) + endif() + + add_subdirectory(xbyak EXCLUDE_FROM_ALL) +@@ -187,11 +187,11 @@ endif() + + if(ENABLE_SAMPLES OR ENABLE_COMPILE_TOOL OR ENABLE_TESTS) + if(LINUX) +- if(OV_OS_RHEL) +- set(gflag_component nothreads_shared) +- elseif(OV_OS_DEBIAN) +- set(gflag_component nothreads_static) +- endif() ++ #if(OV_OS_RHEL) ++ set(gflag_component nothreads_shared) ++ #elseif(OV_OS_DEBIAN) ++ #set(gflag_component nothreads_static) ++ #endif() + find_package(gflags QUIET OPTIONAL_COMPONENTS ${gflag_component}) + endif() + +@@ -248,7 +248,7 @@ endif() + + if(ENABLE_OV_PADDLE_FRONTEND OR ENABLE_OV_ONNX_FRONTEND OR ENABLE_OV_TF_FRONTEND) + if(ENABLE_SYSTEM_PROTOBUF) +- set(Protobuf_USE_STATIC_LIBS ON) ++ #set(Protobuf_USE_STATIC_LIBS ON) + if(CMAKE_VERBOSE_MAKEFILE) + set(Protobuf_DEBUG ON) + endif() -- cgit v1.2.3-54-g00ecf