diff options
author | Victor Kamensky <victor.kamensky7@gmail.com> | 2023-12-17 22:07:57 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-20 07:47:00 +0000 |
commit | e428775da9659a0502cc14ef732d2089260b4416 (patch) | |
tree | 8767694a009ddda044abdcf7a6a493f36e381e14 /meta | |
parent | 378a553dc701da628e4fb63a6eec4b83c27f6a10 (diff) | |
download | poky-e428775da9659a0502cc14ef732d2089260b4416.tar.gz |
systemtap: fix libdebuginfod auto detection logic
Addresses an issue when systemtap is built in situation where debuginfod
is not part of DISTRO_FEATURES and latest SystemTap has problem of
auto detecting libdebuginfod library as it was reported by Martin
Jansa in [1].
[1] https://lists.openembedded.org/g/openembedded-core/message/192109?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Acreated%2C0%2Csystemtap%2C20%2C2%2C0%2C102987514
(From OE-Core rev: bf635f8f2258f8b8beb0adb8dead2b6b40b2274a)
Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-kernel/systemtap/systemtap/0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch | 51 | ||||
-rw-r--r-- | meta/recipes-kernel/systemtap/systemtap_git.inc | 1 |
2 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-kernel/systemtap/systemtap/0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch b/meta/recipes-kernel/systemtap/systemtap/0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch new file mode 100644 index 0000000000..98641826f6 --- /dev/null +++ b/meta/recipes-kernel/systemtap/systemtap/0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From 3913ad3e28a19811e1b52338112344a487057e4f Mon Sep 17 00:00:00 2001 | ||
2 | From: Victor Kamensky <victor.kamensky7@gmail.com> | ||
3 | Date: Mon, 18 Dec 2023 03:13:38 +0000 | ||
4 | Subject: [PATCH 1/2] configure.ac: fix broken libdebuginfod library auto | ||
5 | detection | ||
6 | |||
7 | After 2e67b053e3796ee7cf29a39f9698729b52078406 "configury: rework debuginfod searches" | ||
8 | commit, libdebuginfod.so library auto detection is broken. It was reported by Martin Jansa | ||
9 | on openembedded-core mailing list [1]. | ||
10 | |||
11 | Currently configure.ac does "AC_DEFINE([HAVE_LIBDEBUGINFOD], [1] ..." as long as | ||
12 | no --without-debuginfod option is passed, regardless PKG_CHECK_MODULES check result. | ||
13 | It seems to be bad copy/paste. Address the issue by moving the AC_DEFINE back to | ||
14 | PKG_CHECK_MODULES action-if-found block. | ||
15 | |||
16 | To reproduce the issue on FC system, one can do the following | ||
17 | "sudo dnf remove elfutils-debuginfod-client-devel" and then try to build SystemTap | ||
18 | util.cxx will fail to compile because of missing elfutils/debuginfod.h because | ||
19 | config.h will have "#define HAVE_LIBDEBUGINFOD 1", while config.log and configure | ||
20 | output indicates that check for libdebuginfod library failed. | ||
21 | |||
22 | [1] https://lists.openembedded.org/g/openembedded-core/message/192109?p=%2C%2C%2C20%2C0%2C0%2C0%3A%3Acreated%2C0%2Csystemtap%2C20%2C2%2C0%2C102987514 | ||
23 | |||
24 | Upstream-Status: Submitted [https://sourceware.org/pipermail/systemtap/2023q4/027914.html] | ||
25 | Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com> | ||
26 | --- | ||
27 | configure.ac | 5 ++--- | ||
28 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
29 | |||
30 | diff --git a/configure.ac b/configure.ac | ||
31 | index d9559c5c3..18cd7f84a 100644 | ||
32 | --- a/configure.ac | ||
33 | +++ b/configure.ac | ||
34 | @@ -219,12 +219,11 @@ dnl take the user at his or her word | ||
35 | elif test "x$with_debuginfod" != xno; then | ||
36 | dnl check in the system pkgconfig | ||
37 | PKG_CHECK_MODULES([debuginfod], [libdebuginfod >= 0.179], | ||
38 | - [have_debuginfod=1], | ||
39 | + [have_debuginfod=1 | ||
40 | + AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.])], | ||
41 | [if test "x$with_debuginfod" = xyes; then | ||
42 | AC_MSG_ERROR(["--with-debuginfod was given, but libdebuginfod is missing or unusable."]) | ||
43 | fi]) | ||
44 | - AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.]) | ||
45 | - AC_MSG_RESULT([yes]) | ||
46 | else | ||
47 | AC_MSG_RESULT([no]) | ||
48 | fi | ||
49 | -- | ||
50 | 2.31.1 | ||
51 | |||
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc index 9fe85676fc..bebfa7f777 100644 --- a/meta/recipes-kernel/systemtap/systemtap_git.inc +++ b/meta/recipes-kernel/systemtap/systemtap_git.inc | |||
@@ -9,6 +9,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git;branch=master;protocol=https \ | |||
9 | file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \ | 9 | file://0001-staprun-stapbpf-don-t-support-installing-a-non-root.patch \ |
10 | file://0001-Makefile.am-remove-runtime-linux-uprobes-and-runtime.patch \ | 10 | file://0001-Makefile.am-remove-runtime-linux-uprobes-and-runtime.patch \ |
11 | file://0001-prerelease-datestamp-fixes.patch \ | 11 | file://0001-prerelease-datestamp-fixes.patch \ |
12 | file://0001-configure.ac-fix-broken-libdebuginfod-library-auto-d.patch \ | ||
12 | " | 13 | " |
13 | 14 | ||
14 | COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips|riscv64).*-linux' | 15 | COMPATIBLE_HOST = '(x86_64|i.86|powerpc|arm|aarch64|microblazeel|mips|riscv64).*-linux' |