Fix ltrace autobuilder failures
cover Fix ltrace autobuilder failures
This patch serie try to fix different issues detected by autobuilder on ltrace package:
http://autobuild.buildroot.net/results/79dae85647526cdeddae5050db0339fbc38c9ae6 http://autobuild.buildroot.net/results/808569f6bfac059b57eb4f1e692fbc9909e791cf http://autobuild.buildroot.net/results/83d0cd13d64053869708c666e2aa533202af67f7 http://autobuild.buildroot.net/results/d4c465ea57a1954c3323234100ae08156cbd8324
J?r?me Pouiller (3):
ltrace: Explicit enable/disable of libunwind
ltrace: Fix a May be unitialized variable
ltrace: Fix "strndup not declared" build failure on powerpc/uclibc
.../ltrace-fix-may-be-uninitialized-variable.patch | 11 +++++++++++ package/ltrace/ltrace-fix-strndup-usage.patch | 15 +++++++++++++++ package/ltrace/ltrace.mk | 9 +++++++++ 3 files changed, 35 insertions(+) create mode 100644 package/ltrace/ltrace-fix-may-be-uninitialized-variable.patch create mode 100644 package/ltrace/ltrace-fix-strndup-usage.patch
Signature · 1 line
1.7.9.5
PATCH 1/3 ltrace: Explicit enable/disable of libunwind
ltrace automaticaly use libunwind if detected. So depending if libunwind was already compiled or not, ltrcae compile differently. This patch add explicit dependency to libunwind if detected.
In add, due to limitation of luclibc, ltrace cannot use libunwind with uclib. this patch explicitly compile without libunwind in this case.
Resolve issues detected here:
http://autobuild.buildroot.net/results/79dae85647526cdeddae5050db0339fbc38c9ae6 http://autobuild.buildroot.net/results/808569f6bfac059b57eb4f1e692fbc9909e791cf http://autobuild.buildroot.net/results/83d0cd13d64053869708c666e2aa533202af67f7
--- package/ltrace/ltrace.mk | 9 +++++++++ 1 file changed, 9 insertions(+)
package/ltrace/ltrace.mk +9 -0
@@ -13,4 +13,13 @@ LTRACE_CONF_OPT = --disable-werror LTRACE_LICENSE = GPLv2 LTRACE_LICENSE_FILES = COPYING +LTRACE_LIBUNWIDFLAG = --without-libunwind +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) + ifneq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) + LTRACE_DEPENDENCIES = libunwind + LTRACE_LIBUNWIDFLAG = --with-libunwind + endif +endif +LTRACE_CONF_OPT = $(LTRACE_LIBUNWIDFLAG) + $(eval $(autotools-package))
Signature · 1 line
1.7.9.5
PATCH 1/3 ltrace: Explicit enable/disable of libunwind
Hi J?r?me,
Quoted 5 lines · J?r?me Pouiller
ltrace automaticaly use libunwind if detected. So depending if libunwind was already compiled or not, ltrcae compile differently. This patch add explicit dependency to libunwind if detected.
In add, due to limitation of luclibc, ltrace cannot use libunwind with uclib. this patch explicitly compile without libunwind in this case.
s/luclibc/uclibc/
Also, please warp log message lines at about 80 characters.
baruch
Quoted 35 lines
Resolve issues detected here:
http://autobuild.buildroot.net/results/79dae85647526cdeddae5050db0339fbc38c9ae6 http://autobuild.buildroot.net/results/808569f6bfac059b57eb4f1e692fbc9909e791cf http://autobuild.buildroot.net/results/83d0cd13d64053869708c666e2aa533202af67f7Signed-off-by J?r?me Pouiller <[email protected]>--- package/ltrace/ltrace.mk | 9 +++++++++ 1 file changed, 9 insertions(+)package/ltrace/ltrace.mk +9
-0@@ -13,4 +13,13 @@ LTRACE_CONF_OPT = --disable-werror LTRACE_LICENSE = GPLv2 LTRACE_LICENSE_FILES = COPYING +LTRACE_LIBUNWIDFLAG = --without-libunwind +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) + ifneq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) + LTRACE_DEPENDENCIES = libunwind + LTRACE_LIBUNWIDFLAG = --with-libunwind + endif +endif +LTRACE_CONF_OPT = $(LTRACE_LIBUNWIDFLAG) + $(eval $(autotools-package))Signature · 6 lines
1.7.9.5 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
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 ltrace: Explicit enable/disable of libunwind
In reply to Jérôme PouillerDear J?r?me Pouiller,
Quoted 1 line · J?r?me Pouiller
ltrace automaticaly use libunwind if detected. So depending if libunwind was
automatically uses
Quoted 1 line
already compiled or not, ltrcae compile differently. This patch add explicit
ltrace compiles
This patch adds an
Quoted 3 lines
dependency to libunwind if detected.
In add, due to limitation of luclibc, ltrace cannot use libunwind with uclib. this patch explicitly compile without libunwind in this case.
Line should be wrapped and fixed from typos.
Quoted 6 lines
package/ltrace/ltrace.mk +0
-0@@ -13,4 +13,13 @@ LTRACE_CONF_OPT = --disable-werror LTRACE_LICENSE = GPLv2
package/ltrace/ltrace.mk LTRACE_CONF_OPT = --disable-werror · line 23
Quoted 10 lines
package/ltrace/ltrace.mk +8
-0LTRACE_LICENSE_FILES = COPYING +LTRACE_LIBUNWIDFLAG = --without-libunwind +ifeq ($(BR2_PACKAGE_LIBUNWIND),y) + ifneq ($(BR2_TOOLCHAIN_USES_UCLIBC),y) + LTRACE_DEPENDENCIES = libunwind + LTRACE_LIBUNWIDFLAG = --with-libunwind + endif +endif +LTRACE_CONF_OPT = $(LTRACE_LIBUNWIDFLAG)
That's not how we typically write such things. We normally do something like:
ifeq ($(BR2_PACKAGE_LIBUNWIND)$(BR2_TOOLCHAIN_USES_GLIBC),yy) LTRACE_DEPENDENCIES += libunwindLTRACE_CONF_OPT += --with-libunwind
elseLTRACE_CONF_OPT += --without-libunwind
endif
Thanks,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 2/3 ltrace: Fix a May be unitialized variable
In reply to Jérôme PouillerCompilation may failed if rlm is not initialized and ltrace is compiled with -Werror.
--- .../ltrace-fix-may-be-uninitialized-variable.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 package/ltrace/ltrace-fix-may-be-uninitialized-variable.patch
package/ltrace/ltrace-fix-may-be-uninitialized-variable.patch new file +11 -0
@@ -0,0 +1,11 @@ +--- a/sysdeps/linux-gnu/proc.c 2012-12-04 13:36:23.000000000 +0100 ++++ b/sysdeps/linux-gnu/proc.c 2013-08-09 10:14:33.576464435 +0200 +@@ -483,7 +483,7 @@ + arch_addr_t addr = (arch_addr_t)(uintptr_t)dbg->r_map; + + while (addr != 0) { +- struct lt_link_map_64 rlm; ++ struct lt_link_map_64 rlm = { }; + if (lm_fetcher(proc)(proc, addr, &rlm) < 0) { + debug(2, "Unable to read link map"); + return;
Signature · 1 line
1.7.9.5
PATCH 2/3 ltrace: Fix a May be unitialized variable
Hi J?r?me,
Quoted 2 lines · J?r?me Pouiller
Compilation may failed if rlm is not initialized and ltrace is compiled with -Werror.
The right fix, in my opinion, is to disable -Werror. Otherwise, we'll have to add more and more fixes like this one for each bump of the toolchain.
baruch
Quoted 30 lines
Signed-off-by J?r?me Pouiller <[email protected]>--- .../ltrace-fix-may-be-uninitialized-variable.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 package/ltrace/ltrace-fix-may-be-uninitialized-variable.patchpackage/ltrace/ltrace-fix-may-be-uninitialized-variable.patch new file +11
-0@@ -0,0 +1,11 @@ +--- a/sysdeps/linux-gnu/proc.c 2012-12-04 13:36:23.000000000 +0100 ++++ b/sysdeps/linux-gnu/proc.c 2013-08-09 10:14:33.576464435 +0200 +@@ -483,7 +483,7 @@ + arch_addr_t addr = (arch_addr_t)(uintptr_t)dbg->r_map; + + while (addr != 0) { +- struct lt_link_map_64 rlm; ++ struct lt_link_map_64 rlm = { }; + if (lm_fetcher(proc)(proc, addr, &rlm) < 0) { + debug(2, "Unable to read link map"); + return;Signature · 6 lines
1.7.9.5 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
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 2/3 ltrace: Fix a May be unitialized variable
In reply to Jérôme PouillerDear J?r?me Pouiller,
Quoted 2 lines · J?r?me Pouiller
Compilation may failed if rlm is not initialized and ltrace is compiled with -Werror.
In general, we try to avoid compiling things with -Werror, but ok, why not.
Can you add a description + Signed-off-by line to the patch, and send it upstream? Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 3/3 ltrace: Fix "strndup not declared" build failure on powerpc/uclibc
In reply to Jérôme PouillerOn some systems, strndup is declared only if _GNU_SOURCE is defined
--- package/ltrace/ltrace-fix-strndup-usage.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 package/ltrace/ltrace-fix-strndup-usage.patch
package/ltrace/ltrace-fix-strndup-usage.patch new file +15 -0
@@ -0,0 +1,15 @@ +With some systems, strndup is declared only if __USE_GNU is defined. + +--- a/sysdeps/linux-gnu/ppc/plt.c 2012-11-29 18:46:57.000000000 +0100 ++++ b/sysdeps/linux-gnu/ppc/plt.c 2013-08-09 10:30:07.452044496 +0200 +@@ -20,6 +20,10 @@ + * 02110-1301 USA + */ + ++#ifndef _GNU_SOURCE ++# define _GNU_SOURCE 1 ++#endif ++ + #include <gelf.h> + #include <sys/ptrace.h> + #include <errno.h>
Signature · 1 line
1.7.9.5
PATCH 3/3 ltrace: Fix "strndup not declared" build failure on powerpc/uclibc
Hi J?r?me,
Quoted 14 lines · J?r?me Pouiller
On some systems, strndup is declared only if
_GNU_SOURCEis definedSigned-off-by J?r?me Pouiller <[email protected]>--- package/ltrace/ltrace-fix-strndup-usage.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 package/ltrace/ltrace-fix-strndup-usage.patchpackage/ltrace/ltrace-fix-strndup-usage.patch new file +0
-0
package/ltrace/ltrace-fix-strndup-usage.patch line 1
Quoted 1 line
package/ltrace/ltrace-fix-strndup-usage.patch new file +1
-0@@ -0,0 +1,15 @@ +With some systems, strndup is declared only if __USE_GNU is defined.
Please add your sign-off on this patch.
baruch
Quoted 14 lines
package/ltrace/ltrace-fix-strndup-usage.patch new file +14
-0+ +--- a/sysdeps/linux-gnu/ppc/plt.c 2012-11-29 18:46:57.000000000 +0100 ++++ b/sysdeps/linux-gnu/ppc/plt.c 2013-08-09 10:30:07.452044496 +0200 +@@ -20,6 +20,10 @@ + * 02110-1301 USA + */ + ++#ifndef _GNU_SOURCE ++# define _GNU_SOURCE 1 ++#endif ++ + #include <gelf.h> + #include <sys/ptrace.h> + #include <errno.h>
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 3/3 ltrace: Fix "strndup not declared" build failure on powerpc/uclibc
In reply to Jérôme PouillerDear J?r?me Pouiller,
Quoted 3 lines · J?r?me Pouiller
On some systems, strndup is declared only if
_GNU_SOURCEis definedSigned-off-by J?r?me Pouiller <[email protected]>
Shouldn't this be globally defined by adding a -D_GNU_SOURCE to the CFLAGS at the package level?
If not, then anyway your patch needs a Signed-off-by line, and should be submitted upstream.
Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 3/3 ltrace: Fix "strndup not declared" build failure on powerpc/uclibc
Quoted 9 lines · Thomas Petazzoni
Dear J?r?me Pouiller,
Quoted 3 lines · J?r?me Pouiller
On some systems, strndup is declared only if
_GNU_SOURCEis definedSigned-off-by J?r?me Pouiller <[email protected]>Shouldn't this be globally defined by adding a -D_GNU_SOURCE to the CFLAGS at the package level?
When you say 'package level' you mean in ltrace.mk in buildroot? In this case I don't think it's correct: ltrace itself is responsible for including the right header files, and setting the right macros, so that any used interface is available. Hence, I consider it a patch to ltrace (that should be upstreamed), not something we should fix in buildroot itself.
PATCH 3/3 ltrace: Fix "strndup not declared" build failure on powerpc/uclibc
Dear Thomas De Schampheleire,
Quoted 4 lines · Thomas De Schampheleire
Quoted 2 lines
Shouldn't this be globally defined by adding a -D_GNU_SOURCE to the CFLAGS at the package level?
When you say 'package level' you mean in ltrace.mk in buildroot?
Yes, that's what I meant, but I agree that I might have been wrong.
Quoted 5 lines
In this case I don't think it's correct: ltrace itself is responsible for including the right header files, and setting the right macros, so that any used interface is available. Hence, I consider it a patch to ltrace (that should be upstreamed), not something we should fix in buildroot itself.
Hum, yes, you're right.
J?r?me, sorry then, your original patch was OK. Just add your Signed-off-by on it.
Can you resend your small patch series with the various minor comments addressed?
Thanks!
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com