Skip to contentSkip to conversation

package/freeswitch: mod_cv needs BR2_PACKAGE_OPENCV_LIB_OBJDETECT

PATCH New Bernd Kuhls 3 participants 10 messages Apr 18, 2016

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 package/freeswitch: mod_cv needs BR2_PACKAGE_OPENCV_LIB_OBJDETECT

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/

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

 package/freeswitch/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/freeswitch/Config.in +1 -0
index 1350b2b..6912a1e 100644
@@ -7,6 +7,7 @@ menuconfig BR2_PACKAGE_FREESWITCH
 	depends on BR2_USE_WCHAR # libuuid
 	select BR2_PACKAGE_LIBCURL
 	select BR2_PACKAGE_JPEG
+	select BR2_PACKAGE_OPENCV_LIB_OBJDETECT if BR2_PACKAGE_OPENCV
 	select BR2_PACKAGE_OPENSSL
 	select BR2_PACKAGE_PCRE
 	select BR2_PACKAGE_SPEEX
Signature · 1 line
2.8.0.rc3
#1 lore raw

PATCH v2 2/2 package/opencv: module objdetect depends on imgproc

The mod_cv module of Freeswitch depends on the objdetect module from opencv, as noted by Samuel:
http://lists.busybox.net/pipermail/buildroot/2016-April/158902.html

Checking for opencv support in Freeswitch should only include the direct dependency, objdetect in this case, and not inter-module dependencies.
This patch reflects the dependency of objdetect on imgproc.

---
v2: initial release (Samuel)

 package/opencv/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/opencv/Config.in +1 -0
index 8bc6c34..d87ca00 100644
@@ -75,6 +75,7 @@ config BR2_PACKAGE_OPENCV_LIB_NONFREE
 config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
 	bool "objdetect"
 	default y
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_objdetect module into the OpenCV build.
 
Signature · 1 line
2.8.0.rc3
#2 lore raw

PATCH v2 2/2 package/opencv: module objdetect depends on imgproc

Samuel,

Can you comment on this one? I thought we had no expression of the interdependencies between OpenCV modules. Are those interdependencies build-time dependencies or run-time dependencies?

Bernd, if this patch is needed, then it should be the first patch in the series, not the second one.

Thomas

Quoted 28 lines · Bernd Kuhls

The mod_cv module of Freeswitch depends on the objdetect module from opencv, as noted by Samuel:
http://lists.busybox.net/pipermail/buildroot/2016-April/158902.html

Checking for opencv support in Freeswitch should only include the direct dependency, objdetect in this case, and not inter-module dependencies.
This patch reflects the dependency of objdetect on imgproc.

---
v2: initial release (Samuel)

 package/opencv/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/opencv/Config.in +1 -0
index 8bc6c34..d87ca00 100644
@@ -75,6 +75,7 @@ config BR2_PACKAGE_OPENCV_LIB_NONFREE
 config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
 	bool "objdetect"
 	default y
+	select BR2_PACKAGE_OPENCV_LIB_IMGPROC
 	help
 	  Include opencv_objdetect module into the OpenCV build.
 
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v2 2/2 package/opencv: module objdetect depends on imgproc

Hi all,

Quoted 5 lines · Thomas Petazzoni

Samuel,

Can you comment on this one? I thought we had no expression of the interdependencies between OpenCV modules. Are those interdependencies build-time dependencies or run-time dependencies?

In opencv(2) we don't, in opencv3 we do.

I did the work on opencv3 when bumping the package, but did not take the time to do it on opencv(2) after we reverted it.

These interdependencies are build-time deps., they are already expressed in the cmake code.
One just needs to extract the info and report it in the Config.in. I'll check if I can quickly dig up something about this on the opencv(2) package.

Regards,

Quoted 42 lines

Bernd, if this patch is needed, then it should be the first patch in the series, not the second one.

Thomas

Quoted 21 lines · Bernd Kuhls

The mod_cv module of Freeswitch depends on the objdetect module from opencv, as noted by Samuel:
http://lists.busybox.net/pipermail/buildroot/2016-April/158902.html

Checking for opencv support in Freeswitch should only include the direct dependency, objdetect in this case, and not inter-module dependencies.
This patch reflects the dependency of objdetect on imgproc.

---
v2: initial release (Samuel)

 package/opencv/Config.in | 1 +
 1 file changed, 1 insertion(+)
