package/dvb-apps: misc fixes
cover package/dvb-apps: misc fixes
Hello All!
This small series brings in a few fixes in dvb-apps.
Regards,
Yann E. MORIN.
The following changes since commit c8f0a823efdb3f195c475194dc7b3341502819c0
linux-headers: bump 3.2.x series (2017-11-27 09:25:46 +0100)
are available in the git repository at:
git://git.buildroot.org/~ymorin/git/buildroot.git
for you to fetch changes up to b41944cb6ef4b6daf470137dacad88f10717d833
package/dvb-apps: fix build with kernel headers >= 4.14 (2017-11-27 11:47:45 +0100)
----------------------------------------------------------------
Yann E. MORIN (3):
package/dvb-apps: fix build with some perl version package/dvb-apps: is not parallel-safe package/dvb-apps: fix build with kernel headers >= 4.14
...-utils-fix-build-with-kernel-headers-4.14.patch | 52 ++++++++++++++++++++++ package/dvb-apps/dvb-apps.mk | 4 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 package/dvb-apps/0005-utils-fix-build-with-kernel-headers-4.14.patch
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/3 package/dvb-apps: fix build with some perl version
perl can't find a module that is located in the current directory, so help it locate it.
---
Note: I have no idea why perl on my machine does not find that file, while it does on all the autobuilders so far... I just assume that this is a perl version issue, but I may very well be wrong. Fran?ois ?
--- package/dvb-apps/dvb-apps.mk | 2 ++ 1 file changed, 2 insertions(+)
package/dvb-apps/dvb-apps.mk +2 -0
@@ -15,6 +15,8 @@ DVB_APPS_DEPENDENCIES = libiconv DVB_APPS_LDLIBS += -liconv endif +DVB_APPS_MAKE_OPTS = PERL5LIB=$(@D)/util/scan + ifeq ($(BR2_STATIC_LIBS),y) DVB_APPS_MAKE_OPTS += enable_shared=no else ifeq ($(BR2_SHARED_LIBS),y)
Signature · 1 line
2.11.0
PATCH 1/3 package/dvb-apps: fix build with some perl version
Hi Yann,
Quoted 10 lines · Yann E. MORIN
perl can't find a module that is located in the current directory, so help it locate it.
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Francois Perrad <[email protected]>---
Note: I have no idea why perl on my machine does not find that file, while it does on all the autobuilders so far... I just assume that this is a perl version issue, but I may very well be wrong. Fran?ois ?
This might have something to do with the removal of current directory from @INC in Debian:
https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html
baruch
Quoted 17 lines
--- package/dvb-apps/dvb-apps.mk | 2 ++ 1 file changed, 2 insertions(+)package/dvb-apps/dvb-apps.mk +2
-0@@ -15,6 +15,8 @@ DVB_APPS_DEPENDENCIES = libiconv DVB_APPS_LDLIBS += -liconv endif +DVB_APPS_MAKE_OPTS = PERL5LIB=$(@D)/util/scan + ifeq ($(BR2_STATIC_LIBS),y) DVB_APPS_MAKE_OPTS += enable_shared=no else ifeq ($(BR2_SHARED_LIBS),y)
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH 1/3 package/dvb-apps: fix build with some perl version
Baruch, All,
On 2017-11-27 13:39 +0200, Baruch Siach spake thusly:
Quoted 12 lines · Yann E. MORIN
Quoted 10 lines
perl can't find a module that is located in the current directory, so help it locate it.
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Francois Perrad <[email protected]>---
Note: I have no idea why perl on my machine does not find that file, while it does on all the autobuilders so far... I just assume that this is a perl version issue, but I may very well be wrong. Fran?ois ?
Quoted 4 lines
This might have something to do with the removal of current directory from @INC in Debian:
https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html
Wee! So I was not so insane after all! ;-)
Thanks! :-)
Regards,
Yann E. MORIN.
Quoted 24 lines
baruch
Quoted 17 lines
--- package/dvb-apps/dvb-apps.mk | 2 ++ 1 file changed, 2 insertions(+)package/dvb-apps/dvb-apps.mk +2
-0@@ -15,6 +15,8 @@ DVB_APPS_DEPENDENCIES = libiconv DVB_APPS_LDLIBS += -liconv endif +DVB_APPS_MAKE_OPTS = PERL5LIB=$(@D)/util/scan + ifeq ($(BR2_STATIC_LIBS),y) DVB_APPS_MAKE_OPTS += enable_shared=no else ifeq ($(BR2_SHARED_LIBS),y)Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/3 package/dvb-apps: fix build with some perl version
In reply to Yann E. MORINQuoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
perl can't find a module that is located in the current directory, so help it locate it.
Quoted 7 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Francois Perrad <[email protected]>---
Note: I have no idea why perl on my machine does not find that file, while it does on all the autobuilders so far... I just assume that this is a perl version issue, but I may very well be wrong. Fran?ois ?
Committed to 2017.02.x and 2017.08.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/3 package/dvb-apps: is not parallel-safe
In reply to Yann E. MORINThis is invisible because the timings make it excessively difficult to hit, but the Makefile is inherently flawed for parallel build, as it contains:
$(objects): atsc_psip_section.c atsc_psip_section.h
atsc_psip_section.c atsc_psip_section.h:
perl section_generate.pl atsc_psip_section.pl
and the perl script section_generate.pl will create both the .c and .h files in one go, but given the construct above, there can be two such script that run in parallel, which can clobber the generated .c and/or .h files.
So, make dvb-apps a MAKE1 package.
---
The time to build increased by one third, from ~7.5s to ~10s, on a core-i7 quad-core, which is not much in the end, and totally acceptable.
--- package/dvb-apps/dvb-apps.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/dvb-apps/dvb-apps.mk +1 -1
@@ -27,7 +27,7 @@ DVB_APPS_INSTALL_STAGING = YES define DVB_APPS_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) LDLIBS="$(DVB_APPS_LDLIBS)" \ - $(MAKE) -C $(@D) CROSS_ROOT=$(STAGING_DIR) \ + $(MAKE1) -C $(@D) CROSS_ROOT=$(STAGING_DIR) \ $(DVB_APPS_MAKE_OPTS) endef
Signature · 1 line
2.11.0
PATCH 2/3 package/dvb-apps: is not parallel-safe
Quoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
This is invisible because the timings make it excessively difficult to hit, but the
Makefileis inherently flawed for parallel build, as it contains:$(objects):
atsc_psip_section.catsc_psip_section.h
atsc_psip_section.catsc_psip_section.h:
perl section_generate.pl atsc_psip_section.pland the perl script section_generate.pl will create both the .c and .h files in one go, but given the construct above, there can be two such script that run in parallel, which can clobber the generated .c and/or .h files.
Quoted 7 lines
So, make dvb-apps a MAKE1 package.
Signed-off-by "Yann E. MORIN" <[email protected]>---
The time to build increased by one third, from ~7.5s to ~10s, on a core-i7 quad-core, which is not much in the end, and totally acceptable.
Committed to 2017.02.x and 2017.08.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 2/3 package/dvb-apps: is not parallel-safe
Quoted 8 lines · Peter Korsgaard
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
This is invisible because the timings make it excessively difficult to hit, but the
Makefileis inherently flawed for parallel build, as it contains:$(objects): atsc_psip_section.c atsc_psip_section.h
Quoted 7 lines
Quoted 7 lines
atsc_psip_section.catsc_psip_section.h:
perl section_generate.pl atsc_psip_section.pland the perl script section_generate.pl will create both the .c and .h files in one go, but given the construct above, there can be two such script that run in parallel, which can clobber the generated .c and/or .h files.
I gather this is the common parallel build issue with a recipe that produces two outputs. This can be fixed by using a pattern rule for the recipe that produces multiple outputs.
%section.c %section.h: %section.pl
perl section_generate.pl $<
GNU make understands a pattern rule that produces multiple outputs to produce all of them via a single running of the rule.
Seems like a simple patch.
PATCH 3/3 package/dvb-apps: fix build with kernel headers >= 4.14
In reply to Yann E. MORINFixes:
http://autobuild.buildroot.org/results/708/708f11809b2cafc2a3375dc515803c87b376ed4d/ http://autobuild.buildroot.org/results/6e1/6e161926577355ced82426536227ddd2ba130f06/ [...]
---
Note: I'll send the patch upstream soonish, even though dvb-apps has not been touched since March 2014.
--- ...-utils-fix-build-with-kernel-headers-4.14.patch | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 package/dvb-apps/0005-utils-fix-build-with-kernel-headers-4.14.patch
package/dvb-apps/0005-utils-fix-build-with-kernel-headers-4.14.patch new file +52 -0
@@ -0,0 +1,52 @@ +# HG changeset patch +# User "Yann E. MORIN" <[email protected]> +# Date 1511772629 -3600 +# Mon Nov 27 09:50:29 2017 +0100 +# Branch yem/fixes +# Node ID 0848fa96c6eb13cf37249d317eff12cbd2f59ff7 +# Parent 3d43b280298c39a67d1d889e01e173f52c12da35 +utils: fix build with kernel headers >= 4.14 + +In kernel 4.14, CA_SET_PID was removed, in commit 833ff5e7feda (media: +ca.h: get rid of CA_SET_PID). + +Fix dst-util to not fail the build when this is missing. + +Fiuxes build failures such as: + http://autobuild.buildroot.org/results/708/708f11809b2cafc2a3375dc515803c87b376ed4d/build-end.log + http://autobuild.buildroot.org/results/e39/e3939d44376e92e8a35fb179d9890510334d8304/build-end.log + +Signed-off-by: "Yann E. MORIN" <[email protected]> + +diff --git a/util/dst-utils/dst_test.c b/util/dst-utils/dst_test.c +--- a/util/dst-utils/dst_test.c ++++ b/util/dst-utils/dst_test.c +@@ -111,6 +111,7 @@ + return 0; + } + ++#if defined CA_SET_PID + static int dst_set_pid(int cafd) + { + if ((ioctl(cafd, CA_SET_PID)) < 0) { +@@ -120,6 +121,7 @@ + + return 0; + } ++#endif + + static int dst_get_descr(int cafd) + { +@@ -230,8 +232,12 @@ + dst_reset(cafd); + break; + case 'p': ++#if defined CA_SET_PID + printf("%s: PID\n", __FUNCTION__); + dst_set_pid(cafd); ++#else ++ printf("%s: PID not supported\n", __FUNCTION__); ++#endif + break; + case 'g': + printf("%s: Get Desc\n", __FUNCTION__);
Signature · 1 line
2.11.0
cover package/dvb-apps: misc fixes
In reply to Yann E. MORINHello,
Quoted 4 lines · Yann E. MORIN
Yann E. MORIN (3):
package/dvb-apps: fix build with some perl version package/dvb-apps: is not parallel-safe package/dvb-apps: fix build with kernel headers >= 4.14
Series applied to master. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com