Update LTTng packages to 2.8.x and Babeltrace to 1.4.0
v4 cover Update LTTng packages to 2.8.x and Babeltrace to 1.4.0
See if this is okay and I will rename lttng-babeltrace to babeltrace again and submit this last patch.
Philippe Proulx (4):
lttng-tools: bump to version 2.8.2
lttng-babeltrace: bump to version 1.4.0
lttng-babeltrace: add host Babeltrace as host utility
lttng-babeltrace: add debug info support
package/Config.in.host | 1 + .../0001-no-posix-fallocate-in-uclibc.patch | 37 -- ...b-Makefile.am-remove-unneeded-static-flag.patch | 36 ++ ...ix-uuid-support-detection-on-static-build.patch | 63 --- ...-m4-ax_lib_elfutils.m4-add-cache-variable.patch | 74 ++++ package/lttng-babeltrace/Config.in | 29 +- package/lttng-babeltrace/Config.in.host | 14 + package/lttng-babeltrace/lttng-babeltrace.hash | 11 +- package/lttng-babeltrace/lttng-babeltrace.mk | 16 +- ...ld-failure-when-__GLIBC_PREREQ-is-missing.patch | 55 --- ...Fix-snapshot-del-output-with-name-on-musl.patch | 32 ++ .../0002-Fix-add-missing-sys-types.h-header.patch | 29 -- ...Fix-strerror_r-behavior-is-glibc-specific.patch | 30 ++ ...et-thread-stack-size-to-ulimit-soft-value.patch | 431 +++++++++++++++++++++ package/lttng-tools/lttng-tools.hash | 6 +- package/lttng-tools/lttng-tools.mk | 10 +- 16 files changed, 667 insertions(+), 207 deletions(-) delete mode 100644 package/lttng-babeltrace/0001-no-posix-fallocate-in-uclibc.patch create mode 100644 package/lttng-babeltrace/0001-tests-lib-Makefile.am-remove-unneeded-static-flag.patch delete mode 100644 package/lttng-babeltrace/0002-configure-fix-uuid-support-detection-on-static-build.patch create mode 100644 package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch create mode 100644 package/lttng-babeltrace/Config.in.host delete mode 100644 package/lttng-tools/0001-Fix-build-failure-when-__GLIBC_PREREQ-is-missing.patch create mode 100644 package/lttng-tools/0001-Fix-snapshot-del-output-with-name-on-musl.patch delete mode 100644 package/lttng-tools/0002-Fix-add-missing-sys-types.h-header.patch create mode 100644 package/lttng-tools/0002-Fix-strerror_r-behavior-is-glibc-specific.patch create mode 100644 package/lttng-tools/0003-Set-thread-stack-size-to-ulimit-soft-value.patch
Signature · 1 line
2.9.3
PATCH v4 1/4 lttng-tools: bump to version 2.8.2
The current patches are dropped because they were merged upstream.
The new patches exist to fix the build with musl. They were submitted on the lttng-dev mailing list, but not merged yet, or not merged in 2.8.2.
LTTng-tools now has its man pages written in AsciiDoc and they get converted to troff at build time. This is not needed in a Buildroot image anyway.
The --enable-lttng-ust/--disable-lttng-ust configure options are renamed to --with-lttng-ust/--without-lttng-ust in v2.8.
---
Changes v3 -> v4:
- Fix patch file that does not apply.
Changes v2 -> v3:
- Add links to original patches in patch files.
- Remove the original patch index from the subject of patch files.
Changes v1 -> v2:
- Detailed commit message.
- Complete patches with author and date.
...ld-failure-when-__GLIBC_PREREQ-is-missing.patch | 55 --- ...Fix-snapshot-del-output-with-name-on-musl.patch | 32 ++ .../0002-Fix-add-missing-sys-types.h-header.patch | 29 -- ...Fix-strerror_r-behavior-is-glibc-specific.patch | 30 ++ ...et-thread-stack-size-to-ulimit-soft-value.patch | 431 +++++++++++++++++++++ package/lttng-tools/lttng-tools.hash | 6 +- package/lttng-tools/lttng-tools.mk | 10 +- 7 files changed, 502 insertions(+), 91 deletions(-) delete mode 100644 package/lttng-tools/0001-Fix-build-failure-when-__GLIBC_PREREQ-is-missing.patch create mode 100644 package/lttng-tools/0001-Fix-snapshot-del-output-with-name-on-musl.patch delete mode 100644 package/lttng-tools/0002-Fix-add-missing-sys-types.h-header.patch create mode 100644 package/lttng-tools/0002-Fix-strerror_r-behavior-is-glibc-specific.patch create mode 100644 package/lttng-tools/0003-Set-thread-stack-size-to-ulimit-soft-value.patch
package/lttng-tools/0001-Fix-build-failure-when-__GLIBC_PREREQ-is-missing.patch deleted +0 -55
@@ -1,55 +0,0 @@ -From: Baruch Siach <[email protected]> -Date: Tue, 8 Mar 2016 14:25:34 +0200 -Subject: [PATCH] Fix: build failure when __GLIBC_PREREQ is missing - -The musl C library does not provide the __GLIBC_PREREQ macro. Instead of -relying on glibc version test, check directly for the availability of -epoll_create1(). - -Signed-off-by: Baruch Siach <[email protected]> ---- -Patch status: sent upstream rebased on master branch -(http://lists.lttng.org/pipermail/lttng-dev/2016-March/025593.html) - - configure.ac | 2 +- - src/common/compat/poll.h | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 66d83b60b017..4fc1160c9a08 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -70,7 +70,7 @@ AC_CHECK_FUNCS([ \ - gethostbyname gethostname getpagesize localtime_r memchr memset \ - mkdir munmap putenv realpath rmdir socket strchr strcspn strdup \ - strncasecmp strndup strpbrk strrchr strstr strtol strtoul \ -- strtoull \ -+ strtoull epoll_create1 \ - ]) - - # Babeltrace viewer check -diff --git a/src/common/compat/poll.h b/src/common/compat/poll.h -index 699901848dc1..84f25d5c85aa 100644 ---- a/src/common/compat/poll.h -+++ b/src/common/compat/poll.h -@@ -73,7 +73,7 @@ enum { - LPOLLNVAL = EPOLLHUP, - LPOLLRDHUP = EPOLLRDHUP, - /* Close on exec feature of epoll */ --#if __GLIBC_PREREQ(2, 9) -+#if defined(HAVE_EPOLL_CREATE1) && defined(EPOLL_CLOEXEC) - LTTNG_CLOEXEC = EPOLL_CLOEXEC, - #else - /* -@@ -127,7 +127,7 @@ extern int compat_epoll_create(struct lttng_poll_event *events, - #define lttng_poll_create(events, size, flags) \ - compat_epoll_create(events, size, flags) - --#if __GLIBC_PREREQ(2, 9) -+#if defined(HAVE_EPOLL_CREATE1) && defined(EPOLL_CLOEXEC) - static inline int compat_glibc_epoll_create(int size __attribute__((unused)), - int flags) - { --- -2.7.0 -
package/lttng-tools/0001-Fix-snapshot-del-output-with-name-on-musl.patch new file +32 -0
@@ -0,0 +1,32 @@ +From: mjeanson at efficios.com Michael Jeanson +Date: Wed, 15 Jun 2016 17:18:02 -0400 +Subject: [lttng-dev] [PATCH] Fix: snapshot del-output with name on musl + +Some implementations of strtol() like the one in musl will +return EINVAL in perror when no valid number was found in +the string. + +Signed-off-by: Michael Jeanson <[email protected]> +[Philippe: grabbed from the mailing list: + https://lists.lttng.org/pipermail/lttng-dev/2016-June/026192.html + and adapted to 2.8.2.] +Signed-off-by: Philippe Proulx <[email protected]> +--- + src/bin/lttng/commands/snapshot.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/bin/lttng/commands/snapshot.c b/src/bin/lttng/commands/snapshot.c +index d948226..00aa5b7 100644 +--- a/src/bin/lttng/commands/snapshot.c ++++ b/src/bin/lttng/commands/snapshot.c +@@ -447,7 +447,7 @@ static int cmd_del_output(int argc, const char **argv) + + errno = 0; + id = strtol(argv[1], &name, 10); +- if (id == 0 && errno == 0) { ++ if (id == 0 && (errno == 0 || errno == EINVAL)) { + if (lttng_opt_mi) { + ret = mi_del_output(UINT32_MAX, name); + } else { +-- +2.7.4
package/lttng-tools/0002-Fix-add-missing-sys-types.h-header.patch deleted +0 -29
@@ -1,29 +0,0 @@ -From: Baruch Siach <[email protected]> -Date: Tue, 8 Mar 2016 14:40:49 +0200 -Subject: [PATCH] Fix: add missing sys/types.h header - -The musl C library requires inclusion of sys/types.h for mode_t. - -Signed-off-by: Baruch Siach <[email protected]> ---- -Patch status: sent upstream -(http://lists.lttng.org/pipermail/lttng-dev/2016-March/025594.html) - - src/common/runas.h | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/common/runas.h b/src/common/runas.h -index 2c5565af3646..ac1143eecf84 100644 ---- a/src/common/runas.h -+++ b/src/common/runas.h -@@ -19,6 +19,7 @@ - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -+#include <sys/types.h> - #include <unistd.h> - #include <pthread.h> - --- -2.7.0 -
package/lttng-tools/0002-Fix-strerror_r-behavior-is-glibc-specific.patch new file +30 -0
@@ -0,0 +1,30 @@ +From fc743b22fc26eab9f9dbf48e4505ed2394924bba Mon Sep 17 00:00:00 2001 +From: Michael Jeanson <[email protected]> +Date: Mon, 13 Jun 2016 18:44:17 -0400 +Subject: [PATCH lttng-tools 4/4] Fix: strerror_r behavior is glibc specific + +Signed-off-by: Michael Jeanson <[email protected]> +[Philippe: grabbed from the mailing list: + https://lists.lttng.org/pipermail/lttng-dev/2016-June/026194.html +] +Signed-off-by: Philippe Proulx <[email protected]> +--- + src/common/error.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/common/error.h b/src/common/error.h +index 0fbd3a2..e8c811e 100644 +--- a/src/common/error.h ++++ b/src/common/error.h +@@ -198,7 +198,7 @@ static inline void __lttng_print_check_abort(enum lttng_error_level type) + + #define _PERROR(fmt, args...) _ERRMSG("PERROR", PRINT_ERR, fmt, ## args) + +-#if !defined(__linux__) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE)) ++#if !defined(__GLIBC__) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE)) + + /* + * Version using XSI strerror_r. +-- +2.7.4 +
package/lttng-tools/0003-Set-thread-stack-size-to-ulimit-soft-value.patch new file +431 -0
431 lines not on this page · raw message
package/lttng-tools/lttng-tools.hash +5 -1
@@ -1,2 +1,6 @@ +# From http://lttng.org/files/lttng-tools/lttng-tools-2.8.2.tar.bz2.{md5,sha1} +md5 cac8d64111711ae1b632d0dc12fe92c1 lttng-tools-2.8.2.tar.bz2 +sha1 870874ba9644691de8e564a1fa1459aa5fef42ba lttng-tools-2.8.2.tar.bz2 + # Locally generated -sha256 0c799fb21dfa42475feaa1507ded934608b2e531039b46c40e944a5b81c7b21c lttng-tools-2.7.1.tar.bz2 +sha256 a07e00e9519dad2577d9330bcaf040ab3dc1b289fbcb8c702c39d520422e7565 lttng-tools-2.8.2.tar.bz2
package/lttng-tools/lttng-tools.mk +4 -6
@@ -4,22 +4,20 @@ # ################################################################################ -LTTNG_TOOLS_VERSION = 2.7.1 +LTTNG_TOOLS_VERSION = 2.8.2 LTTNG_TOOLS_SITE = http://lttng.org/files/lttng-tools LTTNG_TOOLS_SOURCE = lttng-tools-$(LTTNG_TOOLS_VERSION).tar.bz2 LTTNG_TOOLS_LICENSE = GPLv2+, LGPLv2.1+ (include/lttng/*, src/lib/lttng-ctl/*) LTTNG_TOOLS_LICENSE_FILES = gpl-2.0.txt lgpl-2.1.txt LICENSE -LTTNG_TOOLS_CONF_OPTS += --with-xml-prefix=$(STAGING_DIR)/usr -# Patching configure.ac -LTTNG_TOOLS_AUTORECONF = YES +LTTNG_TOOLS_CONF_OPTS += --with-xml-prefix=$(STAGING_DIR)/usr --disable-man-pages LTTNG_TOOLS_DEPENDENCIES = liburcu libxml2 popt util-linux ifeq ($(BR2_PACKAGE_LTTNG_LIBUST),y) -LTTNG_TOOLS_CONF_OPTS += --enable-lttng-ust +LTTNG_TOOLS_CONF_OPTS += --with-lttng-ust LTTNG_TOOLS_DEPENDENCIES += lttng-libust else -LTTNG_TOOLS_CONF_OPTS += --disable-lttng-ust +LTTNG_TOOLS_CONF_OPTS += --without-lttng-ust endif $(eval $(autotools-package))
Signature · 1 line
2.9.3
PATCH v4 2/4 lttng-babeltrace: bump to version 1.4.0
In reply to Philippe ProulxCurrent patches are dropped because they were merged upstream.
Official upstream site of Babeltrace for the distribution of tarballs changed from lttng.org to efficios.com (see
<http://diamon.org/babeltrace>).
Official Babeltrace's website changed from
<http://www.efficios.com/babeltrace> to <http://diamon.org/babeltrace>.
I explicitly disable the support for debug informations in this patch to add it in a separate patch.
---
Changes v3 -> v4:
- Remove patch related to configure.ac for elfutils (not needed here since debug infos are disabled).
- Fix patch file that does not apply.
Changes v2 -> v3:
- Add links to original patches in patch files.
- Do not take care of debug info stuff in this patch.
- Do not remove the host babeltrace build (needed for the next patch).
Changes v1 -> v2:
- Detailed commit message.
- Detailed patch messages.
- Add comment above LTTNG_BABELTRACE_AUTORECONF = YES in lttng-babeltrace.mk.
.../0001-no-posix-fallocate-in-uclibc.patch | 37 ------------- ...b-Makefile.am-remove-unneeded-static-flag.patch | 36 +++++++++++++ ...ix-uuid-support-detection-on-static-build.patch | 63 ---------------------- package/lttng-babeltrace/Config.in | 10 ++-- package/lttng-babeltrace/lttng-babeltrace.hash | 11 ++-- package/lttng-babeltrace/lttng-babeltrace.mk | 9 ++-- 6 files changed, 48 insertions(+), 118 deletions(-) delete mode 100644 package/lttng-babeltrace/0001-no-posix-fallocate-in-uclibc.patch create mode 100644 package/lttng-babeltrace/0001-tests-lib-Makefile.am-remove-unneeded-static-flag.patch delete mode 100644 package/lttng-babeltrace/0002-configure-fix-uuid-support-detection-on-static-build.patch
package/lttng-babeltrace/0001-no-posix-fallocate-in-uclibc.patch deleted +0 -37
@@ -1,37 +0,0 @@ -Do not call posix_fallocate() on uClibc - -uClibc does not implement posix_fallocate(), and posix_fallocate() is -mostly only an hint to the kernel that we will need such or such -amount of space inside a file. So we just don't call posix_fallocate() -when building against uClibc. - -Signed-off-by: Thomas Petazzoni <[email protected]> -[Peter: add #include <features.h> ---- - formats/ctf/ctf.c | 3 +++ - 1 file changed, 3 insertions(+) - -Index: lttng-babeltrace-0.8/formats/ctf/ctf.c -=================================================================== ---- lttng-babeltrace-0.8.orig/formats/ctf/ctf.c -+++ lttng-babeltrace-0.8/formats/ctf/ctf.c -@@ -32,6 +32,7 @@ - #include <sys/stat.h> - #include <fcntl.h> - #include <dirent.h> -+#include <features.h> - #include <glib.h> - #include <unistd.h> - #include <stdlib.h> -@@ -384,9 +385,11 @@ - } - pos->content_size = -1U; /* Unknown at this point */ - pos->packet_size = WRITE_PACKET_LEN; -+#ifndef __UCLIBC__ - off = posix_fallocate(pos->fd, pos->mmap_offset, - pos->packet_size / CHAR_BIT); - assert(off >= 0); -+#endif - pos->offset = 0; - } else { - read_next_packet:
package/lttng-babeltrace/0001-tests-lib-Makefile.am-remove-unneeded-static-flag.patch new file +36 -0
@@ -0,0 +1,36 @@ +From 27e37d2621317d25e08ba0683bf8540b05b9347d Mon Sep 17 00:00:00 2001 +From: Philippe Proulx <[email protected]> +Date: Fri, 28 Oct 2016 02:09:20 -0400 +Subject: [PATCH] tests/lib/Makefile.am: remove unneeded -static flag + +Having those -static flags breaks the build in shared-only builds. + +Signed-off-by: Philippe Proulx <[email protected]> +[Philippe: grabbed from this pull request: + https://github.com/efficios/babeltrace/pull/49 +] +--- + tests/lib/Makefile.am | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am +index 33ada16..c685e77 100644 +--- a/tests/lib/Makefile.am ++++ b/tests/lib/Makefile.am +@@ -31,13 +31,11 @@ check_SCRIPTS = test_seek_big_trace \ + test_ctf_writer_complete + + if ENABLE_DEBUG_INFO +-test_dwarf_LDFLAGS = -static + test_dwarf_LDADD = $(LIBTAP) \ + $(top_builddir)/lib/libbabeltrace.la \ + $(top_builddir)/lib/libdebug-info.la + test_dwarf_SOURCES = test_dwarf.c + +-test_bin_info_LDFLAGS = -static + test_bin_info_LDADD = $(LIBTAP) \ + $(top_builddir)/lib/libbabeltrace.la \ + $(top_builddir)/lib/libdebug-info.la +-- +2.9.3 +
package/lttng-babeltrace/0002-configure-fix-uuid-support-detection-on-static-build.patch deleted +0 -63
63 lines not on this page · raw message
package/lttng-babeltrace/Config.in +4 -6
@@ -14,18 +14,16 @@ config BR2_PACKAGE_LTTNG_BABELTRACE to/from another trace format. Babeltrace is the reference implementation of the Common - Trace Format (see <http://diamon.org/docs/ctf/>). Babeltrace + Trace Format (see <http://diamon.org/ctf/>). Babeltrace can decode and display LTTng traces, since the latter are written using the CTF format. Having this tool on the target is not mandatory. You can transfer the binary trace output from the target to your - development workstation, and use babeltrace here. Buildroot - automatically builds a host babeltrace in - $(O)/host/usr/bin/babeltrace as a dependency of the - lttng-tools package. + development workstation, and use babeltrace here. Babeltrace + is packaged for all major Linux distributions. - http://www.efficios.com/babeltrace + http://diamon.org/babeltrace comment "lttng-babeltrace needs a toolchain w/ wchar, threads" depends on BR2_USE_MMU
package/lttng-babeltrace/lttng-babeltrace.hash +5 -6
@@ -1,7 +1,6 @@ -# From http://lttng.org/files/babeltrace/babeltrace-1.2.4.tar.bz2.md5 -md5 20a806fa7570e69a91707855a98f3ca6 babeltrace-1.2.4.tar.bz2 -# From http://lttng.org/files/babeltrace/babeltrace-1.2.4.tar.bz2.sha1 -sha1 c72a80e8fd905cb1ae3b0cf88885517faafe0fa1 babeltrace-1.2.4.tar.bz2 -# Locally generated -sha256 666e3a1ad2dc7d5703059963056e7800f0eab59c8eeb6be2efe4f3acc5209eb1 babeltrace-1.2.4.tar.bz2 +# From http://www.efficios.com/files/babeltrace/babeltrace-1.4.0.tar.bz2.{md5,sha1} +md5 fa99064048af5c9c6ff00e489ac809c2 babeltrace-1.4.0.tar.bz2 +sha1 3b162480ee883625e8581bf163817f78a4b6487b babeltrace-1.4.0.tar.bz2 +# Locally generated +sha256 9469eeb22617cd12668683b04c27003e5337e9ac66ade914988df3642fc0d0e4 babeltrace-1.4.0.tar.bz2
package/lttng-babeltrace/lttng-babeltrace.mk +3 -6
@@ -4,18 +4,15 @@ # ################################################################################ -LTTNG_BABELTRACE_SITE = http://lttng.org/files/babeltrace -LTTNG_BABELTRACE_VERSION = 1.2.4 +LTTNG_BABELTRACE_SITE = http://www.efficios.com/files/babeltrace +LTTNG_BABELTRACE_VERSION = 1.4.0 LTTNG_BABELTRACE_SOURCE = babeltrace-$(LTTNG_BABELTRACE_VERSION).tar.bz2 LTTNG_BABELTRACE_LICENSE = MIT, LGPLv2.1 (include/babeltrace/list.h), GPLv2 (test code) LTTNG_BABELTRACE_LICENSE_FILES = mit-license.txt gpl-2.0.txt LICENSE - LTTNG_BABELTRACE_DEPENDENCIES = popt util-linux libglib2 host-pkgconf +LTTNG_BABELTRACE_CONF_OPTS += --disable-debug-info HOST_LTTNG_BABELTRACE_DEPENDENCIES = \ host-popt host-util-linux host-libglib2 host-pkgconf -# for 0002-configure-fix-uuid-support-detection-on-static-build.patch -LTTNG_BABELTRACE_AUTORECONF = YES - $(eval $(autotools-package)) $(eval $(host-autotools-package))
Signature · 1 line
2.9.3
PATCH v4 3/4 lttng-babeltrace: add host Babeltrace as host utility
In reply to Philippe ProulxAlthough Babeltrace is available for all major Linux distributions, some of them have a quite old version of this project.
---
Changes v3 -> v4:
- Config.in.host: remove paragraph about the fact that you can transfer traces on the host and use a host Babeltrace (as requested by Yann).
package/Config.in.host | 1 + package/lttng-babeltrace/Config.in | 6 ++++-- package/lttng-babeltrace/Config.in.host | 14 ++++++++++++++ package/lttng-babeltrace/lttng-babeltrace.mk | 1 + 4 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 package/lttng-babeltrace/Config.in.host
package/Config.in.host +1 -0
@@ -22,6 +22,7 @@ menu "Host utilities" source "package/jq/Config.in.host" source "package/jsmin/Config.in.host" source "package/lpc3250loader/Config.in.host" + source "package/lttng-babeltrace/Config.in.host" source "package/mfgtools/Config.in.host" source "package/mke2img/Config.in.host" source "package/mkpasswd/Config.in.host"
package/lttng-babeltrace/Config.in +4 -2
@@ -20,8 +20,10 @@ config BR2_PACKAGE_LTTNG_BABELTRACE Having this tool on the target is not mandatory. You can transfer the binary trace output from the target to your - development workstation, and use babeltrace here. Babeltrace - is packaged for all major Linux distributions. + development workstation, and use babeltrace here. + + See the lttng-babeltrace host utility to install Babeltrace + on the host. http://diamon.org/babeltrace
package/lttng-babeltrace/Config.in.host new file +14 -0
@@ -0,0 +1,14 @@ +config BR2_PACKAGE_HOST_LTTNG_BABELTRACE + bool "host lttng-babeltrace" + help + The Babeltrace project provides trace read and write + libraries, as well as a trace converter application. Plugins + can be created for any trace format to allow its conversion + to/from another trace format. + + Babeltrace is the reference implementation of the Common + Trace Format (see <http://diamon.org/ctf/>). Babeltrace + can decode and display LTTng traces, since the latter are + written using the CTF format. + + http://diamon.org/babeltrace
package/lttng-babeltrace/lttng-babeltrace.mk +1 -0
@@ -13,6 +13,7 @@ LTTNG_BABELTRACE_DEPENDENCIES = popt util-linux libglib2 host-pkgconf LTTNG_BABELTRACE_CONF_OPTS += --disable-debug-info HOST_LTTNG_BABELTRACE_DEPENDENCIES = \ host-popt host-util-linux host-libglib2 host-pkgconf +HOST_LTTNG_BABELTRACE_CONF_OPTS += --disable-debug-info $(eval $(autotools-package)) $(eval $(host-autotools-package))
Signature · 1 line
2.9.3
PATCH v4 4/4 lttng-babeltrace: add debug info support
In reply to Philippe ProulxSince Babeltrace 1.4, there is support for printing debug information along with compatible traces and event records. Babeltrace needs elfutils in this case. If elfutils can be built with the current configuration, the lttng-babeltrace package selects it and builds with support for debug information. Otherwise the menuconfig shows a comment which explains why debug information support cannot be built.
---
Changes v3 -> v4:
- Remove duplicate --disable-debug-info.
- Replace patch to remove line in configure.ac with patch submitted upstream to add a cache variable to the elfutils check.
- Use said cache variable in LTTNG_BABELTRACE_CONF_ENV.
...-m4-ax_lib_elfutils.m4-add-cache-variable.patch | 74 ++++++++++++++++++++++ package/lttng-babeltrace/Config.in | 17 +++++ package/lttng-babeltrace/lttng-babeltrace.mk | 12 +++- 3 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch new file +74 -0
@@ -0,0 +1,74 @@ +From 697ab0905c59561562dc52cd3b925781e07814f3 Mon Sep 17 00:00:00 2001 +From: Philippe Proulx <[email protected]> +Date: Wed, 2 Nov 2016 01:40:12 -0400 +Subject: [PATCH 1/3] m4/ax_lib_elfutils.m4: add cache variable + +Signed-off-by: Philippe Proulx <[email protected]> +[Philippe: grabbed from this pull request: + https://github.com/efficios/babeltrace/pull/52 +] +--- + m4/ax_lib_elfutils.m4 | 32 +++++++++++++++++--------------- + 1 file changed, 17 insertions(+), 15 deletions(-) + +diff --git a/m4/ax_lib_elfutils.m4 b/m4/ax_lib_elfutils.m4 +index fcfe06b..f4fcb0d 100644 +--- a/m4/ax_lib_elfutils.m4 ++++ b/m4/ax_lib_elfutils.m4 +@@ -21,7 +21,9 @@ + # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + # + # Check the currently installed version of elfutils by using the +-# _ELFUTILS_PREREQ macro defined in elfutils/version.h. ++# `_ELFUTILS_PREREQ` macro defined in <elfutils/version.h>. ++# ++# The cache variable for this test is `bt_cv_lib_elfutils`. + # + # AX_LIB_ELFUTILS(MAJOR_VERSION, MINOR_VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) + # --------------------------------------------------------------------------- +@@ -29,7 +31,6 @@ AC_DEFUN([AX_LIB_ELFUTILS], [ + m4_pushdef([major_version], [$1]) + m4_pushdef([minor_version], [$2]) + +- AC_MSG_CHECKING([for elfutils version >= major_version.minor_version]) + m4_if([$#], 3, [ + m4_pushdef([true_action], [$3]) + ], [ +@@ -43,20 +44,21 @@ AC_DEFUN([AX_LIB_ELFUTILS], [ + AC_MSG_ERROR(elfutils >= major_version.minor_version is required)]) + ]) + +- AC_RUN_IFELSE([ +- AC_LANG_SOURCE([ +- #include <stdlib.h> +- #include <elfutils/version.h> ++ AC_CACHE_CHECK( ++ [for elfutils version >= major_version.minor_version], ++ [bt_cv_lib_elfutils], [ ++ AC_RUN_IFELSE([AC_LANG_SOURCE([ ++ #include <stdlib.h> ++ #include <elfutils/version.h> ++ ++ int main(void) { ++ return _ELFUTILS_PREREQ(major_version, minor_version) ? EXIT_SUCCESS : EXIT_FAILURE; ++ } ++ ])], [bt_cv_lib_elfutils=yes], [bt_cv_lib_elfutils=no]) ++ ] ++ ) + +- int main(void) { +- return _ELFUTILS_PREREQ(major_version, minor_version) ? EXIT_SUCCESS : EXIT_FAILURE; +- } +- ]) +- ], +- echo yes +- true_action, +- echo no +- false_action) ++ AS_IF([test "x$bt_cv_lib_elfutils" = "xyes"], [true_action], [false_action]) + + m4_popdef([false_action]) + m4_popdef([true_action]) +-- +2.9.3 +
package/lttng-babeltrace/Config.in +17 -0
@@ -27,6 +27,23 @@ config BR2_PACKAGE_LTTNG_BABELTRACE http://diamon.org/babeltrace +if BR2_PACKAGE_LTTNG_BABELTRACE + +config BR2_PACKAGE_LTTNG_BABELTRACE_DEBUG_INFO + bool + default y + depends on !BR2_bfin # elfutils + depends on !BR2_STATIC_LIBS # elfutils + depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils + select BR2_PACKAGE_ELFUTILS + +comment "handling debug info in traces needs a glibc or uClibc toolchain w/ dynamic library" + depends on !BR2_bfin # elfutils + depends on BR2_STATIC_LIBS \ + || !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) + +endif + comment "lttng-babeltrace needs a toolchain w/ wchar, threads" depends on BR2_USE_MMU depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
package/lttng-babeltrace/lttng-babeltrace.mk +11 -1
@@ -10,10 +10,20 @@ LTTNG_BABELTRACE_SOURCE = babeltrace-$(LTTNG_BABELTRACE_VERSION).tar.bz2 LTTNG_BABELTRACE_LICENSE = MIT, LGPLv2.1 (include/babeltrace/list.h), GPLv2 (test code) LTTNG_BABELTRACE_LICENSE_FILES = mit-license.txt gpl-2.0.txt LICENSE LTTNG_BABELTRACE_DEPENDENCIES = popt util-linux libglib2 host-pkgconf -LTTNG_BABELTRACE_CONF_OPTS += --disable-debug-info HOST_LTTNG_BABELTRACE_DEPENDENCIES = \ host-popt host-util-linux host-libglib2 host-pkgconf HOST_LTTNG_BABELTRACE_CONF_OPTS += --disable-debug-info +# For 0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch +LTTNG_BABELTRACE_AUTORECONF = YES + +ifeq ($(BR2_PACKAGE_LTTNG_BABELTRACE_DEBUG_INFO),y) +LTTNG_BABELTRACE_DEPENDENCIES += elfutils +LTTNG_BABELTRACE_CONF_OPTS += --enable-debug-info +LTTNG_BABELTRACE_CONF_ENV += bt_cv_lib_elfutils=yes +else +LTTNG_BABELTRACE_CONF_OPTS += --disable-debug-info +endif + $(eval $(autotools-package)) $(eval $(host-autotools-package))
Signature · 1 line
2.9.3
PATCH v4 4/4 lttng-babeltrace: add debug info support
Hello,
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch line 4
Quoted 10 lines · Philippe Proulx
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch new file +4
-0@@ -0,0 +1,74 @@ +From 697ab0905c59561562dc52cd3b925781e07814f3 Mon Sep 17 00:00:00 2001 +From: Philippe Proulx <[email protected]> +Date: Wed, 2 Nov 2016 01:40:12 -0400 +Subject: [PATCH 1/3] m4/ax_lib_elfutils.m4: add cache variable
Please use git format-patch -N to generate the patches. I've fixed that up manually.
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch line 5
Quoted 1 line
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch new file +1
-0+
This patch really needed a better commit log, so I've added some details here.
Essentially: an empty commit log for a non-trivial patch is always a bug. And I believe this rule is not Buildroot specific.
Quoted 6 lines
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch new file +6
-0+if BR2_PACKAGE_LTTNG_BABELTRACE + +config BR2_PACKAGE_LTTNG_BABELTRACE_DEBUG_INFO + bool + default y + depends on !BR2_bfin # elfutils
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch line 21
Quoted 10 lines
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch new file +10
-0+ depends on !BR2_STATIC_LIBS # elfutils + depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils + select BR2_PACKAGE_ELFUTILS + +comment "handling debug info in traces needs a glibc or uClibc toolchain w/ dynamic library" + depends on !BR2_bfin # elfutils + depends on BR2_STATIC_LIBS \ + || !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) + +endif
This stuff is really complicated, so I've instead removed the sub-option, and simply made lttng-babeltrace.mk enable debug info support when BR2_PACKAGE_ELFUTILS=y.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH v4 4/4 lttng-babeltrace: add debug info support
Quoted 4 lines · Thomas Petazzoni
Hello,
On Wed, 2 Nov 2016 02:55:08 -0400, Philippe Proulx wrote:
Quoted 13 lines
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch line 4
Quoted 10 lines
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch new file +4
-0@@ -0,0 +1,74 @@ +From 697ab0905c59561562dc52cd3b925781e07814f3 Mon Sep 17 00:00:00 2001 +From: Philippe Proulx <[email protected]> +Date: Wed, 2 Nov 2016 01:40:12 -0400 +Subject: [PATCH 1/3] m4/ax_lib_elfutils.m4: add cache variablePlease use git format-patch -N to generate the patches. I've fixed that up manually.
I always forget this, sorry.
Quoted 21 lines
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch line 5
Quoted 2 lines
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch new file +1
-0+This patch really needed a better commit log, so I've added some details here.
Essentially: an empty commit log for a non-trivial patch is always a bug. And I believe this rule is not Buildroot specific.
Quoted 12 lines
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch new file +12
-0+if BR2_PACKAGE_LTTNG_BABELTRACE + +config BR2_PACKAGE_LTTNG_BABELTRACE_DEBUG_INFO + bool + default y + depends on !BR2_bfin # elfutils + depends on !BR2_STATIC_LIBS # elfutils + depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC # elfutils + select BR2_PACKAGE_ELFUTILS + +comment "handling debug info in traces needs a glibc or uClibc toolchain w/ dynamic library" + depends on !BR2_bfin # elfutils
Quoted 8 lines
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch line 21
Quoted 4 lines
package/lttng-babeltrace/0002-m4-ax_lib_elfutils.m4-add-cache-variable.patch new file +4
-0+ depends on BR2_STATIC_LIBS \ + || !(BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC) + +endifThis stuff is really complicated, so I've instead removed the sub-option, and simply made lttng-babeltrace.mk enable debug info support when BR2_PACKAGE_ELFUTILS=y.
But then, if BR2_PACKAGE_ELFUTILS=n, you don't know that you could have debug info support in Babeltrace if BR2_PACKAGE_ELFUTILS=y.
Or maybe it's not the job of menuconfig to tell the available features.
Phil
Quoted 8 lines
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
PATCH v4 4/4 lttng-babeltrace: add debug info support
Hello,
Quoted 6 lines · Philippe Proulx
Quoted 3 lines
This stuff is really complicated, so I've instead removed the sub-option, and simply made lttng-babeltrace.mk enable debug info support when BR2_PACKAGE_ELFUTILS=y.
But then, if BR2_PACKAGE_ELFUTILS=n, you don't know that you could have debug info support in Babeltrace if BR2_PACKAGE_ELFUTILS=y.
We have such automatic dependencies in a large number of packages, we simply can't add sub-options for each and every features. Since this one is not necessarily trivial, I've added in the commit an additional paragraph in the Config.in help text to hint the user about the need to enable elfutils to get debug info support.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
Thomas Petazzoni
Appliedv4 cover Update LTTng packages to 2.8.x and Babeltrace to 1.4.0
In reply to Philippe ProulxHello,
Quoted 8 lines · Philippe Proulx
See if this is okay and I will rename lttng-babeltrace to babeltrace again and submit this last patch.
Philippe Proulx (4):
lttng-tools: bump to version 2.8.2
lttng-babeltrace: bump to version 1.4.0
lttng-babeltrace: add host Babeltrace as host utility
lttng-babeltrace: add debug info support
I've applied all patches, with some changes to the last patch. I'll reply to this one separately.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
v4 cover Update LTTng packages to 2.8.x and Babeltrace to 1.4.0
Hello,
Quoted 4 lines · Thomas Petazzoni
Quoted 3 lines · Philippe Proulx
See if this is okay and I will rename lttng-babeltrace to babeltrace again and submit this last patch.
Quoted 8 lines
Quoted 5 lines
Philippe Proulx (4):
lttng-tools: bump to version 2.8.2
lttng-babeltrace: bump to version 1.4.0
lttng-babeltrace: add host Babeltrace as host utility
lttng-babeltrace: add debug info supportI've applied all patches, with some changes to the last patch. I'll reply to this one separately.
BTW, would you mind adding yourself to the DEVELOPERS file for the lttng related packages? I'm currently listed as the person taking care of them since I initially introduced those packages, but I'm not actively using LTTng, so it would be better if someone else was listed for those packages.
Being listed as a developer means that:
1/ You will be Cc'ed on patches submitted by others that touch those
packages
2/ You will receive a notification when there are build issues related
to those packages.
If you agree, please remove me as the developer for those packages, in the same patch.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
v4 cover Update LTTng packages to 2.8.x and Babeltrace to 1.4.0
Quoted 25 lines · Thomas Petazzoni
Hello,
Quoted 4 lines · Thomas Petazzoni
Quoted 3 lines · Philippe Proulx
See if this is okay and I will rename lttng-babeltrace to babeltrace again and submit this last patch.
Quoted 8 lines
Quoted 5 lines
Philippe Proulx (4):
lttng-tools: bump to version 2.8.2
lttng-babeltrace: bump to version 1.4.0
lttng-babeltrace: add host Babeltrace as host utility
lttng-babeltrace: add debug info supportI've applied all patches, with some changes to the last patch. I'll reply to this one separately.
BTW, would you mind adding yourself to the DEVELOPERS file for the lttng related packages? I'm currently listed as the person taking care of them since I initially introduced those packages, but I'm not actively using LTTng, so it would be better if someone else was listed for those packages.
Being listed as a developer means that:
Quoted 8 lines
1/ You will be Cc'ed on patches submitted by others that touch those
packages2/ You will receive a notification when there are build issues related
to those packages.If you agree, please remove me as the developer for those packages, in the same patch.
Yes, why not. I'm in a pretty good position to know the updates of those projects, so will do.
Phil
Quoted 8 lines
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com