All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/1] package/tvheadend: Fix static build
@ 2015-08-25 21:18 Bernd Kuhls
  2015-08-26 12:36 ` Yann E. MORIN
  2015-08-26 13:20 ` Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: Bernd Kuhls @ 2015-08-25 21:18 UTC (permalink / raw
  To: buildroot

Fixes
http://autobuild.buildroot.net/results/bd0/bd0e8619df7cd8f21da96ae470691b1ebb2f156c/
http://autobuild.buildroot.net/results/f1c/f1c40ac9dda5ceeb5665d021333058eb29828d62/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v2: Put everything in the if-static_libs-then clause (Jerzy)

 package/tvheadend/tvheadend.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/package/tvheadend/tvheadend.mk b/package/tvheadend/tvheadend.mk
index ec04e6f..29ecf4f 100644
--- a/package/tvheadend/tvheadend.mk
+++ b/package/tvheadend/tvheadend.mk
@@ -71,6 +71,14 @@ define TVHEADEND_CONFIGURE_CMDS
 	)
 endef
 
+ifeq ($(BR2_STATIC_LIBS),y)
+# remove hardcoded -ldl for static builds
+define TVHEADEND_FIX_MAKEFILE_FOR_STATIC_BUILD
+	$(SED) 's/-ldl -lpthread -lm/-lpthread -lm/' $(@D)/Makefile
+endef
+TVHEADEND_POST_CONFIGURE_HOOKS += TVHEADEND_FIX_MAKEFILE_FOR_STATIC_BUILD
+endif
+
 define TVHEADEND_BUILD_CMDS
 	$(MAKE) -C $(@D)
 endef
-- 
2.1.4

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

* [Buildroot] [PATCH v2 1/1] package/tvheadend: Fix static build
  2015-08-25 21:18 [Buildroot] [PATCH v2 1/1] package/tvheadend: Fix static build Bernd Kuhls
@ 2015-08-26 12:36 ` Yann E. MORIN
  2015-08-26 13:09   ` Thomas Petazzoni
  2015-08-26 13:20 ` Thomas Petazzoni
  1 sibling, 1 reply; 6+ messages in thread
From: Yann E. MORIN @ 2015-08-26 12:36 UTC (permalink / raw
  To: buildroot

Bernd, All,

On 2015-08-25 23:18 +0200, Bernd Kuhls spake thusly:
> Fixes
> http://autobuild.buildroot.net/results/bd0/bd0e8619df7cd8f21da96ae470691b1ebb2f156c/
> http://autobuild.buildroot.net/results/f1c/f1c40ac9dda5ceeb5665d021333058eb29828d62/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v2: Put everything in the if-static_libs-then clause (Jerzy)
> 
>  package/tvheadend/tvheadend.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/package/tvheadend/tvheadend.mk b/package/tvheadend/tvheadend.mk
> index ec04e6f..29ecf4f 100644
> --- a/package/tvheadend/tvheadend.mk
> +++ b/package/tvheadend/tvheadend.mk
> @@ -71,6 +71,14 @@ define TVHEADEND_CONFIGURE_CMDS
>  	)
>  endef
>  
> +ifeq ($(BR2_STATIC_LIBS),y)
> +# remove hardcoded -ldl for static builds
> +define TVHEADEND_FIX_MAKEFILE_FOR_STATIC_BUILD
> +	$(SED) 's/-ldl -lpthread -lm/-lpthread -lm/' $(@D)/Makefile

Are you sure?

src/extra/capmt_ca.c uses dlsym() so it does need -ldl.

I suspect we should instead mark tvheadend as not available for
static-only.

Regards,
Yann E. MORIN.

> +endef
> +TVHEADEND_POST_CONFIGURE_HOOKS += TVHEADEND_FIX_MAKEFILE_FOR_STATIC_BUILD
> +endif
> +
>  define TVHEADEND_BUILD_CMDS
>  	$(MAKE) -C $(@D)
>  endef
> -- 
> 2.1.4
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH v2 1/1] package/tvheadend: Fix static build
  2015-08-26 12:36 ` Yann E. MORIN
