From 8220eccbbf5d2f9fed579726091e4ecaca3fef9f Mon Sep 17 00:00:00 2001 From: Anuj Mittal Date: Tue, 30 May 2023 09:47:54 +0800 Subject: openvino-inference-engine: fix build with gcc13 Fix various issues when compiling with gcc13. Signed-off-by: Anuj Mittal --- .../7cecc9138b89e1946e3e515727bb69b2ab119806.patch | 32 ++++++ .../opencv/files/fix-build-with-gcc13.patch | 120 +++++++++++++++++++++ .../opencv/files/onednn-fix-build-with-gcc13.patch | 17 +++ 3 files changed, 169 insertions(+) create mode 100644 dynamic-layers/openembedded-layer/recipes-support/opencv/files/7cecc9138b89e1946e3e515727bb69b2ab119806.patch create mode 100644 dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build-with-gcc13.patch create mode 100644 dynamic-layers/openembedded-layer/recipes-support/opencv/files/onednn-fix-build-with-gcc13.patch (limited to 'dynamic-layers/openembedded-layer/recipes-support/opencv/files') diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/7cecc9138b89e1946e3e515727bb69b2ab119806.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/7cecc9138b89e1946e3e515727bb69b2ab119806.patch new file mode 100644 index 00000000..f744bd19 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/7cecc9138b89e1946e3e515727bb69b2ab119806.patch @@ -0,0 +1,32 @@ +From 7cecc9138b89e1946e3e515727bb69b2ab119806 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Thu, 26 May 2022 07:11:37 +0100 +Subject: [PATCH] add missing header inclusion (gcc-13 support) + +Without the change ade build fails on this week's gcc-13 snapshot as: + + [ 77%] Building CXX object sources/ade/CMakeFiles/ade.dir/source/topological_sort.cpp.o + In file included from ade/sources/ade/include/ade/passes/topological_sort.hpp:17, + from ade/sources/ade/source/topological_sort.cpp:7: + ade/sources/ade/include/ade/typed_graph.hpp:101:10: error: 'uintptr_t' in namespace 'std' does not name a type + 101 | std::uintptr_t m_srcGraph; + | ^~~~~~~~~ + +Upstream-Status: Backport +Signed-off-by: Anuj Mittal +--- + sources/ade/include/ade/typed_graph.hpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/sources/ade/include/ade/typed_graph.hpp b/sources/ade/include/ade/typed_graph.hpp +index d9676e6..8a27578 100644 +--- a/sources/ade/include/ade/typed_graph.hpp ++++ b/sources/ade/include/ade/typed_graph.hpp +@@ -9,6 +9,7 @@ + #ifndef ADE_TYPED_GRAPH_HPP + #define ADE_TYPED_GRAPH_HPP + ++#include + #include + #include + diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build-with-gcc13.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build-with-gcc13.patch new file mode 100644 index 00000000..7089bc9c --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/fix-build-with-gcc13.patch @@ -0,0 +1,120 @@ +From aac55921864fa91fe8e394a25fc565f28ae5fc64 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal +Date: Tue, 30 May 2023 09:31:09 +0800 +Subject: [PATCH] fix build with gcc13 + +* Include the headers as per: +https://gcc.gnu.org/gcc-13/porting_to.html + +* Remove -Werror for: +|git/src/plugins/intel_gpu/src/kernel_selector/jitter.h:129:28: error: 'virtual kernel_selector::JitDefinitions kernel_selector::JitConstant::GetDefinitions() const' was hidden [-Werror=overloaded-virtual=] +| 129 | virtual JitDefinitions GetDefinitions() const = 0; +| | ^~~~~~~~~~~~~~ + +* Fix: +| /data/poky/build/tmp/work/x86-64-v3-poky-linux/openvino-inference-engine/2022.3.0-r0/git/src/inference/include/ie/ie_precision.hpp: In member function 'bool InferenceEngine::Precision::operator==(const InferenceEngine::Precision&) const': +| /data/poky/build/tmp/work/x86-64-v3-poky-linux/openvino-inference-engine/2022.3.0-r0/git/src/inference/include/ie/ie_precision.hpp:153:36: error: ambiguous overload for 'operator==' (operand types are 'const InferenceEngine::Precision::ePrecision' and 'const InferenceEngine::Precision') +| 153 | return precisionInfo.value == p && precisionInfo.bitsSize == p.precisionInfo.bitsSize && +| | ~~~~~~~~~~~~~~~~~~~ ^~ ~ +| | | | +| | | const InferenceEngine::Precision +| | const InferenceEngine::Precision::ePrecision +| /data/poky/build/tmp/work/x86-64-v3-poky-linux/openvino-inference-engine/2022.3.0-r0/git/src/inference/include/ie/ie_precision.hpp:152:10: note: candidate: 'bool InferenceEngine::Precision::operator==(const InferenceEngine::Precision&) const' (reversed) +| 152 | bool operator==(const Precision& p) const noexcept { +| | ^~~~~~~~ +| /data/poky/build/tmp/work/x86-64-v3-poky-linux/openvino-inference-engine/2022.3.0-r0/git/src/inference/include/ie/ie_precision.hpp:153:36: note: candidate: 'operator==(InferenceEngine::Precision::ePrecision, InferenceEngine::Precision::ePrecision)' (built-in) +| 153 | return precisionInfo.value == p && precisionInfo.bitsSize == p.precisionInfo.bitsSize && +| | ~~~~~~~~~~~~~~~~~~~~^~~~ + +Upstream-Status: Pending +Signed-off-by: Anuj Mittal +--- + src/common/itt/include/openvino/itt.hpp | 1 + + src/common/preprocessing/ie_preprocess_gapi_kernels.hpp | 1 + + src/common/util/include/openvino/util/file_util.hpp | 1 + + src/inference/include/ie/ie_precision.hpp | 2 +- + src/plugins/intel_gpu/CMakeLists.txt | 6 +++--- + .../intel_gpu/include/intel_gpu/runtime/device_info.hpp | 1 + + 6 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/src/common/itt/include/openvino/itt.hpp b/src/common/itt/include/openvino/itt.hpp +index c978ca1b138..f01d59a652a 100644 +--- a/src/common/itt/include/openvino/itt.hpp ++++ b/src/common/itt/include/openvino/itt.hpp +@@ -8,6 +8,7 @@ + */ + + #pragma once ++#include + #include + #include + #include +diff --git a/src/common/preprocessing/ie_preprocess_gapi_kernels.hpp b/src/common/preprocessing/ie_preprocess_gapi_kernels.hpp +index dfbb182b7a0..0887cc60e34 100644 +--- a/src/common/preprocessing/ie_preprocess_gapi_kernels.hpp ++++ b/src/common/preprocessing/ie_preprocess_gapi_kernels.hpp +@@ -8,6 +8,7 @@ + # error non standalone GAPI + # endif + ++#include + #include + + #include +diff --git a/src/common/util/include/openvino/util/file_util.hpp b/src/common/util/include/openvino/util/file_util.hpp +index d2f2e00ff60..88e641526ab 100644 +--- a/src/common/util/include/openvino/util/file_util.hpp ++++ b/src/common/util/include/openvino/util/file_util.hpp +@@ -4,6 +4,7 @@ + + #pragma once + ++#include + #include + #include + #include +diff --git a/src/inference/include/ie/ie_precision.hpp b/src/inference/include/ie/ie_precision.hpp +index 48bdd945b13..96c29b73159 100644 +--- a/src/inference/include/ie/ie_precision.hpp ++++ b/src/inference/include/ie/ie_precision.hpp +@@ -149,7 +149,7 @@ public: + * @return `true` if values represent the same precisions, `false` otherwise + */ + bool operator==(const Precision& p) const noexcept { +- return precisionInfo.value == p && precisionInfo.bitsSize == p.precisionInfo.bitsSize && ++ return precisionInfo.value == p.precisionInfo.value && precisionInfo.bitsSize == p.precisionInfo.bitsSize && + areSameStrings(precisionInfo.name, p.precisionInfo.name); + } + +diff --git a/src/plugins/intel_gpu/CMakeLists.txt b/src/plugins/intel_gpu/CMakeLists.txt +index ab4d7618c30..4c93024eb3c 100644 +--- a/src/plugins/intel_gpu/CMakeLists.txt ++++ b/src/plugins/intel_gpu/CMakeLists.txt +@@ -34,9 +34,9 @@ set(INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include") + + add_subdirectory(thirdparty) + +-if(CMAKE_COMPILER_IS_GNUCXX) +- ie_add_compiler_flags(-Werror) +-endif() ++#if(CMAKE_COMPILER_IS_GNUCXX) ++# ie_add_compiler_flags(-Werror) ++#endif() + + add_subdirectory(src/runtime) + add_subdirectory(src/kernel_selector) +diff --git a/src/plugins/intel_gpu/include/intel_gpu/runtime/device_info.hpp b/src/plugins/intel_gpu/include/intel_gpu/runtime/device_info.hpp +index 0c5a7177d30..7119417185c 100644 +--- a/src/plugins/intel_gpu/include/intel_gpu/runtime/device_info.hpp ++++ b/src/plugins/intel_gpu/include/intel_gpu/runtime/device_info.hpp +@@ -4,6 +4,7 @@ + + #pragma once + ++#include + #include + #include + #include +-- +2.37.3 + diff --git a/dynamic-layers/openembedded-layer/recipes-support/opencv/files/onednn-fix-build-with-gcc13.patch b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/onednn-fix-build-with-gcc13.patch new file mode 100644 index 00000000..3063dc93 --- /dev/null +++ b/dynamic-layers/openembedded-layer/recipes-support/opencv/files/onednn-fix-build-with-gcc13.patch @@ -0,0 +1,17 @@ +include cstdint header for gcc13 + +Upstream-Status: Pending +Signed-off-by: Anuj Mittal + +diff --git a/src/gpu/jit/gemm/kernel_catalog.hpp b/src/gpu/jit/gemm/kernel_catalog.hpp +index 8e6e1f3b6..3c8e29981 100644 +--- a/src/gpu/jit/gemm/kernel_catalog.hpp ++++ b/src/gpu/jit/gemm/kernel_catalog.hpp +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + + #include "gen_gemm_kernel_common.hpp" + -- cgit v1.2.3-54-g00ecf