[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 6/6] trace: fix compilation with lttng-ust >= 2.13
From: |
Thomas Huth |
Subject: |
[PULL 6/6] trace: fix compilation with lttng-ust >= 2.13 |
Date: |
Fri, 1 Apr 2022 17:23:23 +0200 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
On Fedora 36, with lttng-ust 2.13.1, compilation fails with:
In file included from trace/trace-ust-all.h:49085,
from trace/trace-ust-all.c:13:
/usr/include/lttng/tracepoint-event.h:67:10: error: #include expects "FILENAME"
or <FILENAME>
67 | #include LTTNG_UST_TRACEPOINT_INCLUDE
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In lttng-ust commit 41858e2b6e8 ("Fix: don't do macro expansion in
tracepoint file name") from 2012, starting from lttng-ust 2.1, the API
was changed to expect TRACEPOINT_INCLUDE to be defined as a string.
In lttng-ust commit d2966b4b0b2 ("Remove TRACEPOINT_INCLUDE_FILE
macro"), in 2021, the compatibility macro was removed.
Use the "new" API from 2012, and bump the version requirement to 2.1 to
fix compilation with >= 2.13.
According to repology, all distributions we support have >= 2.1 (centos
8 has oldest with 2.8.1 afaict)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20220328084717.367993-2-marcandre.lureau@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
meson.build | 4 ++--
scripts/tracetool/format/ust_events_h.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/meson.build b/meson.build
index 04ce33fef1..861de93c4f 100644
--- a/meson.build
+++ b/meson.build
@@ -455,8 +455,8 @@ if 'CONFIG_GIO' in config_host
endif
lttng = not_found
if 'ust' in get_option('trace_backends')
- lttng = dependency('lttng-ust', required: true, method: 'pkg-config',
- kwargs: static_kwargs)
+ lttng = dependency('lttng-ust', required: true, version: '>= 2.1',
+ method: 'pkg-config', kwargs: static_kwargs)
endif
pixman = not_found
if have_system or have_tools
diff --git a/scripts/tracetool/format/ust_events_h.py
b/scripts/tracetool/format/ust_events_h.py
index 6ce559f6cc..b99fe6896b 100644
--- a/scripts/tracetool/format/ust_events_h.py
+++ b/scripts/tracetool/format/ust_events_h.py
@@ -29,8 +29,8 @@ def generate(events, backend, group):
'#undef TRACEPOINT_PROVIDER',
'#define TRACEPOINT_PROVIDER qemu',
'',
- '#undef TRACEPOINT_INCLUDE_FILE',
- '#define TRACEPOINT_INCLUDE_FILE ./%s' % include,
+ '#undef TRACEPOINT_INCLUDE',
+ '#define TRACEPOINT_INCLUDE "./%s"' % include,
'',
'#if !defined (TRACE_%s_GENERATED_UST_H) || \\' % group.upper(),
' defined(TRACEPOINT_HEADER_MULTI_READ)',
--
2.27.0
- [PULL 0/6] Misc fixes for 7.0, Thomas Huth, 2022/04/01
- [PULL 1/6] misc: Fixes MAINTAINERS's path .github/workflows/lockdown.yml, Thomas Huth, 2022/04/01
- [PULL 2/6] target/s390x: Fix determination of overflow condition code after addition, Thomas Huth, 2022/04/01
- [PULL 3/6] target/s390x: Fix determination of overflow condition code after subtraction, Thomas Huth, 2022/04/01
- [PULL 5/6] 9p: move P9_XATTR_SIZE_MAX from 9p.h to 9p.c, Thomas Huth, 2022/04/01
- [PULL 4/6] meson.build: Fix dependency of page-vary-common.c to config-poison.h, Thomas Huth, 2022/04/01
- [PULL 6/6] trace: fix compilation with lttng-ust >= 2.13,
Thomas Huth <=
- Re: [PULL 0/6] Misc fixes for 7.0, Peter Maydell, 2022/04/02