package/opencv/Config.in +0 -0
index 8bc6c34..d87ca00 100644

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

Quoted 7 lines
package/opencv/Config.in +1 -0
@@ -75,6 +75,7 @@ config BR2_PACKAGE_OPENCV_LIB_NONFREE
 config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
      bool "objdetect"
      default y
+     select BR2_PACKAGE_OPENCV_LIB_IMGPROC
      help
        Include opencv_objdetect module into the OpenCV build.
 

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

Signature · 1 line
Samuel
#4 lore raw

PATCH v2 2/2 package/opencv: module objdetect depends on imgproc

Am Mon, 18 Apr 2016 21:57:49 +0200 schrieb Samuel Martin:

Quoted 2 lines

I'll check if I can quickly dig up something about this on the opencv(2) package.

Hi,

currently I am preparing such a patch with the necessary changes needed by freeswitch.

Regards, Bernd

#5 lore raw

PATCH v2 2/2 package/opencv: module objdetect depends on imgproc

In reply to Samuel Martin

Hello,

Quoted 5 lines · Samuel Martin
Quoted 3 lines

Can you comment on this one? I thought we had no expression of the interdependencies between OpenCV modules. Are those interdependencies build-time dependencies or run-time dependencies?

In opencv(2) we don't, in opencv3 we do.

Quoted 8 lines

I did the work on opencv3 when bumping the package, but did not take the time to do it on opencv(2) after we reverted it.

These interdependencies are build-time deps., they are already expressed in the cmake code.
One just needs to extract the info and report it in the Config.in. I'll check if I can quickly dig up something about this on the opencv(2) package.

If they are already expressed in the CMake code, the build will not fail, so why did you object to the previous iteration of Bernd's patch?

Thomas

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

PATCH v2 2/2 package/opencv: module objdetect depends on imgproc

Quoted 12 lines · Thomas Petazzoni

Hello,

Quoted 8 lines · Samuel Martin
Quoted 3 lines

Can you comment on this one? I thought we had no expression of the interdependencies between OpenCV modules. Are those interdependencies build-time dependencies or run-time dependencies?

In opencv(2) we don't, in opencv3 we do.

I did the work on opencv3 when bumping the package, but did not take the time to do it on opencv(2) after we reverted it.

Quoted 8 lines
Quoted 5 lines

These interdependencies are build-time deps., they are already expressed in the cmake code.
One just needs to extract the info and report it in the Config.in. I'll check if I can quickly dig up something about this on the opencv(2) package.

If they are already expressed in the CMake code, the build will not fail,

