summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2024-03-07 07:30:46 -0800
committerArmin Kuster <akuster808@gmail.com>2024-03-25 07:11:05 -0400
commitda98a75f37830e69ded0207cc6c73182ab00ec50 (patch)
tree18bc57755bb2e56dfd574b9ab79ca177989c42f1
parent938a3ff43cfe534521a3b36527d496ff931b0d2e (diff)
downloadmeta-openembedded-da98a75f37830e69ded0207cc6c73182ab00ec50.tar.gz
opencv: fix reproducibility issues
Download and unpack contrib modules and other repositories in S instead of WORKDIR so they don't escape file-prefix-map substitutions. Fixes a number of reproducibility problems because of OpenCV check macros that were embedding path to files in contrib/. MJ: this is backport from langdale and fixes not only reproducibility issues but also pseudo aborts in do_install when do_install is executed again after do_package (in incremental builds): | DEBUG: Executing shell function do_install | NOTE: DESTDIR=opencv/4.5.5-r0/image VERBOSE=1 cmake --build opencv/4.5.5-r0/build --target install -- | abort()ing pseudo client by server request. See https://wiki.yoctoproject.org/wiki/Pseudo_Abort for more details on this. | Check logfile: opencv/4.5.5-r0/pseudo//pseudo.log | Subprocess aborted and pseudo.log file shows: path mismatch [3 links]: ino 214373575 db 'opencv/4.5.5-r0/package/usr/src/debug/lib32-opencv/4.5.5-r0/contrib/modules/intensity_transform/src/bimef.cpp' req 'opencv/4.5.5-r0/contrib/modules/intensity_transform/src/bimef.cpp'. easily reproducible with: bitbake -c cleansstate opencv; bitbake -c package opencv; bitbake -c install -f opencv unlike ${S} ${WORKDIR}/contrib isn't in default PSEUDO_IGNORE_PATHS Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <martin.jansa@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-oe/recipes-support/opencv/opencv_4.5.5.bb34
1 files changed, 17 insertions, 17 deletions
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 a7700a3743..5b5685f990 100644
--- a/meta-oe/recipes-support/opencv/opencv_4.5.5.bb
+++ b/meta-oe/recipes-support/opencv/opencv_4.5.5.bb
@@ -39,12 +39,12 @@ IPP_MD5 = "${@ipp_md5sum(d)}"
39 39
40SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg" 40SRCREV_FORMAT = "opencv_contrib_ipp_boostdesc_vgg"
41SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol=https \ 41SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol=https \
42 git://github.com/opencv/opencv_contrib.git;destsuffix=contrib;name=contrib;branch=master;protocol=https \ 42 git://github.com/opencv/opencv_contrib.git;destsuffix=git/contrib;name=contrib;branch=master;protocol=https \
43 git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20191018;destsuffix=ipp;name=ipp;protocol=https \ 43 git://github.com/opencv/opencv_3rdparty.git;branch=ippicv/master_20191018;destsuffix=git/ipp;name=ipp;protocol=https \
44 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=boostdesc;name=boostdesc;protocol=https \ 44 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_boostdesc_20161012;destsuffix=git/boostdesc;name=boostdesc;protocol=https \
45 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=vgg;name=vgg;protocol=https \ 45 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_xfeatures2d_vgg_20160317;destsuffix=git/vgg;name=vgg;protocol=https \
46 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=face;name=face;protocol=https \ 46 git://github.com/opencv/opencv_3rdparty.git;branch=contrib_face_alignment_20170818;destsuffix=git/face;name=face;protocol=https \
47 git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=wechat_qrcode;name=wechat-qrcode;protocol=https \ 47 git://github.com/WeChatCV/opencv_3rdparty.git;branch=wechat_qrcode;destsuffix=git/wechat_qrcode;name=wechat-qrcode;protocol=https \
48 file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \ 48 file://0001-3rdparty-ippicv-Use-pre-downloaded-ipp.patch \
49 file://0003-To-fix-errors-as-following.patch \ 49 file://0003-To-fix-errors-as-following.patch \
50 file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \ 50 file://0001-Temporarliy-work-around-deprecated-ffmpeg-RAW-functi.patch \
@@ -52,10 +52,10 @@ SRC_URI = "git://github.com/opencv/opencv.git;name=opencv;branch=master;protocol
52 file://download.patch \ 52 file://download.patch \
53 file://0001-Make-ts-module-external.patch \ 53 file://0001-Make-ts-module-external.patch \
54 file://0001-core-vsx-update-vec_absd-workaround-condition.patch \ 54 file://0001-core-vsx-update-vec_absd-workaround-condition.patch \
55 file://CVE-2023-2617.patch;patchdir=../contrib \ 55 file://CVE-2023-2617.patch;patchdir=contrib \
56 file://CVE-2023-2618.patch;patchdir=../contrib \ 56 file://CVE-2023-2618.patch;patchdir=contrib \
57 " 57 "
58SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=../contrib" 58SRC_URI:append:riscv64 = " file://0001-Use-Os-to-compile-tinyxml2.cpp.patch;patchdir=contrib"
59 59
60S = "${WORKDIR}/git" 60S = "${WORKDIR}/git"
61 61
@@ -64,7 +64,7 @@ S = "${WORKDIR}/git"
64OPENCV_DLDIR = "${WORKDIR}/downloads" 64OPENCV_DLDIR = "${WORKDIR}/downloads"
65 65
66do_unpack_extra() { 66do_unpack_extra() {
67 tar xzf ${WORKDIR}/ipp/ippicv/${IPP_FILENAME} -C ${WORKDIR} 67 tar xzf ${S}/ipp/ippicv/${IPP_FILENAME} -C ${S}
68 68
69 md5() { 69 md5() {
70 # Return the MD5 of $1 70 # Return the MD5 of $1
@@ -79,22 +79,22 @@ do_unpack_extra() {
79 test -e $DEST || ln -s $F $DEST 79 test -e $DEST || ln -s $F $DEST
80 done 80 done
81 } 81 }
82 cache xfeatures2d/boostdesc ${WORKDIR}/boostdesc/*.i 82 cache xfeatures2d/boostdesc ${S}/boostdesc/*.i
83 cache xfeatures2d/vgg ${WORKDIR}/vgg/*.i 83 cache xfeatures2d/vgg ${S}/vgg/*.i
84 cache data ${WORKDIR}/face/*.dat 84 cache data ${S}/face/*.dat
85 cache wechat_qrcode ${WORKDIR}/wechat_qrcode/*.caffemodel 85 cache wechat_qrcode ${S}/wechat_qrcode/*.caffemodel
86 cache wechat_qrcode ${WORKDIR}/wechat_qrcode/*.prototxt 86 cache wechat_qrcode ${S}/wechat_qrcode/*.prototxt
87} 87}
88addtask unpack_extra after do_unpack before do_patch 88addtask unpack_extra after do_unpack before do_patch
89 89
90CMAKE_VERBOSE = "VERBOSE=1" 90CMAKE_VERBOSE = "VERBOSE=1"
91 91
92EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${WORKDIR}/contrib/modules \ 92EXTRA_OECMAKE = "-DOPENCV_EXTRA_MODULES_PATH=${S}/contrib/modules \
93 -DWITH_1394=OFF \ 93 -DWITH_1394=OFF \
94 -DENABLE_PRECOMPILED_HEADERS=OFF \ 94 -DENABLE_PRECOMPILED_HEADERS=OFF \
95 -DCMAKE_SKIP_RPATH=ON \ 95 -DCMAKE_SKIP_RPATH=ON \
96 -DOPENCV_ICV_HASH=${IPP_MD5} \ 96 -DOPENCV_ICV_HASH=${IPP_MD5} \
97 -DIPPROOT=${WORKDIR}/ippicv_lnx \ 97 -DIPPROOT=${S}/ippicv_lnx \
98 -DOPENCV_GENERATE_PKGCONFIG=ON \ 98 -DOPENCV_GENERATE_PKGCONFIG=ON \
99 -DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \ 99 -DOPENCV_DOWNLOAD_PATH=${OPENCV_DLDIR} \
100 -DOPENCV_ALLOW_DOWNLOADS=OFF \ 100 -DOPENCV_ALLOW_DOWNLOADS=OFF \