Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms
@ 2017-07-11 17:26 Peter Seiderer
  2017-07-11 21:13 ` Thomas Petazzoni
  2017-07-17 10:07 ` Hugues FRUCHET
  0 siblings, 2 replies; 12+ messages in thread
From: Peter Seiderer @ 2017-07-11 17:26 UTC (permalink / raw)
  To: buildroot

Fixes [1]:

    CXXLD    v4l2-compliance
  .../output/build/libv4l-1.12.5/lib/libv4lconvert/.libs/libv4lconvert.so: undefined reference to `fork'
  collect2: error: ld returned 1 exit status

[1] http://autobuild.buildroot.net/results/7e8/7e8fbd99a8c091d7bbeedd16066297682bbe29fe

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
The libv4l build for noMMU platforms was enabled with commit 'package/libv4l:
allow build of v4l2 utilities on noMMU platforms' (see [2]). But libv4lconvert uses
fork internally, so all utils linking against fail to build. Fix this by disabling
the utils on noMMU platforms (so keep building all libraries).

Alternatives would be:

- disable libv4l on all noMMU platforms (not only the utils), revert a part
  of commit [2]

- create a patch to disable only libv4lconvert (and all dependend utils)
  on noMMU platforms

[2] https://git.buildroot.net/buildroot/commit/?id=f837251785e9389f53d695ddb8a094707865171b
---
 package/libv4l/Config.in | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/libv4l/Config.in b/package/libv4l/Config.in
index e7f78dc70f..61c290f251 100644
--- a/package/libv4l/Config.in
+++ b/package/libv4l/Config.in
@@ -19,6 +19,7 @@ comment "libv4l JPEG support not enabled"
 
 config BR2_PACKAGE_LIBV4L_UTILS
 	bool "v4l-utils tools"
+	depends on BR2_USE_MMU # fork(), used in libv4lconvert linked by various utils eg. v4l2-compliance
 	help
 	  v4l-utils is a collection of various video4linux and DVB utilities.
 	  Enable this if you want to build the following tools:
-- 
2.11.0

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

* [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms
  2017-07-11 17:26 [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms Peter Seiderer
@ 2017-07-11 21:13 ` Thomas Petazzoni
  2017-07-17 10:07 ` Hugues FRUCHET
  1 sibling, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2017-07-11 21:13 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 11 Jul 2017 19:26:24 +0200, Peter Seiderer wrote:
> Fixes [1]:
> 
>     CXXLD    v4l2-compliance
>   .../output/build/libv4l-1.12.5/lib/libv4lconvert/.libs/libv4lconvert.so: undefined reference to `fork'
>   collect2: error: ld returned 1 exit status
> 
> [1] http://autobuild.buildroot.net/results/7e8/7e8fbd99a8c091d7bbeedd16066297682bbe29fe
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> The libv4l build for noMMU platforms was enabled with commit 'package/libv4l:
> allow build of v4l2 utilities on noMMU platforms' (see [2]). But libv4lconvert uses
> fork internally, so all utils linking against fail to build. Fix this by disabling
> the utils on noMMU platforms (so keep building all libraries).
> 
> Alternatives would be:
> 
> - disable libv4l on all noMMU platforms (not only the utils), revert a part
>   of commit [2]
> 
> - create a patch to disable only libv4lconvert (and all dependend utils)
>   on noMMU platforms
> 
> [2] https://git.buildroot.net/buildroot/commit/?id=f837251785e9389f53d695ddb8a094707865171b

Hugues, could you comment on this, since you originally re-enabled
libv4l for noMMU architectures ?

Thanks!

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

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

