summaryrefslogtreecommitdiffstats
path: root/recipes-support/opencv/opencv
diff options
context:
space:
mode:
authorTom Hochstein <tom.hochstein@nxp.com>2021-05-04 10:49:07 -0500
committerOtavio Salvador <otavio@ossystems.com.br>2021-05-04 14:06:25 -0300
commit7462ae5636ebd8551350253d2bb1c3047431ba0d (patch)
tree393e16c600247926640bbae3c58b0ab7990ebe58 /recipes-support/opencv/opencv
parenta5fc68872680f82e1e4b12d0ffd4be7b9046d372 (diff)
downloadmeta-freescale-7462ae5636ebd8551350253d2bb1c3047431ba0d.tar.gz
opencv: Fix SRC_URI
The SRC_URI is updated for the base recipe, but the copy of the SRC_URI in the override section doesn't account for this, leading to a build break: ``` | -- wechat_qrcode: Download: detect.caffemodel | CMake Error at /opt/work/upstream/fsl-xwayland/tmp/work/cortexa53-crypto-mx8mp-fsl-linux/opencv/4.5.2.imx-r0/git/cmake/OpenCVDownload.cmake:161 (message): | Not going to download detect.caffemodel ``` Additionally, the SRC_URI is long and complex, and copying it in our override section does make problems like this more likely. Fix the problem and simplify maintenance by replacing the SRC_URI copy with a targetted override. The override section now shows only the changes to SRC_URI. The fix includes these related changes: - a new patch file is added in the base recipe and is now copied locally - the override for SRCREV_contrib is redundant and is dropped Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Diffstat (limited to 'recipes-support/opencv/opencv')
-rw-r--r--recipes-support/opencv/opencv/0001-sfm-link-with-Glog_LIBS.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/recipes-support/opencv/opencv/0001-sfm-link-with-Glog_LIBS.patch b/recipes-support/opencv/opencv/0001-sfm-link-with-Glog_LIBS.patch
new file mode 100644
index 00000000..7b2c4100
--- /dev/null
+++ b/recipes-support/opencv/opencv/0001-sfm-link-with-Glog_LIBS.patch
@@ -0,0 +1,44 @@
1From ffe20fc4ec46c6b491eff29a38f90686d4d035f6 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Mon, 12 Apr 2021 20:37:40 +0000
4Subject: [PATCH] sfm: link with Glog_LIBS
5
6* in 4.5.0 there was explicit linkage with GLOG_LIBRARY, but since 4.5.1 with:
7 https://github.com/opencv/opencv_contrib/commit/23ee62a19b7a3e50d6dbf295359d8b1aff2e03fd
8
9 it's gone, probably because Glog_FOUND is already set from Ceres,
10 but then GLOG_LIBRARIES is empty in LIBMV_LIGHT_LIBS and build with gold fails:
11
12FAILED: bin/example_tutorial_perspective_correction
13: && TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/recipe-sysroot-native/usr/bin/x86_64-oe-linux/x86_64-oe-linux-g++ -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -ITOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/git/include -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0=/usr/src/debug/opencv/4.5.2-r0 -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0=/usr/src/debug/opencv/4.5.2-r0 -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/recipe-sysroot= -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -ITOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/git/include -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/recipe-sysroot -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse -msse2 -msse3 -mssse3 -DNDEBUG -DNDEBUG -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -ITOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/git/include -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/recipe-sysroot -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0=/usr/src/debug/opencv/4.5.2-r0 -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0=/usr/src/debug/opencv/4.5.2-r0 -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/recipe-sysroot= -fdebug-prefix-map=TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/recipe-sysroot-native= -fvisibility-inlines-hidden -m64 -march=core2 -mtune=core2 -msse3 -mfpmath=sse -ITOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/git/include -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/recipe-sysroot -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-z,relro,-z,now -Wl,--gc-sections -Wl,--as-needed samples/cpp/CMakeFiles/example_tutorial_perspective_correction.dir/tutorial_code/features2D/Homography/perspective_correction.cpp.o -o bin/example_tutorial_perspective_correction -ldl -lm -lpthread -lrt lib/libopencv_gapi.so.4.5.2 lib/libopencv_stitching.so.4.5.2 lib/libopencv_ts.so.4.5.2 lib/libopencv_alphamat.so.4.5.2 lib/libopencv_aruco.so.4.5.2 lib/libopencv_bgsegm.so.4.5.2 lib/libopencv_bioinspired.so.4.5.2 lib/libopencv_ccalib.so.4.5.2 lib/libopencv_dnn_objdetect.so.4.5.2 lib/libopencv_dnn_superres.so.4.5.2 lib/libopencv_dpm.so.4.5.2 lib/libopencv_face.so.4.5.2 lib/libopencv_fuzzy.so.4.5.2 lib/libopencv_hfs.so.4.5.2 lib/libopencv_img_hash.so.4.5.2 lib/libopencv_intensity_transform.so.4.5.2 lib/libopencv_line_descriptor.so.4.5.2 lib/libopencv_mcc.so.4.5.2 lib/libopencv_quality.so.4.5.2 lib/libopencv_rapid.so.4.5.2 lib/libopencv_reg.so.4.5.2 lib/libopencv_rgbd.so.4.5.2 lib/libopencv_saliency.so.4.5.2 lib/libopencv_sfm.so.4.5.2 lib/libopencv_stereo.so.4.5.2 lib/libopencv_structured_light.so.4.5.2 lib/libopencv_superres.so.4.5.2 lib/libopencv_surface_matching.so.4.5.2 lib/libopencv_tracking.so.4.5.2 lib/libopencv_videostab.so.4.5.2 lib/libopencv_wechat_qrcode.so.4.5.2 lib/libopencv_xfeatures2d.so.4.5.2 lib/libopencv_xobjdetect.so.4.5.2 lib/libopencv_xphoto.so.4.5.2 lib/libopencv_shape.so.4.5.2 lib/libopencv_highgui.so.4.5.2 lib/libopencv_datasets.so.4.5.2 lib/libopencv_ml.so.4.5.2 lib/libopencv_plot.so.4.5.2 lib/libopencv_phase_unwrapping.so.4.5.2 lib/libopencv_optflow.so.4.5.2 lib/libopencv_ximgproc.so.4.5.2 lib/libopencv_videoio.so.4.5.2 lib/libopencv_video.so.4.5.2 lib/libopencv_dnn.so.4.5.2 lib/libopencv_imgcodecs.so.4.5.2 lib/libopencv_objdetect.so.4.5.2 lib/libopencv_calib3d.so.4.5.2 lib/libopencv_features2d.so.4.5.2 lib/libopencv_flann.so.4.5.2 lib/libopencv_photo.so.4.5.2 lib/libopencv_imgproc.so.4.5.2 lib/libopencv_core.so.4.5.2 -Wl,-rpath-link,TOPDIR/tmp-glibc/work/core2-64-oe-linux/opencv/4.5.2-r0/build/lib && :
14lib/libopencv_sfm.so.4.5.2: error: undefined reference to 'google::LogMessage::LogMessage(char const*, int)'
15lib/libopencv_sfm.so.4.5.2: error: undefined reference to 'google::LogMessage::stream()'
16lib/libopencv_sfm.so.4.5.2: error: undefined reference to 'google::LogMessage::~LogMessage()'
17lib/libopencv_sfm.so.4.5.2: error: undefined reference to 'google::kLogSiteUninitialized'
18lib/libopencv_sfm.so.4.5.2: error: undefined reference to 'fLI::FLAGS_v'
19lib/libopencv_sfm.so.4.5.2: error: undefined reference to 'google::InitVLOG3__(int**, int*, char const*, int)'
20lib/libopencv_sfm.so.4.5.2: error: undefined reference to 'google::LogMessageFatal::LogMessageFatal(char const*, int)'
21lib/libopencv_sfm.so.4.5.2: error: undefined reference to 'google::LogMessageFatal::~LogMessageFatal()'
22collect2: error: ld returned 1 exit status
23
24 Add Glog_LIBS which is set to the same value as GLOG_LIBRARIES used to be.
25
26Upstream-Status: Submitted [https://github.com/opencv/opencv_contrib/pull/2923]
27
28Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
29---
30 modules/sfm/CMakeLists.txt | 1 +
31 1 file changed, 1 insertion(+)
32
33diff --git a/modules/sfm/CMakeLists.txt b/modules/sfm/CMakeLists.txt
34index 045a1fe6e..ee7cecdac 100644
35--- a/modules/sfm/CMakeLists.txt
36+++ b/modules/sfm/CMakeLists.txt
37@@ -84,6 +84,7 @@ set(LIBMV_LIGHT_LIBS
38 multiview
39 numeric
40 ${GLOG_LIBRARIES}
41+ ${Glog_LIBS}
42 ${GFLAGS_LIBRARIES}
43 )
44