Actions
Bug #1427
open
PM
KS
lttng-tools fails to compile with libxml2 2.14.0+
Bug #1427:
lttng-tools fails to compile with libxml2 2.14.0+
Start date:
05/05/2025
Due date:
% Done:
0%
Estimated time:
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
Trivial patch based on https://gitlab.gnome.org/GNOME/libxml2/-/commit/38f475072aefe032fff1dc058df3e56c1e7062fa resulted in green build, but lot of tests have failed showing that this needs to be looked at by someone who understands the code.
diff --git a/src/common/config/session-config.c b/src/common/config/session-config.c
index bb4e9fe..413812b 100644
--- a/src/common/config/session-config.c
+++ b/src/common/config/session-config.c
@@ -429,7 +429,7 @@ static xmlChar *encode_string(const char *in_str)
goto end;
}
- ret = handler->input(out_str, &out_len, (const xmlChar *) in_str, &in_len);
+ ret = handler->input.legacyFunc(out_str, &out_len, (const xmlChar *) in_str, &in_len);
if (ret < 0) {
xmlFree(out_str);
out_str = NULL;
KS Updated by Kienan Stewart 6 months ago
- Status changed from New to In Progress
Hi Peter,
thanks for the bug report. This issue has been fixed upstream in lttng-tools master https://github.com/lttng/lttng-tools/commit/1eadd115f621b19937dccfc849234d2ae4063234 but has yet to be backported to stable-2.13
thanks,
kienan
KS Updated by Kienan Stewart 6 months ago
- Assignee set to Kienan Stewart
HJ Updated by Hongxu Jia 6 months ago
Hi kienan, because the source code has been reworked from C (stable-2.13) to C++ (stable-2.14), it is hardly to backport directly, so submit https://github.com/lttng/lttng-tools/pull/170 try to fix stable-2.13 with minor change
//Hongxu
Actions