Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 1/1] package/tvheadend: Fix static build
@ 2015-08-29 11:55 Bernd Kuhls
  2015-08-29 13:06 ` Yann E. MORIN
  0 siblings, 1 reply; 3+ messages in thread
From: Bernd Kuhls @ 2015-08-29 11:55 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
v3: Changed patch to fix Makefile instead (Thomas)
v2: Put everything in the if-static_libs-then clause (Jerzy)

 package/tvheadend/0003-fix-static-build.patch | 43 +++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 package/tvheadend/0003-fix-static-build.patch

diff --git a/package/tvheadend/0003-fix-static-build.patch b/package/tvheadend/0003-fix-static-build.patch
new file mode 100644
index 0000000..fef7e59
--- /dev/null
+++ b/package/tvheadend/0003-fix-static-build.patch
@@ -0,0 +1,43 @@
+Patch sent upstream: https://github.com/tvheadend/tvheadend/pull/705
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+
+
+From 61b077fd48b1494205dbfd10d2dfcec0150f6b7a Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
+Date: Sat, 29 Aug 2015 13:03:26 +0200
+Subject: [PATCH] Remove -ldl to fix static build
+
+-ldl was added in 2010: "Link with libdl (for dladdr())"
+https://github.com/tvheadend/tvheadend/commit/0fca6020008c0964155a18e23093e136333ad9ef
+
+The only trace of dladdr() can be found currently in src/trap.c in line
+192, encapsulated in #if ENABLE_EXECINFO. The buildsystem does not
+contain any trace of ENABLE_EXECINFO so I suppose -ldl is not needed
+anymore. Unconditionally adding "-ldl" breaks static builds in buildroot
+however:
+http://autobuild.buildroot.net/results/f1c/f1c40ac9dda5ceeb5665d021333058eb29828d62/build-end.log
+
+This patch, written by Thomas Petazzoni, fixes the problem.
+He gave me written consent to send this patch upstream in his name:
+http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/125500
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+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
-- 
2.1.4

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

* [Buildroot] [PATCH v3 1/1] package/tvheadend: Fix static build
  2015-08-29 11:55 [Buildroot] [PATCH v3 1/1] package/tvheadend: Fix static build Bernd Kuhls
@ 2015-08-29 13:06 ` Yann E. MORIN
  2015-08-29 13:26   ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2015-08-29 13:06 UTC (permalink / raw)
  To: buildroot

Bernd, All,

On 2015-08-29 13:55 +0200, Bernd Kuhls spake thusly:
> Fixes
> http://autobuild.buildroot.net/results/f1c/f1c40ac9dda5ceeb5665d021333058eb29828d62/
> http://autobuild.buildroot.net/results/bd0/bd0e8619df7cd8f21da96ae470691b1ebb2f156c/
> http://autobuild.buildroot.net/results/f1c/f1c40ac9dda5ceeb5665d021333058eb29828d62/
> 
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> v3: Changed patch to fix Makefile instead (Thomas)
> v2: Put everything in the if-static_libs-then clause (Jerzy)
> 
>  package/tvheadend/0003-fix-static-build.patch | 43 +++++++++++++++++++++++++++
>  1 file changed, 43 insertions(+)
>  create mode 100644 package/tvheadend/0003-fix-static-build.patch
> 
> diff --git a/package/tvheadend/0003-fix-static-build.patch b/package/tvheadend/0003-fix-static-build.patch
> new file mode 100644
> index 0000000..fef7e59
> --- /dev/null
> +++ b/package/tvheadend/0003-fix-static-build.patch
> @@ -0,0 +1,43 @@
> +Patch sent upstream: https://github.com/tvheadend/tvheadend/pull/705
> +
> +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> +
> +
> +From 61b077fd48b1494205dbfd10d2dfcec0150f6b7a Mon Sep 17 00:00:00 2001
> +From: Bernd Kuhls <bernd.kuhls@t-online.de>
> +Date: Sat, 29 Aug 2015 13:03:26 +0200
> +Subject: [PATCH] Remove -ldl to fix static build
> +
> +-ldl was added in 2010: "Link with libdl (for dladdr())"
> +https://github.com/tvheadend/tvheadend/commit/0fca6020008c0964155a18e23093e136333ad9ef
> +
> +The only trace of dladdr() can be found currently in src/trap.c in line
> +192, encapsulated in #if ENABLE_EXECINFO. The buildsystem does not
> +contain any trace of ENABLE_EXECINFO

Yes there is:

    $ git grep -i execinfo
    configure:check_cc_header execinfo
    [...]

Regards,
Yann E. MORIN.

> so I suppose -ldl is not needed
> +anymore. Unconditionally adding "-ldl" breaks static builds in buildroot
> +however:
> +http://autobuild.buildroot.net/results/f1c/f1c40ac9dda5ceeb5665d021333058eb29828d62/build-end.log
> +
> +This patch, written by Thomas Petazzoni, fixes the problem.
> +He gave me written consent to send this patch upstream in his name:
> +http://article.gmane.org/gmane.comp.lib.uclibc.buildroot/125500
> +---
> + Makefile | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +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
> -- 
> 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] 3+ messages in thread

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

Yann, Bernd,

On Sat, 29 Aug 2015 15:06:56 +0200, Yann E. MORIN wrote:

> > +The only trace of dladdr() can be found currently in src/trap.c in line
> > +192, encapsulated in #if ENABLE_EXECINFO. The buildsystem does not
> > +contain any trace of ENABLE_EXECINFO
> 
> Yes there is:
> 
>     $ git grep -i execinfo
>     configure:check_cc_header execinfo
>     [...]

Yes, I missed that one when looking for places where libdl was actually
used. So libdl is not only used by capmt_ca.c, but also by tvheadend
itself, when execinfo support is available.

Maybe we should stop bike-shedding, and mark tvheadend as not available
for static builds, no?

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

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-29 11:55 [Buildroot] [PATCH v3 1/1] package/tvheadend: Fix static build Bernd Kuhls
2015-08-29 13:06 ` Yann E. MORIN
2015-08-29 13:26   ` Thomas Petazzoni

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