mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
lttng-tools: update to 2.15.0
Remove obsolete patches: - 010-compat-off64_t-is-not-defined-by-musl.patch: the patched files (src/common/compat/compat-fcntl.c and src/common/compat/fcntl.h) no longer exist in 2.15.0 - 020-fix-lttng-tools-fails-to-compile-with-libxml2-2-14-0.patch: the encode_string() function was refactored in 2.15.0 to use xmlCharEncInFunc() instead of handler->input(), so the fix is no longer needed Add musl compatibility fixes in Build/Prepare via sed: - Remove :: global-namespace qualifier from TFD_CLOEXEC in timerfd.hpp; musl defines it as an octal literal so ::TFD_CLOEXEC is invalid C++ - Same fix for EPOLL_CLOEXEC in poller.cpp - Relax static_assert in consumer.hpp from __cplusplus == 201103L to >= 201103L; SDK builds with C++17 Add missing +libstdcpp to DEPENDS (lttng-tools links libstdc++.so.6). Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
This commit is contained in:
committed by
Alexandru Ardelean
parent
a6ea77f3b2
commit
8dbb989cb7
@@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=lttng-tools
|
||||
PKG_VERSION:=2.13.15
|
||||
PKG_VERSION:=2.15.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=https://lttng.org/files/$(PKG_NAME)/
|
||||
PKG_HASH:=96ea42351ee112c19dad9fdc7aae93b583d9f1722b2175664a381d2d337703c4
|
||||
PKG_HASH:=4d739116556da71d58275bc7f0a6c0a967c6774b7d90f02c2731a7875debf28a
|
||||
|
||||
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
|
||||
PKG_LICENSE:=LGPL-2.1 GPL-2.0
|
||||
@@ -31,7 +31,7 @@ define Package/lttng-tools
|
||||
CATEGORY:=Development
|
||||
TITLE:=Linux Trace Toolkit: next generation (tools)
|
||||
URL:=https://lttng.org/
|
||||
DEPENDS:= +lttng-ust +libpopt +libxml2 $(ICONV_DEPENDS)
|
||||
DEPENDS:= +lttng-ust +libpopt +libxml2 +libstdcpp $(ICONV_DEPENDS)
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
@@ -45,6 +45,14 @@ CONFIGURE_ARGS += \
|
||||
--without-kmod \
|
||||
--with-pic
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
$(SED) 's/::TFD_CLOEXEC/TFD_CLOEXEC/g' $(PKG_BUILD_DIR)/src/common/timerfd.hpp
|
||||
$(SED) 's/::EPOLL_CLOEXEC/EPOLL_CLOEXEC/g' $(PKG_BUILD_DIR)/src/common/poller.cpp
|
||||
$(SED) 's/__cplusplus == 201103L/__cplusplus >= 201103L/' \
|
||||
$(PKG_BUILD_DIR)/src/bin/lttng-sessiond/consumer.hpp
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/lttng $(1)/usr/include/
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
From 57fd993799a2b081c826f6fc8def32d28d526bfb Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Galarneau?=
|
||||
<jeremie.galarneau@efficios.com>
|
||||
Date: Tue, 17 Jan 2023 16:57:35 -0500
|
||||
Subject: [PATCH] compat: off64_t is not defined by musl
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
This helps compile with latest musl, where off64_t is not defined unless
|
||||
_LARGEFILE64_SOURCE is defined. On glibc, _LARGEFILE64_SOURCE is defined
|
||||
if _GNU_SOURCE is defined, so the problem is only seen with musl.
|
||||
|
||||
Since the project uses AC_SYS_LARGEFILE, which from the autoconf doc:
|
||||
"arrange for 64-bit file offsets, known as large-file support."
|
||||
|
||||
As such, it is safe to assume off_t is 64-bit wide. This is checked by a
|
||||
static_assert to catch any platform where autoconf would let a 32-bit
|
||||
off_t slip.
|
||||
|
||||
Reported-by: Khem Raj <raj.khem@gmail.com>
|
||||
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
|
||||
Change-Id: If2c6007a8c85bc3f3065002af8a7538b882fb4a8
|
||||
---
|
||||
src/common/compat/compat-fcntl.cpp | 2 +-
|
||||
src/common/compat/fcntl.hpp | 11 +++++------
|
||||
2 files changed, 6 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/src/common/compat/compat-fcntl.c
|
||||
+++ b/src/common/compat/compat-fcntl.c
|
||||
@@ -13,7 +13,7 @@
|
||||
#ifdef __linux__
|
||||
|
||||
LTTNG_HIDDEN
|
||||
-int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
|
||||
+int compat_sync_file_range(int fd, off_t offset, off_t nbytes,
|
||||
unsigned int flags)
|
||||
{
|
||||
#ifdef HAVE_SYNC_FILE_RANGE
|
||||
--- a/src/common/compat/fcntl.h
|
||||
+++ b/src/common/compat/fcntl.h
|
||||
@@ -8,21 +8,21 @@
|
||||
#ifndef _COMPAT_FCNTL_H
|
||||
#define _COMPAT_FCNTL_H
|
||||
|
||||
+#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <common/compat/errno.h>
|
||||
|
||||
-#if (defined(__CYGWIN__))
|
||||
-typedef long long off64_t;
|
||||
-#endif
|
||||
+static_assert(sizeof(off_t) == sizeof(int64_t),
|
||||
+ "Build system is misconfigured, off_t must be 64-bit wide");
|
||||
|
||||
#if (defined(__FreeBSD__) || defined(__sun__))
|
||||
typedef off64_t loff_t;
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
-extern int compat_sync_file_range(int fd, off64_t offset, off64_t nbytes,
|
||||
+extern int compat_sync_file_range(int fd, off_t offset, off_t nbytes,
|
||||
unsigned int flags);
|
||||
#define lttng_sync_file_range(fd, offset, nbytes, flags) \
|
||||
compat_sync_file_range(fd, offset, nbytes, flags)
|
||||
@@ -37,8 +37,8 @@ extern int compat_sync_file_range(int fd
|
||||
#define SYNC_FILE_RANGE_WAIT_BEFORE 0
|
||||
#define SYNC_FILE_RANGE_WRITE 0
|
||||
|
||||
-static inline int lttng_sync_file_range(int fd, off64_t offset,
|
||||
- off64_t nbytes, unsigned int flags)
|
||||
+static inline int lttng_sync_file_range(int fd, off_t offset,
|
||||
+ off_t nbytes, unsigned int flags)
|
||||
{
|
||||
return -ENOSYS;
|
||||
}
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
From 7d669a90212e105b0f669aa2ab38c987b187baab Mon Sep 17 00:00:00 2001
|
||||
From: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
Date: Wed, 21 May 2025 13:09:25 +0800
|
||||
Subject: [PATCH] fix lttng-tools fails to compile with libxml2 2.14.0+
|
||||
|
||||
Description:
|
||||
| In file included from /srv/pokybuild/yocto-worker/qemux86-alt/build/build/tmp/work/core2-32-poky-linux/lttng-tools/2.13.15/recipe-sysroot/usr/include/libxml2/libxml/parser.h:25,
|
||||
| from ../../../../lttng-tools-2.13.15/src/common/config/session-config.c:29:
|
||||
| /srv/pokybuild/yocto-worker/qemux86-alt/build/build/tmp/work/core2-32-poky-linux/lttng-tools/2.13.15/recipe-sysroot/usr/include/libxml2/libxml/encoding.h:173:7: note: declared here
|
||||
| 173 | } input XML_DEPRECATED_MEMBER;
|
||||
| | ^~~~~
|
||||
| ../../../../lttng-tools-2.13.15/src/common/config/session-config.c:432:15: error: called object is not a function or function pointer
|
||||
| 432 | ret = handler->input(out_str, &out_len, (const xmlChar *) in_str, &in_len);
|
||||
| | ^~~~~~~
|
||||
| At top level:
|
||||
| cc1: note: unrecognized command-line option '-Wno-incomplete-setjmp-declaration' may have been intended to silence earlier diagnostics
|
||||
|
||||
According to [1][2], the UTF-8 handler is
|
||||
```
|
||||
static xmlCharEncError
|
||||
UTF8ToUTF8(void *vctxt ATTRIBUTE_UNUSED,
|
||||
unsigned char* out, int *outlen,
|
||||
const unsigned char* in, int *inlen,
|
||||
int flush ATTRIBUTE_UNUSED)
|
||||
```
|
||||
|
||||
Update input.func with setting ATTRIBUTE_UNUSED params with NULL and 0
|
||||
|
||||
[1] https://gitlab.gnome.org/GNOME/libxml2/-/commit/38f475072aefe032fff1dc058df3e56c1e7062fa
|
||||
[2] https://gitlab.gnome.org/GNOME/libxml2/-/commit/69b83bb68e2a8ed0013f80c51b9a358714b00c9a#478024cc18a2cc8dbaed34076e9775f6827f413d_2188_2201
|
||||
|
||||
Signed-off-by: Marko, Peter <Peter.Marko@siemens.com>
|
||||
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
|
||||
---
|
||||
src/common/config/session-config.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/src/common/config/session-config.c
|
||||
+++ b/src/common/config/session-config.c
|
||||
@@ -429,7 +429,7 @@ static xmlChar *encode_string(const char
|
||||
goto end;
|
||||
}
|
||||
|
||||
- ret = handler->input(out_str, &out_len, (const xmlChar *) in_str, &in_len);
|
||||
+ ret = handler->input.func(NULL, out_str, &out_len, (const xmlChar *) in_str, &in_len, 0);
|
||||
if (ret < 0) {
|
||||
xmlFree(out_str);
|
||||
out_str = NULL;
|
||||
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
case "$1" in
|
||||
lttng-tools)
|
||||
lttng --version 2>&1 | grep -qF "$2" || {
|
||||
echo "FAIL: lttng --version did not print expected version '$2'"
|
||||
exit 1
|
||||
}
|
||||
echo "lttng version: OK"
|
||||
|
||||
# Library must be present
|
||||
[ -e /usr/lib/liblttng-ctl.so.4 ] || \
|
||||
ls /usr/lib/liblttng-ctl.so.* >/dev/null 2>&1 || {
|
||||
echo "FAIL: liblttng-ctl.so not found"
|
||||
exit 1
|
||||
}
|
||||
echo "liblttng-ctl: OK"
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user