* [Buildroot] [PATCH 1/2] libv4l: properly error out when one of the make step fails
@ 2012-10-14 18:18 Thomas Petazzoni
2012-10-14 18:18 ` [Buildroot] [PATCH 2/2] libv4l: decode-tm6000 requires libv4l2util Thomas Petazzoni
2012-10-14 18:53 ` [Buildroot] [PATCH 1/2] libv4l: properly error out when one of the make step fails Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2012-10-14 18:18 UTC (permalink / raw)
To: buildroot
In libv4l.mk, if there are multiple elements in $(LIBV4L_DIRS_y), they
are built in order, one after the other. However, our loop construct
doesn't take into account the fact that we should error out if one of
the steps failed.
A good illustration is having BR2_PACKAGE_LIBV4L_DECODE_TM6000 and
BR2_PACKAGE_LIBV4L_V4L2_CTL enabled. The build of decode-tm6000 will
fail, but the build will happily continue without stopping in libv4l.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/libv4l/libv4l.mk | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/libv4l/libv4l.mk b/package/libv4l/libv4l.mk
index 6c782b0..15e48ed 100644
--- a/package/libv4l/libv4l.mk
+++ b/package/libv4l/libv4l.mk
@@ -24,19 +24,19 @@ endif
define LIBV4L_BUILD_CMDS
for i in $(LIBV4L_DIRS_y); do \
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/$$i \
- $(LIBV4L_MAKE_OPTS); done
+ $(LIBV4L_MAKE_OPTS) || exit 1 ; done
endef
define LIBV4L_INSTALL_STAGING_CMDS
for i in $(LIBV4L_DIRS_y); do \
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/$$i \
- DESTDIR=$(STAGING_DIR) $(LIBV4L_MAKE_OPTS) install; done
+ DESTDIR=$(STAGING_DIR) $(LIBV4L_MAKE_OPTS) install || exit 1; done
endef
define LIBV4L_INSTALL_TARGET_CMDS
for i in $(LIBV4L_DIRS_y); do \
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)/$$i \
- DESTDIR=$(TARGET_DIR) $(LIBV4L_MAKE_OPTS) install; done
+ DESTDIR=$(TARGET_DIR) $(LIBV4L_MAKE_OPTS) install || exit 1; done
endef
$(eval $(generic-package))
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 2/2] libv4l: decode-tm6000 requires libv4l2util
2012-10-14 18:18 [Buildroot] [PATCH 1/2] libv4l: properly error out when one of the make step fails Thomas Petazzoni
@ 2012-10-14 18:18 ` Thomas Petazzoni
2012-10-14 18:53 ` [Buildroot] [PATCH 1/2] libv4l: properly error out when one of the make step fails Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2012-10-14 18:18 UTC (permalink / raw)
To: buildroot
The decode-tm6000 utility cannot build without the libv4l2util. If
this library is not available, the build breaks with:
decode_tm6000.o: In function `read_stream':
decode_tm6000.c:(.text+0x220): undefined reference to `v4l2_rcvbuf'
decode_tm6000.o: In function `main':
decode_tm6000.c:(.text+0x37c): undefined reference to `v4l2_open'
decode_tm6000.c:(.text+0x3cc): undefined reference to `v4l2_gettryset_fmt_cap'
decode_tm6000.c:(.text+0x424): undefined reference to `v4l2_getset_freq'
decode_tm6000.c:(.text+0x47c): undefined reference to `v4l2_mmap_bufs'
decode_tm6000.c:(.text+0x4a0): undefined reference to `v4l2_start_streaming'
See
http://autobuild.buildroot.org/results/207ed74d5e816309ef0dc82ecc8112b51788fdf6/build-end.log
We fix this by adding util/libv4l2util to the list of directories to
build when decode-tm6000 is enabled. The only other user of
libv4l2util is another utility called qv4l2, for which Buildroot has
no Config.in option, so we only handle the case of decode-tm6000 at
the moment.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/libv4l/libv4l.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/libv4l/libv4l.mk b/package/libv4l/libv4l.mk
index 15e48ed..0639505 100644
--- a/package/libv4l/libv4l.mk
+++ b/package/libv4l/libv4l.mk
@@ -11,7 +11,7 @@ LIBV4L_MAKE_OPTS = PREFIX=/usr
LIBV4L_DEPENDENCIES = jpeg
LIBV4L_DIRS_y += lib
-LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_DECODE_TM6000) += utils/decode_tm6000
+LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_DECODE_TM6000) += utils/libv4l2util utils/decode_tm6000
LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_IR_KEYTABLE) += utils/keytable
LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_V4L2_COMPLIANCE) += utils/v4l2-compliance
LIBV4L_DIRS_$(BR2_PACKAGE_LIBV4L_V4L2_CTL) += utils/v4l2-ctl
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/2] libv4l: properly error out when one of the make step fails
2012-10-14 18:18 [Buildroot] [PATCH 1/2] libv4l: properly error out when one of the make step fails Thomas Petazzoni
2012-10-14 18:18 ` [Buildroot] [PATCH 2/2] libv4l: decode-tm6000 requires libv4l2util Thomas Petazzoni
@ 2012-10-14 18:53 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2012-10-14 18:53 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> In libv4l.mk, if there are multiple elements in $(LIBV4L_DIRS_y), they
Thomas> are built in order, one after the other. However, our loop construct
Thomas> doesn't take into account the fact that we should error out if one of
Thomas> the steps failed.
Thomas> A good illustration is having BR2_PACKAGE_LIBV4L_DECODE_TM6000 and
Thomas> BR2_PACKAGE_LIBV4L_V4L2_CTL enabled. The build of decode-tm6000 will
Thomas> fail, but the build will happily continue without stopping in libv4l.
Committed both, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-10-14 18:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-14 18:18 [Buildroot] [PATCH 1/2] libv4l: properly error out when one of the make step fails Thomas Petazzoni
2012-10-14 18:18 ` [Buildroot] [PATCH 2/2] libv4l: decode-tm6000 requires libv4l2util Thomas Petazzoni
2012-10-14 18:53 ` [Buildroot] [PATCH 1/2] libv4l: properly error out when one of the make step fails Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox