Skip to contentSkip to conversation

opencv_3: Fix use before set error on meta package

PATCH Superseded Ricardo Ribalda Delgado 2 participants 7 messages Mar 14, 2016 – Mar 17, 2016

v2 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/4 opencv_3: Fix use before set error on meta package

This bug was introducing a loop dependency of opencv->opencv that was confusing dpkg.

---
 meta-oe/recipes-support/opencv/opencv_3.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-support/opencv/opencv_3.0.bb +1 -1
index 99ca8b35727d..f6c4ca8fac16 100644
@@ -86,8 +86,8 @@ python populate_packages_prepend () {
             metapkg_rdepends.append(pkg)
     d.setVar('RRECOMMENDS_' + metapkg, ' '.join(metapkg_rdepends))
 
-    blacklist = [ metapkg ]
     metapkg =  pn
+    blacklist = [ metapkg ]
     metapkg_rdepends = [ ]
     for pkg in packages[1:]:
         if not pkg in blacklist and not pkg in metapkg_rdepends and not pkg.endswith('-dev') and not pkg.endswith('-dbg') and not pkg.endswith('-doc') :
Signature · 1 line
2.7.0
#1 lore raw

PATCH v2 2/4 opencv: Remove blacklist

Version 3.0 builds fine with ffmpeg v3

[ 32%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o
DEBUG: Shell function do_compile finished

---
 meta-oe/recipes-support/opencv/opencv_3.0.bb | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
meta-oe/recipes-support/opencv/opencv_3.0.bb +1 -4
index f6c4ca8fac16..1a34efa7f01f 100644
@@ -130,7 +130,4 @@ do_install_append() {
 
     install -d ${D}${datadir}/OpenCV/samples/bin/
     cp -f bin/*-tutorial-* bin/*-example-* ${D}${datadir}/OpenCV/samples/bin/
-}
-
-# http://errors.yoctoproject.org/Errors/Details/40660/
-PNBLACKLIST[opencv] ?= "Not compatible with currently used ffmpeg 3"
+}
\ No newline at end of file
Signature · 1 line
2.7.0
#2 lore raw

Re: [meta-oe][PATCH v2 2/4] opencv: Remove blacklist

Quoted 1 line · Ricardo Ribalda Delgado

Version 3.0 builds fine with ffmpeg v3

No it doesn't, 3.1 might

http://errors.yoctoproject.org/Errors/Details/55791/

Quoted 26 lines

[ 32%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o
DEBUG: Shell function do_compile finished

---
 meta-oe/recipes-support/opencv/opencv_3.0.bb | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
meta-oe/recipes-support/opencv/opencv_3.0.bb +1 -4
index f6c4ca8fac16..1a34efa7f01f 100644
@@ -130,7 +130,4 @@ do_install_append() {
 
     install -d ${D}${datadir}/OpenCV/samples/bin/
     cp -f bin/*-tutorial-* bin/*-example-* ${D}${datadir}/OpenCV/samples/bin/
-}
-
-# http://errors.yoctoproject.org/Errors/Details/40660/
-PNBLACKLIST[opencv] ?= "Not compatible with currently used ffmpeg 3"
+}
\ No newline at end of file
Signature · 1 line
2.7.0
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#3 lore raw

Re: [meta-oe][PATCH v2 2/4] opencv: Remove blacklist

That is really weird. I was pretty sure that I tried it fine on my build.

Let me build it again from scratch.

Sorry!

Quoted 36 lines · Martin Jansa
Quoted 1 line · Ricardo Ribalda Delgado

Version 3.0 builds fine with ffmpeg v3

No it doesn't, 3.1 might

http://errors.yoctoproject.org/Errors/Details/55791/

Quoted 24 lines

[ 32%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o
DEBUG: Shell function do_compile finished

---
 meta-oe/recipes-support/opencv/opencv_3.0.bb | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
meta-oe/recipes-support/opencv/opencv_3.0.bb +1 -5
index f6c4ca8fac16..1a34efa7f01f 100644
@@ -130,7 +130,4 @@ do_install_append() {
 
     install -d ${D}${datadir}/OpenCV/samples/bin/
     cp -f bin/*-tutorial-* bin/*-example-* ${D}${datadir}/OpenCV/samples/bin/
-}
-
-# http://errors.yoctoproject.org/Errors/Details/40660/
-PNBLACKLIST[opencv] ?= "Not compatible with currently used ffmpeg 3"
+}
\ No newline at end of file
--
Quoted 2 lines

2.7.0

--
Martin 'JaMa' Jansa jabber: [email protected]

Signature · 1 line
Ricardo Ribalda
#4 lore raw

PATCH v2 3/4 opencv: Update to version 3.1

In reply to Ricardo Ribalda Delgado

The first major update in 3.0 release series

---
 meta-oe/recipes-support/opencv/{opencv_3.0.bb => opencv_3.1.bb} | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
 rename meta-oe/recipes-support/opencv/{opencv_3.0.bb => opencv_3.1.bb} (97%)
meta-oe/recipes-support/opencv/opencv_3.1.bb renamed from meta-oe/recipes-support/opencv/opencv_3.0.bb +4 -4
similarity index 97%
rename from meta-oe/recipes-support/opencv/opencv_3.0.bb
rename to meta-oe/recipes-support/opencv/opencv_3.1.bb
index 1a34efa7f01f..9fd3b12e3631 100644
@@ -10,15 +10,15 @@ ARM_INSTRUCTION_SET_armv5 = "arm"
 
 DEFAULT_PREFERENCE = "-1"
 
-DEPENDS = "python-numpy libtool swig swig-native python bzip2 zlib glib-2.0"
+DEPENDS = "python-numpy libtool swig swig-native python bzip2 zlib glib-2.0 libwebp"
 
-SRCREV_opencv = "424c2bddb39dae97dc4639a24eaa0e0c8fbb8e69"
-SRCREV_contrib = "844c30e8b2f2f4b34b96a169fafe9beea3c45e87"
+SRCREV_opencv = "92387b1ef8fad15196dd5f7fb4931444a68bc93a"
+SRCREV_contrib = "5409d5ad560523c85c6796cc5a009347072d883c"
 SRCREV_FORMAT = "opencv"
 SRC_URI = "git://github.com/Itseez/opencv.git;name=opencv \
 	   git://github.com/Itseez/opencv_contrib.git;destsuffix=contrib;name=contrib"
 
-PV = "3.0+git${SRCPV}"
+PV = "3.1+git${SRCPV}"
 
 S = "${WORKDIR}/git"
 
Signature · 1 line
2.7.0
#5 lore raw

PATCH v2 4/4 opencv: Fix pkg-config file.

In reply to Ricardo Ribalda Delgado

It was pointing to the wrong location

---
 meta-oe/recipes-support/opencv/opencv/fixpkgconfig.patch | 12 ++++++++++++
 meta-oe/recipes-support/opencv/opencv_3.1.bb             |  3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/opencv/opencv/fixpkgconfig.patch
meta-oe/recipes-support/opencv/opencv/fixpkgconfig.patch new file +12 -0
new file mode 100644
index 000000000000..4ac3e888e1f0
@@ -0,0 +1,12 @@
+diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake
+index b8cb8777c06b..081c62dafd77 100644
+--- a/cmake/OpenCVGenPkgconfig.cmake
++++ b/cmake/OpenCVGenPkgconfig.cmake
+@@ -66,6 +66,7 @@ ocv_list_unique(_3rdparty)
+ 
+ set(OPENCV_PC_LIBS
+   "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}"
++  "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}"
+   "${_modules}"
+ )
+ if (BUILD_SHARED_LIBS)
meta-oe/recipes-support/opencv/opencv_3.1.bb +2 -1
index 9fd3b12e3631..c403852cf405 100644
@@ -16,7 +16,8 @@ SRCREV_opencv = "92387b1ef8fad15196dd5f7fb4931444a68bc93a"
 SRCREV_contrib = "5409d5ad560523c85c6796cc5a009347072d883c"
 SRCREV_FORMAT = "opencv"
 SRC_URI = "git://github.com/Itseez/opencv.git;name=opencv \
-	   git://github.com/Itseez/opencv_contrib.git;destsuffix=contrib;name=contrib"
+	   git://github.com/Itseez/opencv_contrib.git;destsuffix=contrib;name=contrib \
+	   file://fixpkgconfig.patch"
 
 PV = "3.1+git${SRCPV}"
 
Signature · 1 line
2.7.0
#6 lore raw

Re: [meta-oe][PATCH v2 4/4] opencv: Fix pkg-config file.

Quoted 32 lines · Ricardo Ribalda Delgado

It was pointing to the wrong location

---
 meta-oe/recipes-support/opencv/opencv/fixpkgconfig.patch | 12 ++++++++++++
 meta-oe/recipes-support/opencv/opencv_3.1.bb             |  3 ++-
 2 files changed, 14 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/opencv/opencv/fixpkgconfig.patch
meta-oe/recipes-support/opencv/opencv/fixpkgconfig.patch new file +12 -0
new file mode 100644
index 000000000000..4ac3e888e1f0
@@ -0,0 +1,12 @@
+diff --git a/cmake/OpenCVGenPkgconfig.cmake b/cmake/OpenCVGenPkgconfig.cmake
+index b8cb8777c06b..081c62dafd77 100644
+--- a/cmake/OpenCVGenPkgconfig.cmake
++++ b/cmake/OpenCVGenPkgconfig.cmake
+@@ -66,6 +66,7 @@ ocv_list_unique(_3rdparty)
+ 
+ set(OPENCV_PC_LIBS
+   "-L\${exec_prefix}/${OPENCV_LIB_INSTALL_PATH}"
++  "-L\${exec_prefix}/${OPENCV_3P_LIB_INSTALL_PATH}"
+   "${_modules}"
+ )
+ if (BUILD_SHARED_LIBS)
meta-oe/recipes-support/opencv/opencv_3.1.bb +0 -0
index 9fd3b12e3631..c403852cf405 100644

meta-oe/recipes-support/opencv/opencv_3.1.bb SRCREV_opencv = "92387b1ef8fad15196dd5f7fb4931444a68bc93a" · line 20

Quoted 6 lines
meta-oe/recipes-support/opencv/opencv_3.1.bb +2 -1
@@ -16,7 +16,8 @@ SRCREV_opencv = "92387b1ef8fad15196dd5f7fb4931444a68bc93a"
 SRCREV_contrib = "5409d5ad560523c85c6796cc5a009347072d883c"
 SRCREV_FORMAT = "opencv"
 SRC_URI = "git://github.com/Itseez/opencv.git;name=opencv \
-	   git://github.com/Itseez/opencv_contrib.git;destsuffix=contrib;name=contrib"
+	   git://github.com/Itseez/opencv_contrib.git;destsuffix=contrib;name=contrib \
+	   file://fixpkgconfig.patch"

Please don't mix tabs and spaces, use 4 spaces everywhere.

3.1 doesn't fails with ffmpeg 3.0 but this fix isn't enough, still shows:

ERROR: QA Issue: opencv.pc failed sanity test (tmpdir) in path /home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5e-oe-linux-gnueabi/opencv/3.1+gitAUTOINC+92387b1ef8-r0/sysroot-destdir/usr/lib/pkgconfig [pkgconfig]

http://errors.yoctoproject.org/Errors/Details/56596/

Quoted 6 lines
meta-oe/recipes-support/opencv/opencv_3.1.bb +0 -0
 PV = "3.1+git${SRCPV}"
 
Signature · 1 line
2.7.0
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]