From 3f26c46cbd236263ccf332c4357f9e52047e83f7 Mon Sep 17 00:00:00 2001 From: Mingli Yu Date: Mon, 14 Feb 2022 18:53:37 +0800 Subject: [PATCH] opencv: disable sse4.1 and sse4.2 on x86 Disable sse4.1 and sse4.2 on x86 to fix the below build failure [1]. | ./opencv-4.5.5/git/modules/gapi/src/backends/fluid/gfluidcore_simd_sse41.hpp:387:47: error: '_mm_insert_epi64' was not declared in this scope; did you mean '_mm_insert_epi8'? 387 | val_0 = _mm_unpacklo_epi8(_mm_insert_epi64(val_0, reinterpret_cast(&tmp[4 * (chanNum * mapsx[x + 1] + 1)]), 0), zero); | ^~~~~~~~~~~~~~~~ | _mm_insert_epi8 [1] https://github.com/opencv/opencv/issues/21597 Signed-off-by: Mingli Yu Signed-off-by: Khem Raj --- meta-oe/recipes-support/opencv/opencv_4.5.5.bb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/meta-oe/recipes-support/opencv/opencv_4.5.5.bb b/meta-oe/recipes-support/opencv/opencv_4.5.5.bb index 9627190bd9..a3affa701d 100644 --- a/meta-oe/recipes-support/opencv/opencv_4.5.5.bb +++ b/meta-oe/recipes-support/opencv/opencv_4.5.5.bb @@ -100,6 +100,9 @@ EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \ ${@bb.utils.contains("TARGET_CC_ARCH", "-msse4.2", "-DENABLE_SSE=1 -DENABLE_SSE2=1 -DENABLE_SSE3=1 -DENABLE_SSSE3=1 -DENABLE_SSE41=1 -DENABLE_SSE42=1", "", d)} \ " EXTRA_OECMAKE:append:x86 = " -DX86=ON" +# disable sse4.1 and sse4.2 to fix 32bit build failure +# https://github.com/opencv/opencv/issues/21597 +EXTRA_OECMAKE:remove:x86 = " -DENABLE_SSE41=1 -DENABLE_SSE42=1" PACKAGECONFIG ??= "gapi python3 eigen jpeg png tiff v4l libv4l gstreamer samples tbb gphoto2 \ ${@bb.utils.contains("DISTRO_FEATURES", "x11", "gtk", "", d)} \