package/tvheadend: Fix static build
PATCH v3 1/1 package/tvheadend: Fix static build
Fixes
http://autobuild.buildroot.net/results/f1c/f1c40ac9dda5ceeb5665d021333058eb29828d62/
http://autobuild.buildroot.net/results/bd0/bd0e8619df7cd8f21da96ae470691b1ebb2f156c/
http://autobuild.buildroot.net/results/f1c/f1c40ac9dda5ceeb5665d021333058eb29828d62/
---
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
package/tvheadend/0003-fix-static-build.patch new file +43 -0
@@ -0,0 +1,43 @@ +Patch sent upstream: https://github.com/tvheadend/tvheadend/pull/705 + +Signed-off-by: Bernd Kuhls <[email protected]> + + +From 61b077fd48b1494205dbfd10d2dfcec0150f6b7a Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls <[email protected]> +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
Signature · 1 line
2.1.4
PATCH v3 1/1 package/tvheadend: Fix static build
Bernd, All,
On 2015-08-29 13:55 +0200, Bernd Kuhls spake thusly:
Quoted 26 lines
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 <[email protected]>---
v3: Changed patch to fixMakefileinstead (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.patchpackage/tvheadend/0003-fix-static-build.patch new file +6
-0@@ -0,0 +1,43 @@ +Patch sent upstream: https://github.com/tvheadend/tvheadend/pull/705 + +Signed-off-by: Bernd Kuhls <[email protected]> + + +From 61b077fd48b1494205dbfd10d2dfcec0150f6b7a Mon Sep 17 00:00:00 2001
package/tvheadend/0003-fix-static-build.patch line 16
Quoted 10 lines
package/tvheadend/0003-fix-static-build.patch new file +10
-0+From: Bernd Kuhls <[email protected]> +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.
Quoted 35 lines
so I suppose -ldl is not needed
package/tvheadend/0003-fix-static-build.patch new file +27
-0+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 += -liconvSignature · 6 lines
2.1.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
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 v3 1/1 package/tvheadend: Fix static build
Yann, Bernd,
Quoted 9 lines · Yann E. MORIN
package/tvheadend/0003-fix-static-build.patch
Quoted 3 lines
package/tvheadend/0003-fix-static-build.patch new file +3
-0+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_EXECINFOYes 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com