* [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms
  2017-07-11 17:26 [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms Peter Seiderer
  2017-07-11 21:13 ` Thomas Petazzoni
@ 2017-07-17 10:07 ` Hugues FRUCHET
  2017-07-17 18:09   ` Peter Seiderer
  1 sibling, 1 reply; 12+ messages in thread
From: Hugues FRUCHET @ 2017-07-17 10:07 UTC (permalink / raw)
  To: buildroot

Hi Peter,

I have tested on STM32 platform running Cortex F family having no MMU, 
shared libraries are disabled (no dlopen) and no fork supported on our 
setup.

libv4lconvert should not have been built at all, because entire lib/ 
folder build is conditional to shared library support:
* configure.ac
AM_CONDITIONAL([WITH_LIBV4L],       [test x$enable_libv4l    != xno -a 
x$enable_shared != xno])
* Makefile.am
[...]
+if WITH_LIBV4L
+SUBDIRS += lib
+endif

But checking your log I see that --enable-shared is set, so it seems 
that you are supporting shared libraries on no-MMU platform but without 
fork() support, is my understanding correct ?

What you can do to fix build is to force disabling of libs inside libv4l 
package:

package/libv4l/libv4l.mk
+ifeq ($(BR2_USE_MMU),)
+LIBV4L_CONF_OPTS += --disable-libv4l
+endif

Hoping that helps.

Best regards,
Hugues.

On 07/11/2017 07:26 PM, Peter Seiderer wrote:
> Fixes [1]:
> 
>      CXXLD    v4l2-compliance
>    .../output/build/libv4l-1.12.5/lib/libv4lconvert/.libs/libv4lconvert.so: undefined reference to `fork'
>    collect2: error: ld returned 1 exit status
> 
> [1] http://autobuild.buildroot.net/results/7e8/7e8fbd99a8c091d7bbeedd16066297682bbe29fe
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> The libv4l build for noMMU platforms was enabled with commit 'package/libv4l:
> allow build of v4l2 utilities on noMMU platforms' (see [2]). But libv4lconvert uses
> fork internally, so all utils linking against fail to build. Fix this by disabling
> the utils on noMMU platforms (so keep building all libraries).
> 
> Alternatives would be:
> 
> - disable libv4l on all noMMU platforms (not only the utils), revert a part
>    of commit [2]
> 
> - create a patch to disable only libv4lconvert (and all dependend utils)
>    on noMMU platforms
> 
> [2] https://git.buildroot.net/buildroot/commit/?id=f837251785e9389f53d695ddb8a094707865171b
> ---
>   package/libv4l/Config.in | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/package/libv4l/Config.in b/package/libv4l/Config.in
> index e7f78dc70f..61c290f251 100644
> --- a/package/libv4l/Config.in
> +++ b/package/libv4l/Config.in
> @@ -19,6 +19,7 @@ comment "libv4l JPEG support not enabled"
>   
>   config BR2_PACKAGE_LIBV4L_UTILS
>   	bool "v4l-utils tools"
> +	depends on BR2_USE_MMU # fork(), used in libv4lconvert linked by various utils eg. v4l2-compliance
>   	help
>   	  v4l-utils is a collection of various video4linux and DVB utilities.
>   	  Enable this if you want to build the following tools:
> 

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

* [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms
  2017-07-17 10:07 ` Hugues FRUCHET
@ 2017-07-17 18:09   ` Peter Seiderer
  2017-07-18  9:08     ` Hugues FRUCHET
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2017-07-17 18:09 UTC (permalink / raw)
  To: buildroot

Hello Hugues,

On Mon, 17 Jul 2017 10:07:07 +0000, Hugues FRUCHET <hugues.fruchet@st.com> wrote:

> Hi Peter,
> 
> I have tested on STM32 platform running Cortex F family having no MMU, 
> shared libraries are disabled (no dlopen) and no fork supported on our 
> setup.
> 
> libv4lconvert should not have been built at all, because entire lib/ 
> folder build is conditional to shared library support:
> * configure.ac
> AM_CONDITIONAL([WITH_LIBV4L],       [test x$enable_libv4l    != xno -a 
> x$enable_shared != xno])
> * Makefile.am
> [...]
> +if WITH_LIBV4L
> +SUBDIRS += lib
> +endif

A little bit confused, one of the patches you introduced changed it to:

- without WITH_LIBV4L: no libv4l libraries at all
- without WITH_DYN_LIBV4L: only static libraries, no dynamic libraries

And from configure --help:

  --disable-libv4l        disable libv4l compilation
  --disable-dyn-libv4l    disable dynamic libv4l support

> 
> But checking your log I see that --enable-shared is set, so it seems 
> that you are supporting shared libraries on no-MMU platform but without 
> fork() support, is my understanding correct ?
> 

Yes...

> What you can do to fix build is to force disabling of libs inside libv4l 
> package:
> 
> package/libv4l/libv4l.mk
> +ifeq ($(BR2_USE_MMU),)
> +LIBV4L_CONF_OPTS += --disable-libv4l
> +endif

Works, but feels wrong: A package named libv4l enabled and building/installing
nothing (except when LIBV4L_UTILS is enabled)...

Regards,
Peter

> 
> Hoping that helps.
> 
> Best regards,
> Hugues.
> 
> On 07/11/2017 07:26 PM, Peter Seiderer wrote:
> > Fixes [1]:
> > 
> >      CXXLD    v4l2-compliance
> >    .../output/build/libv4l-1.12.5/lib/libv4lconvert/.libs/libv4lconvert.so: undefined reference to `fork'
> >    collect2: error: ld returned 1 exit status
> > 
> > [1] http://autobuild.buildroot.net/results/7e8/7e8fbd99a8c091d7bbeedd16066297682bbe29fe
> > 
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ---
> > The libv4l build for noMMU platforms was enabled with commit 'package/libv4l:
> > allow build of v4l2 utilities on noMMU platforms' (see [2]). But libv4lconvert uses
> > fork internally, so all utils linking against fail to build. Fix this by disabling
> > the utils on noMMU platforms (so keep building all libraries).
> > 
> > Alternatives would be:
> > 
> > - disable libv4l on all noMMU platforms (not only the utils), revert a part
> >    of commit [2]
> > 
> > - create a patch to disable only libv4lconvert (and all dependend utils)
> >    on noMMU platforms
> > 
> > [2] https://git.buildroot.net/buildroot/commit/?id=f837251785e9389f53d695ddb8a094707865171b
> > ---
> >   package/libv4l/Config.in | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/package/libv4l/Config.in b/package/libv4l/Config.in
> > index e7f78dc70f..61c290f251 100644
> > --- a/package/libv4l/Config.in
> > +++ b/package/libv4l/Config.in
> > @@ -19,6 +19,7 @@ comment "libv4l JPEG support not enabled"
> >   
> >   config BR2_PACKAGE_LIBV4L_UTILS
> >   	bool "v4l-utils tools"
> > +	depends on BR2_USE_MMU # fork(), used in libv4lconvert linked by various utils eg. v4l2-compliance
> >   	help
> >   	  v4l-utils is a collection of various video4linux and DVB utilities.
> >   	  Enable this if you want to build the following tools:
> > 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms
  2017-07-17 18:09   ` Peter Seiderer
@ 2017-07-18  9:08     ` Hugues FRUCHET
  2017-07-22 19:44       ` Thomas Petazzoni
  2017-07-22 21:36       ` Peter Seiderer
  0 siblings, 2 replies; 12+ messages in thread
From: Hugues FRUCHET @ 2017-07-18  9:08 UTC (permalink / raw)
  To: buildroot

Hi Peter,

On 07/17/2017 08:09 PM, Peter Seiderer wrote:
> Hello Hugues,
> 
> On Mon, 17 Jul 2017 10:07:07 +0000, Hugues FRUCHET <hugues.fruchet@st.com> wrote:
> 
>> Hi Peter,
>>
>> I have tested on STM32 platform running Cortex F family having no MMU,
>> shared libraries are disabled (no dlopen) and no fork supported on our
>> setup.
>>
>> libv4lconvert should not have been built at all, because entire lib/
>> folder build is conditional to shared library support:
>> * configure.ac
>> AM_CONDITIONAL([WITH_LIBV4L],       [test x$enable_libv4l    != xno -a
>> x$enable_shared != xno])
>> * Makefile.am
>> [...]
>> +if WITH_LIBV4L
>> +SUBDIRS += lib
>> +endif
> 
> A little bit confused, one of the patches you introduced changed it to:
> 
> - without WITH_LIBV4L: no libv4l libraries at all
> - without WITH_DYN_LIBV4L: only static libraries, no dynamic libraries
> 
> And from configure --help:
> 
>    --disable-libv4l        disable libv4l compilation
>    --disable-dyn-libv4l    disable dynamic libv4l support

This package is named "libv4l" in buildroot but repo name is "v4l-utils" 
which contains:
1) some library plugins on top of V4L kernel interface in order to 
intercept user calls and hook/convert to the appropriate kernel call.
=> so called "libv4l" and located in "lib/" folder
2) some utilities located in "utils/" folder, such as the V4L compliancy 
tool "v4l2-compliance" or the CEC compliancy tool "cec-compliance" which 
are calling either the libv4l interface (default), the libv4l interface 
but statically linked inside utilities (--disable-dyn-libv4l) or the V4L 
kernel interface directly (--disable-libv4l).
Hope that helps to better understand the options.

> 
>>
>> But checking your log I see that --enable-shared is set, so it seems
>> that you are supporting shared libraries on no-MMU platform but without
>> fork() support, is my understanding correct ?
>>
> 
> Yes...
> 
>> What you can do to fix build is to force disabling of libs inside libv4l
>> package:
>>
>> package/libv4l/libv4l.mk
>> +ifeq ($(BR2_USE_MMU),)
>> +LIBV4L_CONF_OPTS += --disable-libv4l
>> +endif
> 
> Works, but feels wrong: A package named libv4l enabled and building/installing
> nothing (except when LIBV4L_UTILS is enabled)...

Right.
The aim of the no-MMU dependency removal patchset was to enable build of 
"utils" even on no-MMU platform. This is required to build at least the 
2 mandatory compliancy tools:
- v4l-compliance: its test report is required by V4L maintainers and is 
to be attached to the cover letter of any V4L driver pushed upstream.
- cec-compliance: the same for CEC drivers.


Please note that you cannot use the libv4l plugins mechanism without 
having fork() support, see libv4lconvert/helper.c, 
v4lconvert_helper_start().
Means that only V4L utilities can be currently supported on no-MMU 
platforms.

Back to your exact build issue, the best fix on my opinion is to add a 
dependency on fork() symbol in configure.ac instead of the one proposed 
in libv4l.mk, find attached a patch proposal.


Regards,
Hugues.
> 
> Regards,
> Peter
> 
>>
>> Hoping that helps.
>>
>> Best regards,
>> Hugues.
>>
>> On 07/11/2017 07:26 PM, Peter Seiderer wrote:
>>> Fixes [1]:
>>>
>>>       CXXLD    v4l2-compliance
>>>     .../output/build/libv4l-1.12.5/lib/libv4lconvert/.libs/libv4lconvert.so: undefined reference to `fork'
>>>     collect2: error: ld returned 1 exit status
>>>
>>> [1] http://autobuild.buildroot.net/results/7e8/7e8fbd99a8c091d7bbeedd16066297682bbe29fe
>>>
>>> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
>>> ---
>>> The libv4l build for noMMU platforms was enabled with commit 'package/libv4l:
>>> allow build of v4l2 utilities on noMMU platforms' (see [2]). But libv4lconvert uses
>>> fork internally, so all utils linking against fail to build. Fix this by disabling
>>> the utils on noMMU platforms (so keep building all libraries).
>>>
>>> Alternatives would be:
>>>
>>> - disable libv4l on all noMMU platforms (not only the utils), revert a part
>>>     of commit [2]
>>>
>>> - create a patch to disable only libv4lconvert (and all dependend utils)
>>>     on noMMU platforms
>>>
>>> [2] https://git.buildroot.net/buildroot/commit/?id=f837251785e9389f53d695ddb8a094707865171b
>>> ---
>>>    package/libv4l/Config.in | 1 +
>>>    1 file changed, 1 insertion(+)
>>>
>>> diff --git a/package/libv4l/Config.in b/package/libv4l/Config.in
>>> index e7f78dc70f..61c290f251 100644
>>> --- a/package/libv4l/Config.in
>>> +++ b/package/libv4l/Config.in
>>> @@ -19,6 +19,7 @@ comment "libv4l JPEG support not enabled"
>>>    
>>>    config BR2_PACKAGE_LIBV4L_UTILS
>>>    	bool "v4l-utils tools"
>>> +	depends on BR2_USE_MMU # fork(), used in libv4lconvert linked by various utils eg. v4l2-compliance
>>>    	help
>>>    	  v4l-utils is a collection of various video4linux and DVB utilities.
>>>    	  Enable this if you want to build the following tools:
>>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-configure.ac-disable-libv4l-if-no-fork.patch
Type: text/x-patch
Size: 1490 bytes
Desc: 0010-configure.ac-disable-libv4l-if-no-fork.patch
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170718/a60cefe5/attachment.bin>

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

* [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms
  2017-07-18  9:08     ` Hugues FRUCHET
@ 2017-07-22 19:44       ` Thomas Petazzoni
  2017-07-24  8:14         ` Hugues FRUCHET
  2017-07-22 21:36       ` Peter Seiderer
  1 sibling, 1 reply; 12+ messages in thread
From: Thomas Petazzoni @ 2017-07-22 19:44 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 18 Jul 2017 09:08:18 +0000, Hugues FRUCHET wrote:

> Back to your exact build issue, the best fix on my opinion is to add a 
> dependency on fork() symbol in configure.ac instead of the one proposed 
> in libv4l.mk, find attached a patch proposal.

Does your patch actually work? A lot of the utils in utils/ do require
the libraries, won't they fail to build if the libraries are not built ?

Could you make a clean patch submission to resolve this issue ?

Thanks,

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

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

* [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms
  2017-07-18  9:08     ` Hugues FRUCHET
  2017-07-22 19:44       ` Thomas Petazzoni
@ 2017-07-22 21:36       ` Peter Seiderer
  2017-07-24  8:08         ` Hugues FRUCHET
  1 sibling, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2017-07-22 21:36 UTC (permalink / raw)
  To: buildroot

Hello Hugues,

On Tue, 18 Jul 2017 09:08:18 +0000, Hugues FRUCHET <hugues.fruchet@st.com> wrote:

> Hi Peter,
> 
> On 07/17/2017 08:09 PM, Peter Seiderer wrote:
> > Hello Hugues,
> > 
> > On Mon, 17 Jul 2017 10:07:07 +0000, Hugues FRUCHET <hugues.fruchet@st.com> wrote:
> > 
> >> Hi Peter,
> >>
> >> I have tested on STM32 platform running Cortex F family having no MMU,
> >> shared libraries are disabled (no dlopen) and no fork supported on our
> >> setup.
> >>
> >> libv4lconvert should not have been built at all, because entire lib/
> >> folder build is conditional to shared library support:
> >> * configure.ac
> >> AM_CONDITIONAL([WITH_LIBV4L],       [test x$enable_libv4l    != xno -a
> >> x$enable_shared != xno])
> >> * Makefile.am
> >> [...]
> >> +if WITH_LIBV4L
> >> +SUBDIRS += lib
> >> +endif
> > 
> > A little bit confused, one of the patches you introduced changed it to:
> > 
> > - without WITH_LIBV4L: no libv4l libraries at all
> > - without WITH_DYN_LIBV4L: only static libraries, no dynamic libraries
> > 
> > And from configure --help:
> > 
> >    --disable-libv4l        disable libv4l compilation
> >    --disable-dyn-libv4l    disable dynamic libv4l support
> 
> This package is named "libv4l" in buildroot but repo name is "v4l-utils" 
> which contains:
> 1) some library plugins on top of V4L kernel interface in order to 
> intercept user calls and hook/convert to the appropriate kernel call.
> => so called "libv4l" and located in "lib/" folder
> 2) some utilities located in "utils/" folder, such as the V4L compliancy 
> tool "v4l2-compliance" or the CEC compliancy tool "cec-compliance" which 
> are calling either the libv4l interface (default), the libv4l interface 
> but statically linked inside utilities (--disable-dyn-libv4l) or the V4L 
> kernel interface directly (--disable-libv4l).
> Hope that helps to better understand the options.
> 
> > 
> >>
> >> But checking your log I see that --enable-shared is set, so it seems
> >> that you are supporting shared libraries on no-MMU platform but without
> >> fork() support, is my understanding correct ?
> >>
> > 
> > Yes...
> > 
> >> What you can do to fix build is to force disabling of libs inside libv4l
> >> package:
> >>
> >> package/libv4l/libv4l.mk
> >> +ifeq ($(BR2_USE_MMU),)
> >> +LIBV4L_CONF_OPTS += --disable-libv4l
> >> +endif
> > 
> > Works, but feels wrong: A package named libv4l enabled and building/installing
> > nothing (except when LIBV4L_UTILS is enabled)...
> 
> Right.
> The aim of the no-MMU dependency removal patchset was to enable build of 
> "utils" even on no-MMU platform. This is required to build at least the 
> 2 mandatory compliancy tools:
> - v4l-compliance: its test report is required by V4L maintainers and is 
> to be attached to the cover letter of any V4L driver pushed upstream.
> - cec-compliance: the same for CEC drivers.
> 
> 
> Please note that you cannot use the libv4l plugins mechanism without 
> having fork() support, see libv4lconvert/helper.c, 
> v4lconvert_helper_start().

Yes, but only libv4lconvert needs fork, all other libraries not...,
without fork support only libv4lconvert (and all dependent utils)
should not be built...

> Means that only V4L utilities can be currently supported on no-MMU 
> platforms.
> 
> Back to your exact build issue, the best fix on my opinion is to add a 
> dependency on fork() symbol in configure.ac instead of the one proposed 
> in libv4l.mk, find attached a patch proposal.

Patch did not work:

	$ make libv4l
[...]
compile time options summary
============================

    Host OS                    : linux-uclibc
    X11                        : no
    GL                         : no
    glu                        : no
    libjpeg                    : 
    libudev                    : no
    pthread                    : yes
    fork                       : no
    QT version                 : none
    ALSA support               : no

    build dynamic libs         : yes
    build static libs          : no

    gconv                      : no

    libv4l                     : yes
    dynamic libv4l             : yes
    v4l_plugins                : yes
    v4l_wrappers               : yes
    libdvbv5                   : no
    dvbv5-daemon               : no
    v4lutils                   : yes
    qv4l2                      : no
    v4l2-ctl uses libv4l       : yes
    v4l2-compliance uses libv4l: yes
[...]
helper.c: In function ?v4lconvert_helper_start?:
helper.c:64:25: warning: implicit declaration of function ?fork? [-Wimplicit-function-declaration]
  data->decompress_pid = fork();
                         ^~~~
[...]
  CXXLD    v4l2-compliance
.../build_bfin_libv4l_fix_fork_001/build/libv4l-1.12.5/lib/libv4lconvert/.libs/libv4lconvert.so: undefined reference to `fork'
collect2: error: ld returned 1 exit status

Regards,
Peter


> 
> 
> Regards,
> Hugues.
> > 
> > Regards,
> > Peter
> > 
> >>
> >> Hoping that helps.
> >>
> >> Best regards,
> >> Hugues.
> >>
> >> On 07/11/2017 07:26 PM, Peter Seiderer wrote:
> >>> Fixes [1]:
> >>>
> >>>       CXXLD    v4l2-compliance
> >>>     .../output/build/libv4l-1.12.5/lib/libv4lconvert/.libs/libv4lconvert.so: undefined reference to `fork'
> >>>     collect2: error: ld returned 1 exit status
> >>>
> >>> [1] http://autobuild.buildroot.net/results/7e8/7e8fbd99a8c091d7bbeedd16066297682bbe29fe
> >>>
> >>> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> >>> ---
> >>> The libv4l build for noMMU platforms was enabled with commit 'package/libv4l:
> >>> allow build of v4l2 utilities on noMMU platforms' (see [2]). But libv4lconvert uses
> >>> fork internally, so all utils linking against fail to build. Fix this by disabling
> >>> the utils on noMMU platforms (so keep building all libraries).
> >>>
> >>> Alternatives would be:
> >>>
> >>> - disable libv4l on all noMMU platforms (not only the utils), revert a part
> >>>     of commit [2]
> >>>
> >>> - create a patch to disable only libv4lconvert (and all dependend utils)
> >>>     on noMMU platforms
> >>>
> >>> [2] https://git.buildroot.net/buildroot/commit/?id=f837251785e9389f53d695ddb8a094707865171b
> >>> ---
> >>>    package/libv4l/Config.in | 1 +
> >>>    1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/package/libv4l/Config.in b/package/libv4l/Config.in
> >>> index e7f78dc70f..61c290f251 100644
> >>> --- a/package/libv4l/Config.in
> >>> +++ b/package/libv4l/Config.in
> >>> @@ -19,6 +19,7 @@ comment "libv4l JPEG support not enabled"
> >>>    
> >>>    config BR2_PACKAGE_LIBV4L_UTILS
> >>>    	bool "v4l-utils tools"
> >>> +	depends on BR2_USE_MMU # fork(), used in libv4lconvert linked by various utils eg. v4l2-compliance
> >>>    	help
> >>>    	  v4l-utils is a collection of various video4linux and DVB utilities.
> >>>    	  Enable this if you want to build the following tools:
> >>>
> >> _______________________________________________
> >> buildroot mailing list
> >> buildroot at busybox.net
> >> http://lists.busybox.net/mailman/listinfo/buildroot
> > 

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

* [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms
  2017-07-22 21:36       ` Peter Seiderer
@ 2017-07-24  8:08         ` Hugues FRUCHET
  2017-07-24 17:38           ` Peter Seiderer
  0 siblings, 1 reply; 12+ messages in thread
From: Hugues FRUCHET @ 2017-07-24  8:08 UTC (permalink / raw)
  To: buildroot

Hi Peter,

Sorry, typo in patch, this one should work as expected.

Best regards,
Hugues.

On 07/22/2017 11:36 PM, Peter Seiderer wrote:
> Hello Hugues,
> 
> On Tue, 18 Jul 2017 09:08:18 +0000, Hugues FRUCHET <hugues.fruchet@st.com> wrote:
> 
>> Hi Peter,
>>
>> On 07/17/2017 08:09 PM, Peter Seiderer wrote:
>>> Hello Hugues,
>>>
>>> On Mon, 17 Jul 2017 10:07:07 +0000, Hugues FRUCHET <hugues.fruchet@st.com> wrote:
>>>
>>>> Hi Peter,
>>>>
>>>> I have tested on STM32 platform running Cortex F family having no MMU,
>>>> shared libraries are disabled (no dlopen) and no fork supported on our
>>>> setup.
>>>>
>>>> libv4lconvert should not have been built at all, because entire lib/
>>>> folder build is conditional to shared library support:
>>>> * configure.ac
>>>> AM_CONDITIONAL([WITH_LIBV4L],       [test x$enable_libv4l    != xno -a
>>>> x$enable_shared != xno])
>>>> * Makefile.am
>>>> [...]
>>>> +if WITH_LIBV4L
>>>> +SUBDIRS += lib
>>>> +endif
>>>
>>> A little bit confused, one of the patches you introduced changed it to:
>>>
>>> - without WITH_LIBV4L: no libv4l libraries at all
>>> - without WITH_DYN_LIBV4L: only static libraries, no dynamic libraries
>>>
>>> And from configure --help:
>>>
>>>     --disable-libv4l        disable libv4l compilation
>>>     --disable-dyn-libv4l    disable dynamic libv4l support
>>
>> This package is named "libv4l" in buildroot but repo name is "v4l-utils"
>> which contains:
>> 1) some library plugins on top of V4L kernel interface in order to
>> intercept user calls and hook/convert to the appropriate kernel call.
>> => so called "libv4l" and located in "lib/" folder
>> 2) some utilities located in "utils/" folder, such as the V4L compliancy
>> tool "v4l2-compliance" or the CEC compliancy tool "cec-compliance" which
>> are calling either the libv4l interface (default), the libv4l interface
>> but statically linked inside utilities (--disable-dyn-libv4l) or the V4L
>> kernel interface directly (--disable-libv4l).
>> Hope that helps to better understand the options.
>>
>>>
>>>>
>>>> But checking your log I see that --enable-shared is set, so it seems
>>>> that you are supporting shared libraries on no-MMU platform but without
>>>> fork() support, is my understanding correct ?
>>>>
>>>
>>> Yes...
>>>
>>>> What you can do to fix build is to force disabling of libs inside libv4l
>>>> package:
>>>>
>>>> package/libv4l/libv4l.mk
>>>> +ifeq ($(BR2_USE_MMU),)
>>>> +LIBV4L_CONF_OPTS += --disable-libv4l
>>>> +endif
>>>
>>> Works, but feels wrong: A package named libv4l enabled and building/installing
>>> nothing (except when LIBV4L_UTILS is enabled)...
>>
>> Right.
>> The aim of the no-MMU dependency removal patchset was to enable build of
>> "utils" even on no-MMU platform. This is required to build at least the
>> 2 mandatory compliancy tools:
>> - v4l-compliance: its test report is required by V4L maintainers and is
>> to be attached to the cover letter of any V4L driver pushed upstream.
>> - cec-compliance: the same for CEC drivers.
>>
>>
>> Please note that you cannot use the libv4l plugins mechanism without
>> having fork() support, see libv4lconvert/helper.c,
>> v4lconvert_helper_start().
> 
> Yes, but only libv4lconvert needs fork, all other libraries not...,
> without fork support only libv4lconvert (and all dependent utils)
> should not be built...
> 
>> Means that only V4L utilities can be currently supported on no-MMU
>> platforms.
>>
>> Back to your exact build issue, the best fix on my opinion is to add a
>> dependency on fork() symbol in configure.ac instead of the one proposed
>> in libv4l.mk, find attached a patch proposal.
> 
> Patch did not work:
> 
> 	$ make libv4l
> [...]
> compile time options summary
> ============================
> 
>      Host OS                    : linux-uclibc
>      X11                        : no
>      GL                         : no
>      glu                        : no
>      libjpeg                    :
>      libudev                    : no
>      pthread                    : yes
>      fork                       : no
>      QT version                 : none
>      ALSA support               : no
> 
>      build dynamic libs         : yes
>      build static libs          : no
> 
>      gconv                      : no
> 
>      libv4l                     : yes
>      dynamic libv4l             : yes
>      v4l_plugins                : yes
>      v4l_wrappers               : yes
>      libdvbv5                   : no
>      dvbv5-daemon               : no
>      v4lutils                   : yes
>      qv4l2                      : no
>      v4l2-ctl uses libv4l       : yes
>      v4l2-compliance uses libv4l: yes
> [...]
> helper.c: In function ?v4lconvert_helper_start?:
> helper.c:64:25: warning: implicit declaration of function ?fork? [-Wimplicit-function-declaration]
>    data->decompress_pid = fork();
>                           ^~~~
> [...]
>    CXXLD    v4l2-compliance
> .../build_bfin_libv4l_fix_fork_001/build/libv4l-1.12.5/lib/libv4lconvert/.libs/libv4lconvert.so: undefined reference to `fork'
> collect2: error: ld returned 1 exit status
> 
> Regards,
> Peter
> 
> 
>>
>>
>> Regards,
>> Hugues.
>>>
>>> Regards,
>>> Peter
>>>
>>>>
>>>> Hoping that helps.
>>>>
>>>> Best regards,
>>>> Hugues.
>>>>
>>>> On 07/11/2017 07:26 PM, Peter Seiderer wrote:
>>>>> Fixes [1]:
>>>>>
>>>>>        CXXLD    v4l2-compliance
>>>>>      .../output/build/libv4l-1.12.5/lib/libv4lconvert/.libs/libv4lconvert.so: undefined reference to `fork'
>>>>>      collect2: error: ld returned 1 exit status
>>>>>
>>>>> [1] http://autobuild.buildroot.net/results/7e8/7e8fbd99a8c091d7bbeedd16066297682bbe29fe
>>>>>
>>>>> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
>>>>> ---
>>>>> The libv4l build for noMMU platforms was enabled with commit 'package/libv4l:
>>>>> allow build of v4l2 utilities on noMMU platforms' (see [2]). But libv4lconvert uses
>>>>> fork internally, so all utils linking against fail to build. Fix this by disabling
>>>>> the utils on noMMU platforms (so keep building all libraries).
>>>>>
>>>>> Alternatives would be:
>>>>>
>>>>> - disable libv4l on all noMMU platforms (not only the utils), revert a part
>>>>>      of commit [2]
>>>>>
>>>>> - create a patch to disable only libv4lconvert (and all dependend utils)
>>>>>      on noMMU platforms
>>>>>
>>>>> [2] https://git.buildroot.net/buildroot/commit/?id=f837251785e9389f53d695ddb8a094707865171b
>>>>> ---
>>>>>     package/libv4l/Config.in | 1 +
>>>>>     1 file changed, 1 insertion(+)
>>>>>
>>>>> diff --git a/package/libv4l/Config.in b/package/libv4l/Config.in
>>>>> index e7f78dc70f..61c290f251 100644
>>>>> --- a/package/libv4l/Config.in
>>>>> +++ b/package/libv4l/Config.in
>>>>> @@ -19,6 +19,7 @@ comment "libv4l JPEG support not enabled"
>>>>>     
>>>>>     config BR2_PACKAGE_LIBV4L_UTILS
>>>>>     	bool "v4l-utils tools"
>>>>> +	depends on BR2_USE_MMU # fork(), used in libv4lconvert linked by various utils eg. v4l2-compliance
>>>>>     	help
>>>>>     	  v4l-utils is a collection of various video4linux and DVB utilities.
>>>>>     	  Enable this if you want to build the following tools:
>>>>>
>>>> _______________________________________________
>>>> buildroot mailing list
>>>> buildroot at busybox.net
>>>> http://lists.busybox.net/mailman/listinfo/buildroot
>>>
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0010-configure.ac-disable-libv4l-if-no-fork.patch
Type: text/x-patch
Size: 1488 bytes
Desc: 0010-configure.ac-disable-libv4l-if-no-fork.patch
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170724/0fbd079b/attachment.bin>

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

