Skip to contentSkip to conversation

package/opencv: add inter-module dependencies

PATCH New Bernd Kuhls 3 participants 8 messages Apr 18, 2016 – Apr 19, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/2 package/opencv: add inter-module dependencies

As stated by Samuel the opencv2 package lacks inter-module dependencies:
http://lists.busybox.net/pipermail/buildroot/2016-April/158902.html

This patch adds the necessary code for freeswitch's mod_cv to compile.

---
v3: add more dependencies
v2: initial release (Samuel)

 package/opencv/Config.in | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
package/opencv/Config.in +15 -0
index 8bc6c34..b563312 100644
@@ -23,6 +23,13 @@ config BR2_PACKAGE_OPENCV_LIB_CALIB3D
 config BR2_PACKAGE_OPENCV_LIB_CONTRIB
 	bool "contrib"
 	default y
+	# modules/contrib/CMakeLists.txt
+	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+	select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+	select BR2_PACKAGE_OPENCV_LIB_ML
+	select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
 	  Include opencv_contrib module into the OpenCV build.
 
@@ -46,6 +53,8 @@ config BR2_PACKAGE_OPENCV_LIB_GPU
 config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
 	bool "highgui"
 	default y
+	# modules/highgui/CMakeLists.txt
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_highgui module into the OpenCV build.
 
@@ -58,6 +67,10 @@ config BR2_PACKAGE_OPENCV_LIB_IMGPROC
 config BR2_PACKAGE_OPENCV_LIB_LEGACY
 	bool "legacy"
 	default y
+	# modules/legacy/CMakeLists.txt
+	select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+	select BR2_PACKAGE_OPENCV_LIB_ML
+	select BR2_PACKAGE_OPENCV_LIB_VIDEO
 	help
 	  Include opencv_legacy module into the OpenCV build.
 
@@ -75,6 +88,8 @@ config BR2_PACKAGE_OPENCV_LIB_NONFREE
 config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
 	bool "objdetect"
 	default y
+	# modules/objdetect/CMakeLists.txt
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_objdetect module into the OpenCV build.
 
Signature · 1 line
2.8.0.rc3
#1 lore raw

PATCH v3 2/2 package/freeswitch: select OpenCV modules for needed mod_cv

Fixes
http://autobuild.buildroot.net/results/ffd/ffd572d7bb68d8ed46ce76b2af824503c587449f/
http://autobuild.buildroot.net/results/e53/e53e356451aa4541a76e26722fd71051896e774b/
http://autobuild.buildroot.net/results/564/5649ff1b50a1eaafbd0e1a329bff87a65ce18da0/
http://autobuild.buildroot.net/results/c60/c60f97c6aafb1a94cb4ce344953598eae8b4a912/
http://autobuild.buildroot.net/results/c1a/c1ac61f9a77635962babdb6bfb31dbecb7f4d439/

---
v3: add more suboptions
v2: select the required suboption instead of checking for its existance
in freeswitch.mk (Thomas)

 package/freeswitch/Config.in | 5 +++++
 1 file changed, 5 insertions(+)
package/freeswitch/Config.in +5 -0
index 1350b2b..9b3f0fc 100644
@@ -7,6 +7,11 @@ menuconfig BR2_PACKAGE_FREESWITCH
 	depends on BR2_USE_WCHAR # libuuid
 	select BR2_PACKAGE_LIBCURL
 	select BR2_PACKAGE_JPEG
+	# src/mod/applications/mod_cv/mod_cv.cpp includes cv.h
+	select BR2_PACKAGE_OPENCV_LIB_CONTRIB if BR2_PACKAGE_OPENCV
+	select BR2_PACKAGE_OPENCV_LIB_FLANN if BR2_PACKAGE_OPENCV
+	select BR2_PACKAGE_OPENCV_LIB_HIGHGUI if BR2_PACKAGE_OPENCV
+	select BR2_PACKAGE_OPENCV_LIB_LEGACY if BR2_PACKAGE_OPENCV
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_PCRE
 	select BR2_PACKAGE_SPEEX
