File configure.ac-fix-broken-libdebuginfod-library-auto-detection.patch of Package systemtap-headers
70
1
From: Victor Kamensky <victor.kamensky7@gmail.com>
2
Date: Sun, 17 Dec 2023 21:01:34 -0800
3
Subject: configure.ac: fix broken libdebuginfod library auto detection
4
Git-repo: git://sourceware.org/git/systemtap.git
5
Git-commit: 9f097c3f93ce892fc26cdd6c17daa1b10d3047c2
6
References: bsc#1223327
7
8
After 2e67b053e3796ee7cf29a39f9698729b52078406 "configury: rework debuginfod searches"
9
commit, libdebuginfod.so library auto detection is broken. It was reported by Martin Jansa
10
on openembedded-core mailing list [1].
11
12
Currently configure.ac does "AC_DEFINE([HAVE_LIBDEBUGINFOD], [1] ..." as long as
13
no --without-debuginfod option is passed, regardless PKG_CHECK_MODULES check result.
14
It seems to be bad copy/paste. Address the issue by moving the AC_DEFINE back to
15
PKG_CHECK_MODULES action-if-found block.
16
17
To reproduce the issue on FC system, one can do the following
18
"sudo dnf remove elfutils-debuginfod-client-devel" and then try to build SystemTap
19
util.cxx will fail to compile because of missing elfutils/debuginfod.h because
20
config.h will have "#define HAVE_LIBDEBUGINFOD 1", while config.log and configure
21
output indicates that check for libdebuginfod library failed.
22
23
[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
24
25
Signed-off-by: Victor Kamensky <victor.kamensky7@gmail.com>
26
Signed-off-by: <tonyj@suse.de>
27
---
28
configure | 4 +---
29
configure.ac | 5 ++---
30
2 files changed, 3 insertions(+), 6 deletions(-)
31
32
diff --git a/configure b/configure
33
index d3beeba56..b11466413 100755
34
--- a/configure
35
+++ b/configure
36
37
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
38
printf "%s\n" "yes" >&6; }
39
have_debuginfod=1
40
-fi
41
42
printf "%s\n" "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h
43
44
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45
-printf "%s\n" "yes" >&6; }
46
+fi
47
else
48
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
49
printf "%s\n" "no" >&6; }
50
diff --git a/configure.ac b/configure.ac
51
index d9559c5c3..18cd7f84a 100644
52
--- a/configure.ac
53
+++ b/configure.ac
54
55
elif test "x$with_debuginfod" != xno; then
56
dnl check in the system pkgconfig
57
PKG_CHECK_MODULES([debuginfod], [libdebuginfod >= 0.179],
58
- [have_debuginfod=1],
59
+ [have_debuginfod=1
60
+ AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.])],
61
[if test "x$with_debuginfod" = xyes; then
62
AC_MSG_ERROR(["--with-debuginfod was given, but libdebuginfod is missing or unusable."])
63
fi])
64
- AC_DEFINE([HAVE_LIBDEBUGINFOD], [1], [Define to 1 if debuginfod is enabled.])
65
- AC_MSG_RESULT([yes])
66
else
67
AC_MSG_RESULT([no])
68
fi
69
70