@ 2015-08-26 13:09   ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2015-08-26 13:09 UTC (permalink / raw
  To: buildroot

Dear Yann E. MORIN,

On Wed, 26 Aug 2015 14:36:03 +0200, Yann E. MORIN wrote:

> > +ifeq ($(BR2_STATIC_LIBS),y)
> > +# remove hardcoded -ldl for static builds
> > +define TVHEADEND_FIX_MAKEFILE_FOR_STATIC_BUILD
> > +	$(SED) 's/-ldl -lpthread -lm/-lpthread -lm/' $(@D)/Makefile
> 
> Are you sure?
> 
> src/extra/capmt_ca.c uses dlsym() so it does need -ldl.

This file is not built by default, it's part of the extras.

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

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

* [Buildroot] [PATCH v2 1/1] package/tvheadend: Fix static build
  2015-08-25 21:18 [Buildroot] [PATCH v2 1/1] package/tvheadend: Fix static build Bernd Kuhls
  2015-08-26 12:36 ` Yann E. MORIN
@ 2015-08-26 13:20 ` Thomas Petazzoni
  2015-08-26 14:58   ` Bernd Kuhls
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-08-26 13:20 UTC (permalink / raw
  To: buildroot

Bernd,

On Tue, 25 Aug 2015 23:18:36 +0200, Bernd Kuhls wrote:
> Fixes
> http://autobuild.buildroot.net/results/bd0/bd0e8619df7cd8f21da96ae470691b1ebb2f156c/
> http://autobuild.buildroot.net/results/f1c/f1c40ac9dda5ceeb5665d021333058eb29828d62/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v2: Put everything in the if-static_libs-then clause (Jerzy)
> 
>  package/tvheadend/tvheadend.mk | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/package/tvheadend/tvheadend.mk b/package/tvheadend/tvheadend.mk
> index ec04e6f..29ecf4f 100644
> --- a/package/tvheadend/tvheadend.mk
> +++ b/package/tvheadend/tvheadend.mk
> @@ -71,6 +71,14 @@ define TVHEADEND_CONFIGURE_CMDS
>  	)
>  endef
>  
> +ifeq ($(BR2_STATIC_LIBS),y)
> +# remove hardcoded -ldl for static builds
> +define TVHEADEND_FIX_MAKEFILE_FOR_STATIC_BUILD
> +	$(SED) 's/-ldl -lpthread -lm/-lpthread -lm/' $(@D)/Makefile
> +endef
> +TVHEADEND_POST_CONFIGURE_HOOKS += TVHEADEND_FIX_MAKEFILE_FOR_STATIC_BUILD
> +endif

Instead of this hack, could you implement a better fix that can be
upstreamed? -ldl is indeed needed only to build the extras. Can you try
(and push upstream) something like the following patch?

diff --git a/Makefile b/Makefile
index 037e2fa..1b28c8d 100644
--- a/Makefile
+++ b/Makefile
@@ -38,9 +38,9 @@ CFLAGS  += -fms-extensions -funsigned-char -fno-strict-aliasing
 CFLAGS  += -D_FILE_OFFSET_BITS=64
 CFLAGS  += -I${BUILDDIR} -I${ROOTDIR}/src -I${ROOTDIR}
 ifeq ($(CONFIG_ANDROID),yes)
-LDFLAGS += -ldl -lm
+LDFLAGS += -lm
 else
-LDFLAGS += -ldl -lpthread -lm
+LDFLAGS += -lpthread -lm
 endif
 ifeq ($(CONFIG_LIBICONV),yes)
 LDFLAGS += -liconv

There is no need for any other change it seems, since -ldl is already
passed explicitly when building the extra that uses dlsym().

Thanks!

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

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

* [Buildroot] [PATCH v2 1/1] package/tvheadend: Fix static build
  2015-08-26 13:20 ` Thomas Petazzoni
@ 2015-08-26 14:58   ` Bernd Kuhls
  2015-08-26 15:03     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Bernd Kuhls @ 2015-08-26 14:58 UTC (permalink / raw
  To: buildroot

Am Wed, 26 Aug 2015 15:20:55 +0200 schrieb Thomas Petazzoni:

> Instead of this hack, could you implement a better fix that can be
> upstreamed? -ldl is indeed needed only to build the extras. Can you try
> (and push upstream) something like the following patch?

Hi,

tvheadend requires to sign a "Contributor License Agreement" when 
contributing code:
https://tvheadend.org/projects/tvheadend/wiki/Contributors

Since you suggested the patch in question I can not sign such a CLA:
"You affirm that you have the right to provide the contribution (i.e. 
it's your own work)." ;)

How to proceed?

Regards, Bernd

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

* [Buildroot] [PATCH v2 1/1] package/tvheadend: Fix static build
  2015-08-26 14:58   ` Bernd Kuhls
@ 2015-08-26 15:03     ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2015-08-26 15:03 UTC (permalink / raw
  To: buildroot

Dear Bernd Kuhls,

On Wed, 26 Aug 2015 16:58:40 +0200, Bernd Kuhls wrote:

> tvheadend requires to sign a "Contributor License Agreement" when 
> contributing code:
> https://tvheadend.org/projects/tvheadend/wiki/Contributors
> 
> Since you suggested the patch in question I can not sign such a CLA:
> "You affirm that you have the right to provide the contribution (i.e. 
> it's your own work)." ;)
> 
> How to proceed?

I, Thomas Petazzoni, hereby grants Bernd Kuhls the right to submit the
following trivial and stupid piece of code to the tvheadend project
under his own name, and take the entire credit for the submission.

diff --git a/Makefile b/Makefile
index 037e2fa..1b28c8d 100644
--- a/Makefile
+++ b/Makefile
@@ -38,9 +38,9 @@ CFLAGS  += -fms-extensions -funsigned-char -fno-strict-aliasing
 CFLAGS  += -D_FILE_OFFSET_BITS=64
 CFLAGS  += -I${BUILDDIR} -I${ROOTDIR}/src -I${ROOTDIR}
 ifeq ($(CONFIG_ANDROID),yes)
-LDFLAGS += -ldl -lm
+LDFLAGS += -lm
 else
-LDFLAGS += -ldl -lpthread -lm
+LDFLAGS += -lpthread -lm
 endif
 ifeq ($(CONFIG_LIBICONV),yes)
 LDFLAGS += -liconv

Good enough for you? :-)

Thanks!

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

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

end of thread, other threads:[~2015-08-26 15:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-25 21:18 [Buildroot] [PATCH v2 1/1] package/tvheadend: Fix static build Bernd Kuhls
2015-08-26 12:36 ` Yann E. MORIN
2015-08-26 13:09   ` Thomas Petazzoni
2015-08-26 13:20 ` Thomas Petazzoni
2015-08-26 14:58   ` Bernd Kuhls
2015-08-26 15:03     ` Thomas Petazzoni

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.