From 62176275f4dec6cc60f7a8ccb08315ee55a74343 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Tue, 26 Jul 2022 16:30:49 +0900 Subject: [PATCH] [Dist/Debian] Prepare for GCC >= 10 Ubuntu 22.04 / GCC >= 10 incurs errors in openvino. Change-Id: I6470ad318fcd6f6dffcd88eab95fd52dbaa027f8 Signed-off-by: MyungJoo Ham --- debian/control | 4 ++-- debian/rules | 6 ++++-- inference-engine/src/mkldnn_plugin/mkldnn_memory_solver.hpp | 1 + inference-engine/tests/helpers/tests_file_utils.hpp | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/debian/control b/debian/control index 246301b..ccf8778 100644 --- a/debian/control +++ b/debian/control @@ -4,8 +4,8 @@ Section: libs Priority: optional Build-Depends: debhelper (>= 9.0.0), quilt, cmake, pkg-config, - gcc-9 | gcc-8 | gcc-7 | gcc-6 | gcc-5, - g++-9 | g++-8 | g++-7 | g++-6 | g++-5, + gcc-10 | gcc-8 | gcc-7 | gcc-6 | gcc-5, + g++-10 | g++-8 | g++-7 | g++-6 | g++-5, libusb-1.0-0-dev Standards-Version: 4.1.4 Vcs-Git: git://git.tizen.org/platform/upstream/dldt diff --git a/debian/rules b/debian/rules index 4276a84..96af22e 100755 --- a/debian/rules +++ b/debian/rules @@ -63,7 +63,7 @@ override_dh_auto_configure: prepare_tbb cd $(SRC_ROOT)/inference-engine/thirdparty && \ rm -rf *.tar.gz $(EXTERNAL_NGRAPH_ARCHIVE) cd $(SRC_ROOT)/inference-engine && rm -rf build && mkdir -p build - cd $(SRC_ROOT)/inference-engine/build && cmake .. \ + cd $(SRC_ROOT)/inference-engine/build && if [ -f /usr/bin/gcc-10 ]; then export CC=/usr/bin/gcc-10 && export CXX=/usr/bin/g++-10; fi && cmake .. \ -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX:PATH=$(PREFIX) \ -DCMAKE_INSTALL_LIBDIR:PATH=$(LIBDIR) -DINCLUDE_INSTALL_DIR:PATH=$(INCDIR) \ -DLIB_INSTALL_DIR:PATH=$(LIBDIR) -DSYSCONF_INSTALL_DIR:PATH=$(SYSCONFDIR) \ @@ -83,7 +83,9 @@ override_dh_auto_configure: prepare_tbb -DENABLE_OBJECT_DETECTION_TESTS=ON -DENABLE_OPENCV=OFF -DENABLE_PLUGIN_RPATH=OFF \ -DENABLE_PROFILING_ITT=OFF -DENABLE_PROFILING_RAW=OFF -DENABLE_PYTHON=OFF -DENABLE_ROCKHOPER=OFF \ -DENABLE_SAMPLES=OFF -DENABLE_SAMPLES_CORE=OFF -DENABLE_SEGMENTATION_TESTS=OFF -DENABLE_TESTS=ON \ - -DTREAT_WARNING_AS_ERROR=OFF + -DTREAT_WARNING_AS_ERROR=OFF \ + -DCMAKE_CXX_FLAGS="-Wno-odr -fno-lto" + override_dh_auto_build: dh_auto_build --builddirectory=$(SRC_ROOT)/inference-engine/build -- diff --git a/inference-engine/src/mkldnn_plugin/mkldnn_memory_solver.hpp b/inference-engine/src/mkldnn_plugin/mkldnn_memory_solver.hpp index 5e09ea9..bbc5233 100644 --- a/inference-engine/src/mkldnn_plugin/mkldnn_memory_solver.hpp +++ b/inference-engine/src/mkldnn_plugin/mkldnn_memory_solver.hpp @@ -12,6 +12,7 @@ #include #include +#include namespace MKLDNNPlugin { diff --git a/inference-engine/tests/helpers/tests_file_utils.hpp b/inference-engine/tests/helpers/tests_file_utils.hpp index 3abb891..18be4f2 100644 --- a/inference-engine/tests/helpers/tests_file_utils.hpp +++ b/inference-engine/tests/helpers/tests_file_utils.hpp @@ -18,6 +18,8 @@ #include #endif +#include + namespace testing { namespace FileUtils { #ifdef _WIN32 /// @brief TODO: description -- 2.7.4