Signature · 1 line
2.8.0.rc3
#2 lore raw

PATCH v3 2/2 package/freeswitch: select OpenCV modules for needed mod_cv

Quoted 21 lines · Bernd Kuhls

Fixes
http://autobuild.buildroot.net/results/ffd/ffd572d7bb68d8ed46ce76b2af824503c587449f/
http://autobuild.buildroot.net/results/e53/e53e356451aa4541a76e26722fd71051896e774b/
http://autobuild.buildroot.net/results/564/5649ff1b50a1eaafbd0e1a329bff87a65ce18da0/
http://autobuild.buildroot.net/results/c60/c60f97c6aafb1a94cb4ce344953598eae8b4a912/
http://autobuild.buildroot.net/results/c1a/c1ac61f9a77635962babdb6bfb31dbecb7f4d439/

---
v3: add more suboptions
v2: select the required suboption instead of checking for its existance
in freeswitch.mk (Thomas)

 package/freeswitch/Config.in | 5 +++++
 1 file changed, 5 insertions(+)
package/freeswitch/Config.in +0 -0
index 1350b2b..9b3f0fc 100644

package/freeswitch/Config.in menuconfig BR2_PACKAGE_FREESWITCH · line 10

Quoted 4 lines
package/freeswitch/Config.in +1 -0
@@ -7,6 +7,11 @@ menuconfig BR2_PACKAGE_FREESWITCH
        depends on BR2_USE_WCHAR # libuuid
        select BR2_PACKAGE_LIBCURL
        select BR2_PACKAGE_JPEG
+       # src/mod/applications/mod_cv/mod_cv.cpp includes cv.h

... which includes headers from: core, imgproc, video, feature2d, flann, calib3d, objdetect and legacy [1]
So I would expect to see all these modules selected.

package/freeswitch/Config.in menuconfig BR2_PACKAGE_FREESWITCH · line 13

Quoted 3 lines
package/freeswitch/Config.in +3 -0
+       select BR2_PACKAGE_OPENCV_LIB_CONTRIB if BR2_PACKAGE_OPENCV
+       select BR2_PACKAGE_OPENCV_LIB_FLANN if BR2_PACKAGE_OPENCV
+       select BR2_PACKAGE_OPENCV_LIB_HIGHGUI if BR2_PACKAGE_OPENCV

Is highgui included as well in mod_cv?
To depend on highgui, a package has to explicitly include it, even with the legacy headers.

package/freeswitch/Config.in menuconfig BR2_PACKAGE_FREESWITCH · line 14

Quoted 1 line
package/freeswitch/Config.in +1 -0
+       select BR2_PACKAGE_OPENCV_LIB_LEGACY if BR2_PACKAGE_OPENCV

The selection is not complete WRT what is included in cv.h, but thanks to the inter-dependencies defined in the previous patch, all should be there at build-time for freeswitch at least.

Quoted 10 lines
package/freeswitch/Config.in +0 -1
        select BR2_PACKAGE_OPENSSL
        select BR2_PACKAGE_PCRE
        select BR2_PACKAGE_SPEEX
--

2.8.0.rc3

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

[1] https://github.com/Itseez/opencv/blob/2.4.12.3/include/opencv/cv.h#L63

Regards,

Signature · 1 line
Samuel
#3 lore raw

PATCH v3 2/2 package/freeswitch: select OpenCV modules for needed mod_cv

Hi Samuel,

Am Tue, 19 Apr 2016 00:11:04 +0200 schrieb Samuel Martin:

Quoted 4 lines
Quoted 1 line

+ # src/mod/applications/mod_cv/mod_cv.cpp includes cv.h

... which includes headers from: core, imgproc, video, feature2d, flann, calib3d, objdetect and legacy [1]
So I would expect to see all these modules selected.

will be included in v4.

Quoted 2 lines
Quoted 1 line

select BR2_PACKAGE_OPENCV_LIB_HIGHGUI if BR2_PACKAGE_OPENCV

