Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/2] package/freeswitch: mod_cv needs BR2_PACKAGE_OPENCV_LIB_OBJDETECT
@ 2016-04-18 15:11 Bernd Kuhls
  2016-04-18 15:11 ` [Buildroot] [PATCH v2 2/2] package/opencv: module objdetect depends on imgproc Bernd Kuhls
  0 siblings, 1 reply; 10+ messages in thread
From: Bernd Kuhls @ 2016-04-18 15:11 UTC (permalink / raw)
  To: buildroot

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/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
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(+)

diff --git a/package/freeswitch/Config.in b/package/freeswitch/Config.in
index 1350b2b..6912a1e 100644
--- a/package/freeswitch/Config.in
+++ b/package/freeswitch/Config.in
@@ -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
-- 
2.8.0.rc3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/opencv: module objdetect depends on imgproc
  2016-04-18 15:11 [Buildroot] [PATCH v2 1/2] package/freeswitch: mod_cv needs BR2_PACKAGE_OPENCV_LIB_OBJDETECT Bernd Kuhls
@ 2016-04-18 15:11 ` Bernd Kuhls
  2016-04-18 19:20   ` Thomas Petazzoni
  0 siblings, 1 reply; 10+ messages in thread
From: Bernd Kuhls @ 2016-04-18 15:11 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: initial release (Samuel)

 package/opencv/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 8bc6c34..d87ca00 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -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.
 
-- 
2.8.0.rc3

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/opencv: module objdetect depends on imgproc
  2016-04-18 15:11 ` [Buildroot] [PATCH v2 2/2] package/opencv: module objdetect depends on imgproc Bernd Kuhls
@ 2016-04-18 19:20   ` Thomas Petazzoni
  2016-04-18 19:57     ` Samuel Martin
  0 siblings, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2016-04-18 19:20 UTC (permalink / raw)
  To: buildroot

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

On Mon, 18 Apr 2016 17:11:15 +0200, Bernd Kuhls wrote:
> 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.
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v2: initial release (Samuel)
> 
>  package/opencv/Config.in | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 8bc6c34..d87ca00 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/opencv: module objdetect depends on imgproc
  2016-04-18 19:20   ` Thomas Petazzoni
@ 2016-04-18 19:57     ` Samuel Martin
  2016-04-18 20:07       ` Bernd Kuhls
  2016-04-18 20:21       ` Thomas Petazzoni
  0 siblings, 2 replies; 10+ messages in thread
From: Samuel Martin @ 2016-04-18 19:57 UTC (permalink / raw)
  To: buildroot

Hi all,

On Mon, Apr 18, 2016 at 9:20 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> 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,

>
> Bernd, if this patch is needed, then it should be the first patch in
> the series, not the second one.
>
> Thomas
>
> On Mon, 18 Apr 2016 17:11:15 +0200, Bernd Kuhls wrote:
>> 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.
>>
>> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
>> ---
>> v2: initial release (Samuel)
>>
>>  package/opencv/Config.in | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
>> index 8bc6c34..d87ca00 100644
>> --- a/package/opencv/Config.in
>> +++ b/package/opencv/Config.in
>> @@ -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



-- 
Samuel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/opencv: module objdetect depends on imgproc
  2016-04-18 19:57     ` Samuel Martin
@ 2016-04-18 20:07       ` Bernd Kuhls
  2016-04-18 20:21       ` Thomas Petazzoni
  1 sibling, 0 replies; 10+ messages in thread
From: Bernd Kuhls @ 2016-04-18 20:07 UTC (permalink / raw)
  To: buildroot

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

> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/opencv: module objdetect depends on imgproc
  2016-04-18 19:57     ` Samuel Martin
  2016-04-18 20:07       ` Bernd Kuhls
@ 2016-04-18 20:21       ` Thomas Petazzoni
  2016-04-18 21:18         ` Samuel Martin
  1 sibling, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2016-04-18 20:21 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 18 Apr 2016 21:57:49 +0200, Samuel Martin wrote:

> > 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.

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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/opencv: module objdetect depends on imgproc
  2016-04-18 20:21       ` Thomas Petazzoni
@ 2016-04-18 21:18         ` Samuel Martin
  2016-04-18 21:24           ` Samuel Martin
  2016-04-18 21:28           ` Thomas Petazzoni
  0 siblings, 2 replies; 10+ messages in thread
From: Samuel Martin @ 2016-04-18 21:18 UTC (permalink / raw)
  To: buildroot

On Mon, Apr 18, 2016 at 10:21 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Mon, 18 Apr 2016 21:57:49 +0200, Samuel Martin wrote:
>
>> > 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.
>
> 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).

> 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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/opencv: module objdetect depends on imgproc
  2016-04-18 21:18         ` Samuel Martin
@ 2016-04-18 21:24           ` Samuel Martin
  2016-04-18 21:28           ` Thomas Petazzoni
  1 sibling, 0 replies; 10+ messages in thread
From: Samuel Martin @ 2016-04-18 21:24 UTC (permalink / raw)
  To: buildroot

On Mon, Apr 18, 2016 at 11:18 PM, Samuel Martin <s.martin49@gmail.com> wrote:
> On Mon, Apr 18, 2016 at 10:21 PM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
>> Hello,
>>
>> On Mon, 18 Apr 2016 21:57:49 +0200, Samuel Martin wrote:
>>
>>> > 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.
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,

>>
>> 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).
>
>> 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



-- 
Samuel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/opencv: module objdetect depends on imgproc
  2016-04-18 21:18         ` Samuel Martin
  2016-04-18 21:24           ` Samuel Martin
@ 2016-04-18 21:28           ` Thomas Petazzoni
  2016-04-18 21:38             ` Samuel Martin
  1 sibling, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2016-04-18 21:28 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon, 18 Apr 2016 23:18:26 +0200, Samuel Martin wrote:

> 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?

> 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.

> 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.

> > 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
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Buildroot] [PATCH v2 2/2] package/opencv: module objdetect depends on imgproc
  2016-04-18 21:28           ` Thomas Petazzoni
@ 2016-04-18 21:38             ` Samuel Martin
  0 siblings, 0 replies; 10+ messages in thread
From: Samuel Martin @ 2016-04-18 21:38 UTC (permalink / raw)
  To: buildroot

On Mon, Apr 18, 2016 at 11:28 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Hello,
>
> On Mon, 18 Apr 2016 23:18:26 +0200, Samuel Martin wrote:
>
>> 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

>
> 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).

>
>> 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.
That's exactly what has been done in the opencv3 package.

>
>> 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.
>
>> > 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.

>
> Thanks!
You're welcome

Regards,

-- 
Samuel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-04-18 21:38 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-18 15:11 [Buildroot] [PATCH v2 1/2] package/freeswitch: mod_cv needs BR2_PACKAGE_OPENCV_LIB_OBJDETECT Bernd Kuhls
2016-04-18 15:11 ` [Buildroot] [PATCH v2 2/2] package/opencv: module objdetect depends on imgproc Bernd Kuhls
2016-04-18 19:20   ` Thomas Petazzoni
2016-04-18 19:57     ` Samuel Martin
2016-04-18 20:07       ` Bernd Kuhls
2016-04-18 20:21       ` Thomas Petazzoni
2016-04-18 21:18         ` Samuel Martin
2016-04-18 21:24           ` Samuel Martin
2016-04-18 21:28           ` Thomas Petazzoni
2016-04-18 21:38             ` Samuel Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox