diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2025-05-21 16:09:25 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-05-27 09:01:17 +0100 |
commit | 16e762124a6be9722e6f3e8a363b54dec901ff3c (patch) | |
tree | a2672fae0b943afc87adaf918faee5e9c764a21d /meta/recipes-kernel | |
parent | 383df93c6fd5647242e945510e802523f7dbfabf (diff) | |
download | poky-16e762124a6be9722e6f3e8a363b54dec901ff3c.tar.gz |
lttng-tools: fix compile failed 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
(From OE-Core rev: 5feba5682a0d07de94f4b13d7ef24d537c624cf4)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-tools/0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch | 55 | ||||
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb | 1 |
2 files changed, 56 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch new file mode 100644 index 0000000000..7c2b893731 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch | |||
@@ -0,0 +1,55 @@ | |||
1 | From 0b19e10a8a52fab0bfadbac5ce70f1b2d185a1d1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Wed, 21 May 2025 13:09:25 +0800 | ||
4 | Subject: [PATCH] fix lttng-tools fails to compile with libxml2 2.14.0+ | ||
5 | |||
6 | Description: | ||
7 | | 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, | ||
8 | | from ../../../../lttng-tools-2.13.15/src/common/config/session-config.c:29: | ||
9 | | /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 | ||
10 | | 173 | } input XML_DEPRECATED_MEMBER; | ||
11 | | | ^~~~~ | ||
12 | | ../../../../lttng-tools-2.13.15/src/common/config/session-config.c:432:15: error: called object is not a function or function pointer | ||
13 | | 432 | ret = handler->input(out_str, &out_len, (const xmlChar *) in_str, &in_len); | ||
14 | | | ^~~~~~~ | ||
15 | | At top level: | ||
16 | | cc1: note: unrecognized command-line option '-Wno-incomplete-setjmp-declaration' may have been intended to silence earlier diagnostics | ||
17 | |||
18 | |||
19 | According to [1][2], the UTF-8 handler is | ||
20 | ``` | ||
21 | static xmlCharEncError | ||
22 | UTF8ToUTF8(void *vctxt ATTRIBUTE_UNUSED, | ||
23 | unsigned char* out, int *outlen, | ||
24 | const unsigned char* in, int *inlen, | ||
25 | int flush ATTRIBUTE_UNUSED) | ||
26 | ``` | ||
27 | |||
28 | Update input.func with setting ATTRIBUTE_UNUSED params with NULL and 0 | ||
29 | |||
30 | [1] https://gitlab.gnome.org/GNOME/libxml2/-/commit/38f475072aefe032fff1dc058df3e56c1e7062fa | ||
31 | [2] https://gitlab.gnome.org/GNOME/libxml2/-/commit/69b83bb68e2a8ed0013f80c51b9a358714b00c9a#478024cc18a2cc8dbaed34076e9775f6827f413d_2188_2201 | ||
32 | |||
33 | Upstream-Status: Submitted [https://github.com/lttng/lttng-tools/pull/170] | ||
34 | Signed-off-by: Marko, Peter <Peter.Marko@siemens.com> | ||
35 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
36 | --- | ||
37 | src/common/config/session-config.c | 2 +- | ||
38 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
39 | |||
40 | diff --git a/src/common/config/session-config.c b/src/common/config/session-config.c | ||
41 | index bb4e9fe..4042d34 100644 | ||
42 | --- a/src/common/config/session-config.c | ||
43 | +++ b/src/common/config/session-config.c | ||
44 | @@ -429,7 +429,7 @@ static xmlChar *encode_string(const char *in_str) | ||
45 | goto end; | ||
46 | } | ||
47 | |||
48 | - ret = handler->input(out_str, &out_len, (const xmlChar *) in_str, &in_len); | ||
49 | + ret = handler->input.func(NULL, out_str, &out_len, (const xmlChar *) in_str, &in_len, 0); | ||
50 | if (ret < 0) { | ||
51 | xmlFree(out_str); | ||
52 | out_str = NULL; | ||
53 | -- | ||
54 | 2.34.1 | ||
55 | |||
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb b/meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb index 762d4e5c2f..f39404afa0 100644 --- a/meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb +++ b/meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb | |||
@@ -39,6 +39,7 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ | |||
39 | file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \ | 39 | file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \ |
40 | file://0001-tests-add-check_skip_kernel_test-to-check-root-user-.patch \ | 40 | file://0001-tests-add-check_skip_kernel_test-to-check-root-user-.patch \ |
41 | file://0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch \ | 41 | file://0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch \ |
42 | file://0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch \ | ||
42 | " | 43 | " |
43 | 44 | ||
44 | SRC_URI[sha256sum] = "96ea42351ee112c19dad9fdc7aae93b583d9f1722b2175664a381d2d337703c4" | 45 | SRC_URI[sha256sum] = "96ea42351ee112c19dad9fdc7aae93b583d9f1722b2175664a381d2d337703c4" |