Is highgui included as well in mod_cv?

Yes: https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse/src/
mod/applications/mod_cv/mod_cv.cpp?at=refs%2Fheads%2Fv1.6#46

Regards, Bernd

#4 lore raw

PATCH v3 1/2 package/opencv: add inter-module dependencies

In reply to Bernd Kuhls

Bernd, all,

Quoted 52 lines · Bernd Kuhls

As stated by Samuel the opencv2 package lacks inter-module dependencies:
http://lists.busybox.net/pipermail/buildroot/2016-April/158902.html

This patch adds the necessary code for freeswitch's mod_cv to compile.

---
v3: add more dependencies
v2: initial release (Samuel)

 package/opencv/Config.in | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
package/opencv/Config.in +13 -0
index 8bc6c34..b563312 100644
@@ -23,6 +23,13 @@ config BR2_PACKAGE_OPENCV_LIB_CALIB3D
 config BR2_PACKAGE_OPENCV_LIB_CONTRIB
        bool "contrib"
        default y
+       # modules/contrib/CMakeLists.txt
+       select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+       select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+       select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+       select BR2_PACKAGE_OPENCV_LIB_ML
+       select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
+       select BR2_PACKAGE_OPENCV_LIB_VIDEO
        help
          Include opencv_contrib module into the OpenCV build.
 
@@ -46,6 +53,8 @@ config BR2_PACKAGE_OPENCV_LIB_GPU
 config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
        bool "highgui"
        default y
+       # modules/highgui/CMakeLists.txt
+       select BR2_PACKAGE_OPENCV_LIB_IMGPROC
        help
          Include opencv_highgui module into the OpenCV build.
 
@@ -58,6 +67,10 @@ config BR2_PACKAGE_OPENCV_LIB_IMGPROC
 config BR2_PACKAGE_OPENCV_LIB_LEGACY
        bool "legacy"
        default y
+       # modules/legacy/CMakeLists.txt
+       select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+       select BR2_PACKAGE_OPENCV_LIB_ML
+       select BR2_PACKAGE_OPENCV_LIB_VIDEO
        help
          Include opencv_legacy module into the OpenCV build.
 

package/opencv/Config.in config BR2_PACKAGE_OPENCV_LIB_NONFREE · line 95

Quoted 8 lines
package/opencv/Config.in +2 -0
@@ -75,6 +88,8 @@ config BR2_PACKAGE_OPENCV_LIB_NONFREE
 config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
        bool "objdetect"
        default y
+       # modules/objdetect/CMakeLists.txt
+       select BR2_PACKAGE_OPENCV_LIB_IMGPROC
        help
          Include opencv_objdetect module into the OpenCV build.
 

Though this patch only fixes what is needed to meet the freeswitch's deps, these deps. are correct.

Regards,

Signature · 1 line
Samuel
#5 lore raw

PATCH v3 1/2 package/opencv: add inter-module dependencies

Hello,

Quoted 2 lines · Samuel Martin

Though this patch only fixes what is needed to meet the freeswitch's deps, these deps. are correct.

Shall I take this as a Reviewed-by ?

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH v3 1/2 package/opencv: add inter-module dependencies

Quoted 8 lines · Thomas Petazzoni

Hello,

Quoted 2 lines · Samuel Martin

Though this patch only fixes what is needed to meet the freeswitch's deps, these deps. are correct.

Shall I take this as a Reviewed-by ?

Yes you can.
Adding the rest in a follow-up patch will be fairly trivial.

Signature · 1 line
Samuel
#7 lore raw

PATCH v3 1/2 package/opencv: add inter-module dependencies

In reply to Bernd Kuhls

Hello,

Quoted 9 lines · Bernd Kuhls

As stated by Samuel the opencv2 package lacks inter-module dependencies:
http://lists.busybox.net/pipermail/buildroot/2016-April/158902.html

This patch adds the necessary code for freeswitch's mod_cv to compile.

---
v3: add more dependencies
v2: initial release (Samuel)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com