Err... it may fail because:
- when an option is enabled in the .config, it will be force to ON in opencv.mk;
- when an option is disabled in the .config, it will be force to OFF in opencv.mk;
In the end, options set to OFF will take precedence, so some modules enabled in the .config won't be built.
The main problem with this is when another package depends on several opencv modules, these modules can be enabled in the .config, but not built, so the package build will fail.
I already fixed such failures in the past (don't remember what packages were involved, maybe gst-opencv-plugin).

Quoted 1 line

so why did you object to the previous iteration of Bernd's patch?

You mean this one [1]?
Because I think it was not the right way to fix this.

[1] http://patchwork.ozlabs.org/patch/611563/

Regards,

Signature · 1 line
Samuel
#7 lore raw

PATCH v2 2/2 package/opencv: module objdetect depends on imgproc

Quoted 11 lines · Samuel Martin
Quoted 9 lines · Thomas Petazzoni

Hello,

Quoted 5 lines · Samuel Martin
Quoted 3 lines

Can you comment on this one? I thought we had no expression of the interdependencies between OpenCV modules. Are those interdependencies build-time dependencies or run-time dependencies?

In opencv(2) we don't, in opencv3 we do.

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

I did the work on opencv3 when bumping the package, but did not take the time to do it on opencv(2) after we reverted it.

These interdependencies are build-time deps., they are already expressed in the cmake code.
One just needs to extract the info and report it in the Config.in. I'll check if I can quickly dig up something about this on the opencv(2) package.

After reviving [2] and updated it, I got these inter-module dependency relations on opencv-2.4.12.3: [3]

[2] http://patchwork.ozlabs.org/patch/481711/
[3] http://code.bulix.org/wcn76o-96974?raw

Regards,

Quoted 26 lines
Quoted 3 lines

If they are already expressed in the CMake code, the build will not fail,

Err... it may fail because:
- when an option is enabled in the .config, it will be force to ON in opencv.mk;
- when an option is disabled in the .config, it will be force to OFF in opencv.mk;
In the end, options set to OFF will take precedence, so some modules enabled in the .config won't be built.
The main problem with this is when another package depends on several opencv modules, these modules can be enabled in the .config, but not built, so the package build will fail.
I already fixed such failures in the past (don't remember what packages were involved, maybe gst-opencv-plugin).

Quoted 1 line

so why did you object to the previous iteration of Bernd's patch?

You mean this one [1]?
Because I think it was not the right way to fix this.

[1] http://patchwork.ozlabs.org/patch/611563/

Regards,

--
Samuel

Signature · 1 line
Samuel
#8 lore raw

PATCH v2 2/2 package/opencv: module objdetect depends on imgproc

In reply to Samuel Martin

Hello,

Quoted 4 lines · Samuel Martin

Err... it may fail because:
- when an option is enabled in the .config, it will be force to ON in opencv.mk;
- when an option is disabled in the .config, it will be force to OFF in opencv.mk;

And this takes precedence over what the CMake logic thinks the dependencies should be?

If that is the case, then we should have tons of OpenCV build failures in the autobuilders due to random configurations that end up making a selection of BR2_PACKAGE_OPENCV_* options that don't match the build time requirements of OpenCV, no?

Quoted 2 lines

In the end, options set to OFF will take precedence, so some modules enabled in the .config won't be built.

Ah, okay that's how it works. If you force set something to OFF, and that thing is needed for another thing that is set to ON, this last thing will not be build.

I.e if featureA depends on featureB at build-time in the CMake logic, but Buildroot does featureA=ON featureB=OFF, then featureA will in fact not be built.

If that's the case, then indeed we need to replicate the inter-module dependencies in Buildroot at the Config.in level.

Quoted 3 lines

The main problem with this is when another package depends on several opencv modules, these modules can be enabled in the .config, but not built, so the package build will fail.

Right, understood.

Quoted 3 lines
Quoted 1 line

so why did you object to the previous iteration of Bernd's patch?

You mean this one [1]?
Because I think it was not the right way to fix this.

Yes, as per your explanation, I understand.

What about http://patchwork.ozlabs.org/patch/611881/ ?

Thanks!

Thomas

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

PATCH v2 2/2 package/opencv: module objdetect depends on imgproc

Quoted 11 lines · Thomas Petazzoni

Hello,

Quoted 4 lines · Samuel Martin

Err... it may fail because:
- when an option is enabled in the .config, it will be force to ON in opencv.mk;
- when an option is disabled in the .config, it will be force to OFF in opencv.mk;

And this takes precedence over what the CMake logic thinks the dependencies should be?

Yes

Quoted 5 lines

If that is the case, then we should have tons of OpenCV build failures in the autobuilders due to random configurations that end up making a selection of BR2_PACKAGE_OPENCV_* options that don't match the build time requirements of OpenCV, no?

We already got few, fortunately so far only 2 packages depend on opencv modules (gst1-plugins-bad and vlc).

Quoted 8 lines
Quoted 3 lines

In the end, options set to OFF will take precedence, so some modules enabled in the .config won't be built.

Ah, okay that's how it works. If you force set something to OFF, and that thing is needed for another thing that is set to ON, this last thing will not be build.

Quoted 6 lines

I.e if featureA depends on featureB at build-time in the CMake logic, but Buildroot does featureA=ON featureB=OFF, then featureA will in fact not be built.

If that's the case, then indeed we need to replicate the inter-module dependencies in Buildroot at the Config.in level.

That's exactly what has been done in the opencv3 package.

Quoted 7 lines
Quoted 4 lines

The main problem with this is when another package depends on several opencv modules, these modules can be enabled in the .config, but not built, so the package build will fail.

Right, understood.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

so why did you object to the previous iteration of Bernd's patch?

You mean this one [1]?
Because I think it was not the right way to fix this.

Yes, as per your explanation, I understand.

What about http://patchwork.ozlabs.org/patch/611881/ ?

Not complete for opencv, but enough for freeswitch.

Quoted 2 lines

Thanks!

You're welcome

Regards,

Signature · 1 line
Samuel