qemu: fix compile error with lttng-ust
PATCH 1/2 qemu: fix compile error with lttng-ust
From: Kai Kang <[email protected]>
When PACKAGECONFIG ust is enabled for qemu, it fails to compile:
| In file included from trace/trace-ust-all.h:44179,
| from trace/trace-ust-all.c:13:
| /path_to/qemu/6.2.0-r0/recipe-sysroot/usr/include/lttng/tracepoint-event.h:67:10:
error: #include expects "FILENAME" or <FILENAME>
| 67 | #include LTTNG_UST_TRACEPOINT_INCLUDE
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~Backport upstream commit to fix it.
--- meta/recipes-devtools/qemu/qemu.inc | 1 + ...-fix-compilation-with-lttng-ust-2.13.patch | 75 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/0001-trace-fix-compilation-with-lttng-ust-2.13.patch
meta/recipes-devtools/qemu/qemu.inc +1 -0
@@ -128,6 +128,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2024-3446-0005.patch \ file://CVE-2024-3446-0006.patch \ file://CVE-2024-3447.patch \ + file://0001-trace-fix-compilation-with-lttng-ust-2.13.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
meta/recipes-devtools/qemu/qemu/0001-trace-fix-compilation-with-lttng-ust-2.13.patch new file +75 -0
75 lines not on this page · raw message
Signature · 1 line
2.47.0
PATCH 2/2 qemu: update PACKAGECONFIG ust
From: Kai Kang <[email protected]>
When PACKAGECONFIG ust is not enabled, it sets trace backend with 'nop' which disables tracing for qemu. It should use the default backend 'log' rather than disable tracing.
--- meta/recipes-devtools/qemu/qemu.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/qemu/qemu.inc +1 -1
@@ -299,7 +299,7 @@ PACKAGECONFIG[libxml2] = "--enable-libxml2,--disable-libxml2,libxml2" PACKAGECONFIG[attr] = "--enable-attr,--disable-attr,attr," PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd,ceph,ceph" PACKAGECONFIG[vhost] = "--enable-vhost-net,--disable-vhost-net,," -PACKAGECONFIG[ust] = "--enable-trace-backend=ust,--enable-trace-backend=nop,lttng-ust," +PACKAGECONFIG[ust] = "--enable-trace-backend=ust,--enable-trace-backend=log,lttng-ust," PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,," PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp" # libnfs is currently provided by meta-kodi
Signature · 1 line
2.47.0
Hi Kai,
I'm getting reproducibility errors with this patch set:
AssertionError: The following deb packages are missing or different
and not in exclusion list:/srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB/tmp/deploy/deb/./core2-64/qemu-src_6.2.0-r0_amd64.deb The following ipk packages are missing or different and not in
exclusion list:/srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB/tmp/deploy/ipk/./core2-64/qemu-src_6.2.0-r0_core2-64.ipk The following rpm packages are missing or different and not in
exclusion list:/srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB/tmp/deploy/rpm/./core2_64/qemu-src-6.2.0-r0.core2_64.rpm
The diffoscope output is here:
https://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20250219-aucltpnr/packages/diff-html/
It appears that full build machine paths are appearing in the packages (see above link)
Steve
Quoted 126 lines · Kai Kang via lists.openembedded.org
From: Kai Kang <[email protected]>
When PACKAGECONFIG ust is enabled for qemu, it fails to compile:
| In file included from trace/trace-ust-all.h:44179, | from trace/trace-ust-all.c:13: | /path_to/qemu/6.2.0-r0/recipe-sysroot/usr/include/lttng/tracepoint-event.h:67:10: error: #include expects "FILENAME" or <FILENAME> | 67 | #include LTTNG_UST_TRACEPOINT_INCLUDE | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~Backport upstream commit to fix it.
Signed-off-by Kai Kang <[email protected]>--- meta/recipes-devtools/qemu/qemu.inc | 1 + ...-fix-compilation-with-lttng-ust-2.13.patch | 75 +++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 meta/recipes-devtools/qemu/qemu/0001-trace-fix-compilation-with-lttng-ust-2.13.patchmeta/recipes-devtools/qemu/qemu.inc +1
-0@@ -128,6 +128,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2024-3446-0005.patch \ file://CVE-2024-3446-0006.patch \ file://CVE-2024-3447.patch \ + file://0001-trace-fix-compilation-with-lttng-ust-2.13.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"meta/recipes-devtools/qemu/qemu/0001-trace-fix-compilation-with-lttng-ust-2.13.patch new file +75
-1@@ -0,0 +1,75 @@ +From e32aaa5a19e24233180042f84a0235a209de71cc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <[email protected]> +Date: Mon, 28 Mar 2022 12:47:13 +0400 +Subject: [PATCH] trace: fix compilation with lttng-ust >= 2.13 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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 <[email protected]> +Reviewed-by: Stefan Hajnoczi <[email protected]> +Message-Id: <[email protected]> +Signed-off-by: Thomas Huth <[email protected]> + +Upstream-Status: Backport [https://github.com/qemu/qemu/commit/e32aaa5] + +Signed-off-by: Kai Kang <[email protected]> +--- + 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.47.1 + --2.47.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#211689): https://lists.openembedded.org/g/openembedded-core/message/211689
Mute This Topic: https://lists.openembedded.org/mt/111266608/3620601
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Quoted 14 lines · Steve Sakoman
Hi Kai,
I'm getting reproducibility errors with this patch set:
AssertionError: The following deb packages are missing or different
and not in exclusion list:/srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB/tmp/deploy/deb/./core2-64/qemu-src_6.2.0-r0_amd64.debThe following ipk packages are missing or different and not in
exclusion list:/srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB/tmp/deploy/ipk/./core2-64/qemu-src_6.2.0-r0_core2-64.ipkThe following rpm packages are missing or different and not in
exclusion list:/srv/pokybuild/yocto-worker/reproducible/build/build-st/reproducibleB/tmp/deploy/rpm/./core2_64/qemu-src-6.2.0-r0.core2_64.rpm
Quoted 6 lines
The diffoscope output is here:
https://valkyrie.yocto.io/pub/repro-fail/oe-reproducible-20250219-aucltpnr/packages/diff-html/
It appears that full build machine paths are appearing in the packages (see above link)
OK. I'll figure out the root cause.
Regards,
Kai
Quoted 130 lines
Steve
Quoted 125 lines · Kai Kang via lists.openembedded.org
From: Kai Kang <[email protected]>
When PACKAGECONFIG ust is enabled for qemu, it fails to compile:
| In file included from trace/trace-ust-all.h:44179, | from trace/trace-ust-all.c:13: | /path_to/qemu/6.2.0-r0/recipe-sysroot/usr/include/lttng/tracepoint-event.h:67:10: error: #include expects "FILENAME" or <FILENAME> | 67 | #include LTTNG_UST_TRACEPOINT_INCLUDE | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~Backport upstream commit to fix it.
Signed-off-by Kai Kang <[email protected]>--- meta/recipes-devtools/qemu/qemu.inc | 1 + ...-fix-compilation-with-lttng-ust-2.13.patch | 75 +++++++++++++++++++ 2 files changed, 76 insertions(+)create mode 100644
meta/recipes-devtools/qemu/qemu/0001-trace-fix-compilation-with-lttng-ust-2.13.patchmeta/recipes-devtools/qemu/qemu.inc +1
-0@@ -128,6 +128,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ file://CVE-2024-3446-0005.patch \ file://CVE-2024-3446-0006.patch \ file://CVE-2024-3447.patch \ + file://0001-trace-fix-compilation-with-lttng-ust-2.13.patch \ " UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"meta/recipes-devtools/qemu/qemu/0001-trace-fix-compilation-with-lttng-ust-2.13.patch new file +75
-1@@ -0,0 +1,75 @@ +From e32aaa5a19e24233180042f84a0235a209de71cc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <[email protected]> +Date: Mon, 28 Mar 2022 12:47:13 +0400 +Subject: [PATCH] trace: fix compilation with lttng-ust >= 2.13 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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 <[email protected]> +Reviewed-by: Stefan Hajnoczi <[email protected]> +Message-Id: <[email protected]> +Signed-off-by: Thomas Huth <[email protected]> + +Upstream-Status: Backport [https://github.com/qemu/qemu/commit/e32aaa5] + +Signed-off-by: Kai Kang <[email protected]> +--- + 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.47.1 + --2.47.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#211689): https://lists.openembedded.org/g/openembedded-core/message/211689
Mute This Topic: https://lists.openembedded.org/mt/111266608/3620601
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 2 lines
Kai Kang Wind River Linux