All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3] package/libv4l: no libv4lconvert helper support if no fork()
@ 2017-07-28 11:01 Hugues Fruchet
  2017-07-28 11:01 ` Hugues Fruchet
  0 siblings, 1 reply; 3+ messages in thread
From: Hugues Fruchet @ 2017-07-28 11:01 UTC (permalink / raw)
  To: buildroot

Build libv4lconvert helper support only when fork() is available.

Fixes [1]:
    CXXLD    v4l2-compliance
   .../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

---
Changes v2 -> v3:
  - revisit build error message as per Peter's comment
  - revisit patch suject as per Peter's comment
  - add Tested-by: Peter Seiderer <ps.report@gmx.net>

Changes v1 -> v2:
  - point to http://autobuild.buildroot.org build result
  - revisit Author & Signed-off-by


Hugues Fruchet (1):
  package/libv4l: no libv4lconvert helper support if no fork()

 ...lconvert-helper-support-only-when-fork-is.patch | 102 +++++++++++++++++++++
 1 file changed, 102 insertions(+)
 create mode 100644 package/libv4l/0010-Build-libv4lconvert-helper-support-only-when-fork-is.patch

-- 
1.9.1

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

* [Buildroot] [PATCH v3] package/libv4l: no libv4lconvert helper support if no fork()
  2017-07-28 11:01 [Buildroot] [PATCH v3] package/libv4l: no libv4lconvert helper support if no fork() Hugues Fruchet
@ 2017-07-28 11:01 ` Hugues Fruchet
  2017-07-28 22:54   ` Arnout Vandecappelle
  0 siblings, 1 reply; 3+ messages in thread
From: Hugues Fruchet @ 2017-07-28 11:01 UTC (permalink / raw)
  To: buildroot

Build libv4lconvert helper support only when fork()
is available.

Fixes [1]:
    CXXLD    v4l2-compliance
   .../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: Hugues Fruchet <hugues.fruchet@st.com>
Tested-by: Peter Seiderer <ps.report@gmx.net>
---
 ...lconvert-helper-support-only-when-fork-is.patch | 102 +++++++++++++++++++++
 1 file changed, 102 insertions(+)
 create mode 100644 package/libv4l/0010-Build-libv4lconvert-helper-support-only-when-fork-is.patch

diff --git a/package/libv4l/0010-Build-libv4lconvert-helper-support-only-when-fork-is.patch b/package/libv4l/0010-Build-libv4lconvert-helper-support-only-when-fork-is.patch
new file mode 100644
index 0000000..30a8bde
--- /dev/null
+++ b/package/libv4l/0010-Build-libv4lconvert-helper-support-only-when-fork-is.patch
@@ -0,0 +1,102 @@
+From 91e7e4f4765780786e1479d28a70982adea256fc Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Date: Tue, 25 Jul 2017 21:04:35 +0200
+Subject: [PATCH] Build libv4lconvert helper support only when fork() is
+ available
+
+Upstream: https://git.linuxtv.org/v4l-utils.git/commit/?id=ed6eeee5f7dbc5b1b5b9263ae9281665d3fbe105
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+---
+ configure.ac                      | 3 +++
+ lib/libv4lconvert/Makefile.am     | 7 ++++++-
+ lib/libv4lconvert/libv4lconvert.c | 6 ++++++
+ 3 files changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index ae8f2e2..72c9421 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -299,6 +299,9 @@ argp_saved_libs=$LIBS
+   AC_SUBST([ARGP_LIBS])
+ LIBS=$argp_saved_libs
+ 
++AC_CHECK_FUNCS([fork], AC_DEFINE([HAVE_LIBV4LCONVERT_HELPERS],[1],[whether to use libv4lconvert helpers]))
++AM_CONDITIONAL([HAVE_LIBV4LCONVERT_HELPERS], [test x$ac_cv_func_fork = xyes])
++
+ AC_CHECK_HEADER([linux/i2c-dev.h], [linux_i2c_dev=yes], [linux_i2c_dev=no])
+ AM_CONDITIONAL([HAVE_LINUX_I2C_DEV], [test x$linux_i2c_dev = xyes])
+ 
+diff --git a/lib/libv4lconvert/Makefile.am b/lib/libv4lconvert/Makefile.am
+index 4f332fa..f266f3e 100644
+--- a/lib/libv4lconvert/Makefile.am
++++ b/lib/libv4lconvert/Makefile.am
+@@ -1,6 +1,8 @@
+ if WITH_DYN_LIBV4L
+ lib_LTLIBRARIES = libv4lconvert.la
++if HAVE_LIBV4LCONVERT_HELPERS
+ libv4lconvertpriv_PROGRAMS = ov511-decomp ov518-decomp
++endif
+ include_HEADERS = ../include/libv4lconvert.h
+ pkgconfig_DATA = libv4lconvert.pc
+ LIBV4LCONVERT_VERSION = -version-info 0
+@@ -16,11 +18,14 @@ libv4lconvert_la_SOURCES = \
+   control/libv4lcontrol.c control/libv4lcontrol.h control/libv4lcontrol-priv.h \
+   processing/libv4lprocessing.c processing/whitebalance.c processing/autogain.c \
+   processing/gamma.c processing/libv4lprocessing.h processing/libv4lprocessing-priv.h \
+-  helper.c helper-funcs.h libv4lconvert-priv.h libv4lsyscall-priv.h \
++  helper-funcs.h libv4lconvert-priv.h libv4lsyscall-priv.h \
+   tinyjpeg.h tinyjpeg-internal.h
+ if HAVE_JPEG
+ libv4lconvert_la_SOURCES += jpeg_memsrcdest.c jpeg_memsrcdest.h
+ endif
++if HAVE_LIBV4LCONVERT_HELPERS
++libv4lconvert_la_SOURCES += helper.c
++endif
+ libv4lconvert_la_CPPFLAGS = $(CFLAG_VISIBILITY) $(ENFORCE_LIBV4L_STATIC)
+ libv4lconvert_la_LDFLAGS = $(LIBV4LCONVERT_VERSION) -lrt -lm $(JPEG_LIBS) $(ENFORCE_LIBV4L_STATIC)
+ 
+diff --git a/lib/libv4lconvert/libv4lconvert.c b/lib/libv4lconvert/libv4lconvert.c
+index d60774e..1a5ccec 100644
+--- a/lib/libv4lconvert/libv4lconvert.c
++++ b/lib/libv4lconvert/libv4lconvert.c
+@@ -122,8 +122,10 @@ static const struct v4lconvert_pixfmt supported_src_pixfmts[] = {
+ 	{ V4L2_PIX_FMT_JPEG,		 0,	 7,	 7,	0 },
+ 	{ V4L2_PIX_FMT_PJPG,		 0,	 7,	 7,	1 },
+ 	{ V4L2_PIX_FMT_JPGL,		 0,	 7,	 7,	1 },
++#ifdef HAVE_LIBV4LCONVERT_HELPERS
+ 	{ V4L2_PIX_FMT_OV511,		 0,	 7,	 7,	1 },
+ 	{ V4L2_PIX_FMT_OV518,		 0,	 7,	 7,	1 },
++#endif
+ 	/* uncompressed bayer */
+ 	{ V4L2_PIX_FMT_SBGGR8,		 8,	 8,	 8,	0 },
+ 	{ V4L2_PIX_FMT_SGBRG8,		 8,	 8,	 8,	0 },
+@@ -278,7 +280,9 @@ void v4lconvert_destroy(struct v4lconvert_data *data)
+ 	if (data->cinfo_initialized)
+ 		jpeg_destroy_decompress(&data->cinfo);
+ #endif // HAVE_JPEG
++#ifdef HAVE_LIBV4LCONVERT_HELPERS
+ 	v4lconvert_helper_cleanup(data);
++#endif
+ 	free(data->convert1_buf);
+ 	free(data->convert2_buf);
+ 	free(data->rotate90_buf);
+@@ -833,6 +837,7 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data,
+ 				return -1;
+ 			}
+ 			break;
++#ifdef HAVE_LIBV4LCONVERT_HELPERS
+ 		case V4L2_PIX_FMT_OV511:
+ 			if (v4lconvert_helper_decompress(data, LIBV4LCONVERT_PRIV_DIR "/ov511-decomp",
+ 						src, src_size, d, d_size, width, height, yvu)) {
+@@ -849,6 +854,7 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data,
+ 				return -1;
+ 			}
+ 			break;
++#endif
+ 		}
+ 
+ 		switch (dest_pix_fmt) {
+-- 
+1.9.1
+
-- 
1.9.1

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

* [Buildroot] [PATCH v3] package/libv4l: no libv4lconvert helper support if no fork()
  2017-07-28 11:01 ` Hugues Fruchet
@ 2017-07-28 22:54   ` Arnout Vandecappelle
  0 siblings, 0 replies; 3+ messages in thread
From: Arnout Vandecappelle @ 2017-07-28 22:54 UTC (permalink / raw)
  To: buildroot



On 28-07-17 13:01, Hugues Fruchet wrote:
> Build libv4lconvert helper support only when fork()
> is available.
> 
> Fixes [1]:
>     CXXLD    v4l2-compliance
>    .../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: Hugues Fruchet <hugues.fruchet@st.com>
> Tested-by: Peter Seiderer <ps.report@gmx.net>

 Applied to master, thanks.

 Note that for a series of a single patch, there is really no need to have a
cover letter. Also it's more convenient to read the patch history directly in
the patch itself rather than in a separate mail.

 Regards,
 Arnout


[snip]

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-28 11:01 [Buildroot] [PATCH v3] package/libv4l: no libv4lconvert helper support if no fork() Hugues Fruchet
2017-07-28 11:01 ` Hugues Fruchet
2017-07-28 22:54   ` Arnout Vandecappelle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.