* [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms
  2017-07-22 19:44       ` Thomas Petazzoni
@ 2017-07-24  8:14         ` Hugues FRUCHET
  0 siblings, 0 replies; 12+ messages in thread
From: Hugues FRUCHET @ 2017-07-24  8:14 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

On 07/22/2017 09:44 PM, Thomas Petazzoni wrote:
> Hello,
> 
> On Tue, 18 Jul 2017 09:08:18 +0000, Hugues FRUCHET wrote:
> 
>> Back to your exact build issue, the best fix on my opinion is to add a
>> dependency on fork() symbol in configure.ac instead of the one proposed
>> in libv4l.mk, find attached a patch proposal.
> 
> Does your patch actually work? A lot of the utils in utils/ do require
> the libraries, won't they fail to build if the libraries are not built ?
Those which depends on libraries won't be built, but some will remains 
built, as the compliancy tools. This was the aim of the initial patch.

> 
> Could you make a clean patch submission to resolve this issue ?
There was a typo in proposed patch, I've sent to Peter a fixed version.
When build is confirmed OK by Peter, I'll push to both V4L2 and 
buildroot lists.

> 
> Thanks,
> 
> Thomas
> 

BR,
Hugues.

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

* [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms
  2017-07-24  8:08         ` Hugues FRUCHET
@ 2017-07-24 17:38           ` Peter Seiderer
  2017-07-24 17:51             ` Peter Seiderer
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2017-07-24 17:38 UTC (permalink / raw)
  To: buildroot

Hello Hugues,

On Mon, 24 Jul 2017 08:08:45 +0000, Hugues FRUCHET <hugues.fruchet@st.com> wrote:

> Hi Peter,
> 
> Sorry, typo in patch, this one should work as expected.
> 
> Best regards,
> Hugues.
> 

Yes, the new version of the patch works:

	$ make libv4l
[...]
Applying 0010-configure.ac-disable-libv4l-if-no-fork.patch using patch:
[...]
compile time options summary
============================

    Host OS                    : linux-uclibc
    X11                        : no
    GL                         : no
    glu                        : no
    libjpeg                    :
    libudev                    : no
    pthread                    : yes
    fork                       : no
    QT version                 : none
    ALSA support               : no

    build dynamic libs         : yes
    build static libs          : no

    gconv                      : no

    libv4l                     : no
    dynamic libv4l             : yes
    v4l_plugins                : yes
    v4l_wrappers               : yes
    libdvbv5                   : no
    dvbv5-daemon               : no
    v4lutils                   : yes
    qv4l2                      : no
    v4l2-ctl uses libv4l       : yes
    v4l2-compliance uses libv4l: yes
[...]

	$ ls -ltr target/usr/bin/
[...]
-rwxr-xr-x 1 seiderer users 259172 Jul 24 19:29 decode_tm6000
-rwxr-xr-x 1 seiderer users  13988 Jul 24 19:29 ivtv-ctl
-rwxr-xr-x 1 seiderer users 198868 Jul 24 19:29 ir-ctl
-rwxr-xr-x 1 seiderer users  12240 Jul 24 19:29 cx18-ctl
-rwxr-xr-x 1 seiderer users 215068 Jul 24 19:29 ir-keytable
-rwxr-xr-x 1 seiderer users  53452 Jul 24 19:29 media-ctl
-rwxr-xr-x 1 seiderer users 206532 Jul 24 19:29 v4l2-compliance
-rwxr-xr-x 1 seiderer users 265676 Jul 24 19:29 v4l2-ctl
-rwxr-xr-x 1 seiderer users 188496 Jul 24 19:29 v4l2-sysfs-path
-rwxr-xr-x 1 seiderer users 154228 Jul 24 19:29 cec-ctl
-rwxr-xr-x 1 seiderer users 122344 Jul 24 19:29 cec-compliance
-rwxr-xr-x 1 seiderer users  69860 Jul 24 19:29 cec-follower

	$ ls -ltr target/usr/lib
drwxr-xr-x 3 seiderer users    4096 Jul 11 19:06 libv4l
-rwxr-xr-x 1 seiderer users   39408 Jul 11 19:06 libv4l2.so.0.0.0
-rwxr-xr-x 1 seiderer users   17032 Jul 11 19:06 libv4l1.so.0.0.0
-rwxr-xr-x 1 seiderer users  105432 Jul 11 19:06 libv4lconvert.so.0.0.0
-rwxr-xr-x 1 seiderer users   18384 Jul 11 19:06 libv4l2rds.so.0.0.0

Thanks for your efforts...

Regards,
Peter


> On 07/22/2017 11:36 PM, Peter Seiderer wrote:
> > Hello Hugues,
> > 
> > On Tue, 18 Jul 2017 09:08:18 +0000, Hugues FRUCHET <hugues.fruchet@st.com> wrote:
> > 
> >> Hi Peter,
> >>
> >> On 07/17/2017 08:09 PM, Peter Seiderer wrote:
> >>> Hello Hugues,
> >>>
> >>> On Mon, 17 Jul 2017 10:07:07 +0000, Hugues FRUCHET <hugues.fruchet@st.com> wrote:
> >>>
> >>>> Hi Peter,
> >>>>
> >>>> I have tested on STM32 platform running Cortex F family having no MMU,
> >>>> shared libraries are disabled (no dlopen) and no fork supported on our
> >>>> setup.
> >>>>
> >>>> libv4lconvert should not have been built at all, because entire lib/
> >>>> folder build is conditional to shared library support:
> >>>> * configure.ac
> >>>> AM_CONDITIONAL([WITH_LIBV4L],       [test x$enable_libv4l    != xno -a
> >>>> x$enable_shared != xno])
> >>>> * Makefile.am
> >>>> [...]
> >>>> +if WITH_LIBV4L
> >>>> +SUBDIRS += lib
> >>>> +endif
> >>>
> >>> A little bit confused, one of the patches you introduced changed it to:
> >>>
> >>> - without WITH_LIBV4L: no libv4l libraries at all
> >>> - without WITH_DYN_LIBV4L: only static libraries, no dynamic libraries
> >>>
> >>> And from configure --help:
> >>>
> >>>     --disable-libv4l        disable libv4l compilation
> >>>     --disable-dyn-libv4l    disable dynamic libv4l support
> >>
> >> This package is named "libv4l" in buildroot but repo name is "v4l-utils"
> >> which contains:
> >> 1) some library plugins on top of V4L kernel interface in order to
> >> intercept user calls and hook/convert to the appropriate kernel call.
> >> => so called "libv4l" and located in "lib/" folder
> >> 2) some utilities located in "utils/" folder, such as the V4L compliancy
> >> tool "v4l2-compliance" or the CEC compliancy tool "cec-compliance" which
> >> are calling either the libv4l interface (default), the libv4l interface
> >> but statically linked inside utilities (--disable-dyn-libv4l) or the V4L
> >> kernel interface directly (--disable-libv4l).
> >> Hope that helps to better understand the options.
> >>
> >>>
> >>>>
> >>>> But checking your log I see that --enable-shared is set, so it seems
> >>>> that you are supporting shared libraries on no-MMU platform but without
> >>>> fork() support, is my understanding correct ?
> >>>>
> >>>
> >>> Yes...
> >>>
> >>>> What you can do to fix build is to force disabling of libs inside libv4l
> >>>> package:
> >>>>
> >>>> package/libv4l/libv4l.mk
> >>>> +ifeq ($(BR2_USE_MMU),)
> >>>> +LIBV4L_CONF_OPTS += --disable-libv4l
> >>>> +endif
> >>>
> >>> Works, but feels wrong: A package named libv4l enabled and building/installing
> >>> nothing (except when LIBV4L_UTILS is enabled)...
> >>
> >> Right.
> >> The aim of the no-MMU dependency removal patchset was to enable build of
> >> "utils" even on no-MMU platform. This is required to build at least the
> >> 2 mandatory compliancy tools:
> >> - v4l-compliance: its test report is required by V4L maintainers and is
> >> to be attached to the cover letter of any V4L driver pushed upstream.
> >> - cec-compliance: the same for CEC drivers.
> >>
> >>
> >> Please note that you cannot use the libv4l plugins mechanism without
> >> having fork() support, see libv4lconvert/helper.c,
> >> v4lconvert_helper_start().
> > 
> > Yes, but only libv4lconvert needs fork, all other libraries not...,
> > without fork support only libv4lconvert (and all dependent utils)
> > should not be built...
> > 
> >> Means that only V4L utilities can be currently supported on no-MMU
> >> platforms.
> >>
> >> Back to your exact build issue, the best fix on my opinion is to add a
> >> dependency on fork() symbol in configure.ac instead of the one proposed
> >> in libv4l.mk, find attached a patch proposal.
> > 
> > Patch did not work:
> > 
> > 	$ make libv4l
> > [...]
> > compile time options summary
> > ============================
> > 
> >      Host OS                    : linux-uclibc
> >      X11                        : no
> >      GL                         : no
> >      glu                        : no
> >      libjpeg                    :
> >      libudev                    : no
> >      pthread                    : yes
> >      fork                       : no
> >      QT version                 : none
> >      ALSA support               : no
> > 
> >      build dynamic libs         : yes
> >      build static libs          : no
> > 
> >      gconv                      : no
> > 
> >      libv4l                     : yes
> >      dynamic libv4l             : yes
> >      v4l_plugins                : yes
> >      v4l_wrappers               : yes
> >      libdvbv5                   : no
> >      dvbv5-daemon               : no
> >      v4lutils                   : yes
> >      qv4l2                      : no
> >      v4l2-ctl uses libv4l       : yes
> >      v4l2-compliance uses libv4l: yes
> > [...]
> > helper.c: In function ?v4lconvert_helper_start?:
> > helper.c:64:25: warning: implicit declaration of function ?fork? [-Wimplicit-function-declaration]
> >    data->decompress_pid = fork();
> >                           ^~~~
> > [...]
> >    CXXLD    v4l2-compliance
> > .../build_bfin_libv4l_fix_fork_001/build/libv4l-1.12.5/lib/libv4lconvert/.libs/libv4lconvert.so: undefined reference to `fork'
> > collect2: error: ld returned 1 exit status
> > 
> > Regards,
> > Peter
> > 
> > 
> >>
> >>
> >> Regards,
> >> Hugues.
> >>>
> >>> Regards,
> >>> Peter
> >>>
> >>>>
> >>>> Hoping that helps.
> >>>>
> >>>> Best regards,
> >>>> Hugues.
> >>>>
> >>>> On 07/11/2017 07:26 PM, Peter Seiderer wrote:
> >>>>> Fixes [1]:
> >>>>>
> >>>>>        CXXLD    v4l2-compliance
> >>>>>      .../output/build/libv4l-1.12.5/lib/libv4lconvert/.libs/libv4lconvert.so: undefined reference to `fork'
> >>>>>      collect2: error: ld returned 1 exit status
> >>>>>
> >>>>> [1] http://autobuild.buildroot.net/results/7e8/7e8fbd99a8c091d7bbeedd16066297682bbe29fe
> >>>>>
> >>>>> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> >>>>> ---
> >>>>> The libv4l build for noMMU platforms was enabled with commit 'package/libv4l:
> >>>>> allow build of v4l2 utilities on noMMU platforms' (see [2]). But libv4lconvert uses
> >>>>> fork internally, so all utils linking against fail to build. Fix this by disabling
> >>>>> the utils on noMMU platforms (so keep building all libraries).
> >>>>>
> >>>>> Alternatives would be:
> >>>>>
> >>>>> - disable libv4l on all noMMU platforms (not only the utils), revert a part
> >>>>>      of commit [2]
> >>>>>
> >>>>> - create a patch to disable only libv4lconvert (and all dependend utils)
> >>>>>      on noMMU platforms
> >>>>>
> >>>>> [2] https://git.buildroot.net/buildroot/commit/?id=f837251785e9389f53d695ddb8a094707865171b
> >>>>> ---
> >>>>>     package/libv4l/Config.in | 1 +
> >>>>>     1 file changed, 1 insertion(+)
> >>>>>
> >>>>> diff --git a/package/libv4l/Config.in b/package/libv4l/Config.in
> >>>>> index e7f78dc70f..61c290f251 100644
> >>>>> --- a/package/libv4l/Config.in
> >>>>> +++ b/package/libv4l/Config.in
> >>>>> @@ -19,6 +19,7 @@ comment "libv4l JPEG support not enabled"
> >>>>>     
> >>>>>     config BR2_PACKAGE_LIBV4L_UTILS
> >>>>>     	bool "v4l-utils tools"
> >>>>> +	depends on BR2_USE_MMU # fork(), used in libv4lconvert linked by various utils eg. v4l2-compliance
> >>>>>     	help
> >>>>>     	  v4l-utils is a collection of various video4linux and DVB utilities.
> >>>>>     	  Enable this if you want to build the following tools:
> >>>>>
> >>>> _______________________________________________
> >>>> buildroot mailing list
> >>>> buildroot at busybox.net
> >>>> http://lists.busybox.net/mailman/listinfo/buildroot
> >>>
> > 

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

* [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms
  2017-07-24 17:38           ` Peter Seiderer
@ 2017-07-24 17:51             ` Peter Seiderer
  2017-07-25  7:54               ` Hugues FRUCHET
  0 siblings, 1 reply; 12+ messages in thread
From: Peter Seiderer @ 2017-07-24 17:51 UTC (permalink / raw)
  To: buildroot

Hello Hugues,

On Mon, 24 Jul 2017 19:38:22 +0200, Peter Seiderer <ps.report@gmx.net> wrote:

> Hello Hugues,
> 
> On Mon, 24 Jul 2017 08:08:45 +0000, Hugues FRUCHET <hugues.fruchet@st.com> wrote:
> 
> > Hi Peter,
> > 
> > Sorry, typo in patch, this one should work as expected.
> > 
> > Best regards,
> > Hugues.
> > 
> 
> Yes, the new version of the patch works:
> 
> 	$ make libv4l
> [...]
> Applying 0010-configure.ac-disable-libv4l-if-no-fork.patch using patch:
> [...]
> compile time options summary
> ============================
> 
>     Host OS                    : linux-uclibc
>     X11                        : no
>     GL                         : no
>     glu                        : no
>     libjpeg                    :
>     libudev                    : no
>     pthread                    : yes
>     fork                       : no
>     QT version                 : none
>     ALSA support               : no
> 
>     build dynamic libs         : yes
>     build static libs          : no
> 
>     gconv                      : no
> 
>     libv4l                     : no
>     dynamic libv4l             : yes
>     v4l_plugins                : yes
>     v4l_wrappers               : yes
>     libdvbv5                   : no
>     dvbv5-daemon               : no
>     v4lutils                   : yes
>     qv4l2                      : no
>     v4l2-ctl uses libv4l       : yes
>     v4l2-compliance uses libv4l: yes
> [...]
> 
> 	$ ls -ltr target/usr/bin/
> [...]
> -rwxr-xr-x 1 seiderer users 259172 Jul 24 19:29 decode_tm6000
> -rwxr-xr-x 1 seiderer users  13988 Jul 24 19:29 ivtv-ctl
> -rwxr-xr-x 1 seiderer users 198868 Jul 24 19:29 ir-ctl
> -rwxr-xr-x 1 seiderer users  12240 Jul 24 19:29 cx18-ctl
> -rwxr-xr-x 1 seiderer users 215068 Jul 24 19:29 ir-keytable
> -rwxr-xr-x 1 seiderer users  53452 Jul 24 19:29 media-ctl
> -rwxr-xr-x 1 seiderer users 206532 Jul 24 19:29 v4l2-compliance
> -rwxr-xr-x 1 seiderer users 265676 Jul 24 19:29 v4l2-ctl
> -rwxr-xr-x 1 seiderer users 188496 Jul 24 19:29 v4l2-sysfs-path
> -rwxr-xr-x 1 seiderer users 154228 Jul 24 19:29 cec-ctl
> -rwxr-xr-x 1 seiderer users 122344 Jul 24 19:29 cec-compliance
> -rwxr-xr-x 1 seiderer users  69860 Jul 24 19:29 cec-follower
> 
> 	$ ls -ltr target/usr/lib
> drwxr-xr-x 3 seiderer users    4096 Jul 11 19:06 libv4l
> -rwxr-xr-x 1 seiderer users   39408 Jul 11 19:06 libv4l2.so.0.0.0
> -rwxr-xr-x 1 seiderer users   17032 Jul 11 19:06 libv4l1.so.0.0.0
> -rwxr-xr-x 1 seiderer users  105432 Jul 11 19:06 libv4lconvert.so.0.0.0
> -rwxr-xr-x 1 seiderer users   18384 Jul 11 19:06 libv4l2rds.so.0.0.0
> 

Ups, mind the timestamps, libraries are from a previous build...with your
patch no libraries are build/installed...

Regards,
Peter

> Thanks for your efforts...
> 
> Regards,
> Peter
> 

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

* [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms
  2017-07-24 17:51             ` Peter Seiderer
@ 2017-07-25  7:54               ` Hugues FRUCHET
  0 siblings, 0 replies; 12+ messages in thread
From: Hugues FRUCHET @ 2017-07-25  7:54 UTC (permalink / raw)
  To: buildroot

Hi Peter,

On 07/24/2017 07:51 PM, Peter Seiderer wrote:
> Hello Hugues,
> 
> On Mon, 24 Jul 2017 19:38:22 +0200, Peter Seiderer <ps.report@gmx.net> wrote:
> 
>> Hello Hugues,
>>
>> On Mon, 24 Jul 2017 08:08:45 +0000, Hugues FRUCHET <hugues.fruchet@st.com> wrote:
>>
>>> Hi Peter,
>>>
>>> Sorry, typo in patch, this one should work as expected.
>>>
>>> Best regards,
>>> Hugues.
>>>
>>
>> Yes, the new version of the patch works:
>>
>> 	$ make libv4l
>> [...]
>> Applying 0010-configure.ac-disable-libv4l-if-no-fork.patch using patch:
>> [...]
>> compile time options summary
>> ============================
>>
>>      Host OS                    : linux-uclibc
>>      X11                        : no
>>      GL                         : no
>>      glu                        : no
>>      libjpeg                    :
>>      libudev                    : no
>>      pthread                    : yes
>>      fork                       : no
>>      QT version                 : none
>>      ALSA support               : no
>>
>>      build dynamic libs         : yes
>>      build static libs          : no
>>
>>      gconv                      : no
>>
>>      libv4l                     : no
>>      dynamic libv4l             : yes
>>      v4l_plugins                : yes
>>      v4l_wrappers               : yes
>>      libdvbv5                   : no
>>      dvbv5-daemon               : no
>>      v4lutils                   : yes
>>      qv4l2                      : no
>>      v4l2-ctl uses libv4l       : yes
>>      v4l2-compliance uses libv4l: yes
>> [...]
>>
>> 	$ ls -ltr target/usr/bin/
>> [...]
>> -rwxr-xr-x 1 seiderer users 259172 Jul 24 19:29 decode_tm6000
>> -rwxr-xr-x 1 seiderer users  13988 Jul 24 19:29 ivtv-ctl
>> -rwxr-xr-x 1 seiderer users 198868 Jul 24 19:29 ir-ctl
>> -rwxr-xr-x 1 seiderer users  12240 Jul 24 19:29 cx18-ctl
>> -rwxr-xr-x 1 seiderer users 215068 Jul 24 19:29 ir-keytable
>> -rwxr-xr-x 1 seiderer users  53452 Jul 24 19:29 media-ctl
>> -rwxr-xr-x 1 seiderer users 206532 Jul 24 19:29 v4l2-compliance
>> -rwxr-xr-x 1 seiderer users 265676 Jul 24 19:29 v4l2-ctl
>> -rwxr-xr-x 1 seiderer users 188496 Jul 24 19:29 v4l2-sysfs-path
>> -rwxr-xr-x 1 seiderer users 154228 Jul 24 19:29 cec-ctl
>> -rwxr-xr-x 1 seiderer users 122344 Jul 24 19:29 cec-compliance
>> -rwxr-xr-x 1 seiderer users  69860 Jul 24 19:29 cec-follower

That is OK, you have the compliancy tools.

>>
>> 	$ ls -ltr target/usr/lib
>> drwxr-xr-x 3 seiderer users    4096 Jul 11 19:06 libv4l
>> -rwxr-xr-x 1 seiderer users   39408 Jul 11 19:06 libv4l2.so.0.0.0
>> -rwxr-xr-x 1 seiderer users   17032 Jul 11 19:06 libv4l1.so.0.0.0
>> -rwxr-xr-x 1 seiderer users  105432 Jul 11 19:06 libv4lconvert.so.0.0.0
>> -rwxr-xr-x 1 seiderer users   18384 Jul 11 19:06 libv4l2rds.so.0.0.0
>>
> 
> Ups, mind the timestamps, libraries are from a previous build...with your
> patch no libraries are build/installed...

That is also intentional, no libv4l if no fork() & dlopen().

Please note that before the commit "package/libv4l: build of v4l2 
utilities on noMMU", nothing was built at all (utilities and libraries) 
on no-MMU platforms due to dependency on BR2_USE_MMU.

> 
> Regards,
> Peter
> 
>> Thanks for your efforts...
>>
>> Regards,
>> Peter
>>

Thanks for testing, I will push the fix now.

BR,
Hugues.

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

end of thread, other threads:[~2017-07-25  7:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-11 17:26 [Buildroot] [RFC v1] libv4l: build utils only on MMU (with fork support) platforms Peter Seiderer
2017-07-11 21:13 ` Thomas Petazzoni
2017-07-17 10:07 ` Hugues FRUCHET
2017-07-17 18:09   ` Peter Seiderer
2017-07-18  9:08     ` Hugues FRUCHET
2017-07-22 19:44       ` Thomas Petazzoni
2017-07-24  8:14         ` Hugues FRUCHET
2017-07-22 21:36       ` Peter Seiderer
2017-07-24  8:08         ` Hugues FRUCHET
2017-07-24 17:38           ` Peter Seiderer
2017-07-24 17:51             ` Peter Seiderer
2017-07-25  7:54               ` Hugues FRUCHET

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