diff mbox series

[v2,2/2] kbuild: rpm-pkg: Add elfutils-devel to BuildRequires

Message ID 964B3FC2F607F2F4+20250408081921.63040-2-wangyuli@uniontech.com (mailing list archive)
State New
Headers show
Series kbuild: Support gendwarfksyms | expand

Commit Message

WangYuli April 8, 2025, 8:19 a.m. UTC
The dwarf.h header, which is included by
scripts/gendwarfksyms/gendwarfksyms.h, resides within the libdw-dev
package.

This portion of the code is compiled under the condition that
CONFIG_GENDWARFKSYMS is enabled.

Consequently, add elfutils-devel to BuildRequires to prevent
unforeseen compilation failures.

Fix follow possible error:
  In file included from scripts/gendwarfksyms/cache.c:6:
  scripts/gendwarfksyms/gendwarfksyms.h:6:10: fatal error: 'dwarf.h' file not found
      6 | #include <dwarf.h>
        |          ^~~~~~~~~

Link: https://lore.kernel.org/all/3e52d80d-0c60-4df5-8cb5-21d4b1fce7b7@suse.com/
Fixes: f28568841ae0 ("tools: Add gendwarfksyms")
Suggested-by: Petr Pavlu <petr.pavlu@suse.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
---
 scripts/package/kernel.spec | 1 +
 1 file changed, 1 insertion(+)

Comments

WangYuli April 8, 2025, 8:35 a.m. UTC | #1
Apologies, the commit message had a small problem. I will reply to this 
with the revised v3...

--

WangYuli
diff mbox series

Patch

diff --git a/scripts/package/kernel.spec b/scripts/package/kernel.spec
index 726f34e11960..98f206cb7c60 100644
--- a/scripts/package/kernel.spec
+++ b/scripts/package/kernel.spec
@@ -16,6 +16,7 @@  Source1: config
 Source2: diff.patch
 Provides: kernel-%{KERNELRELEASE}
 BuildRequires: bc binutils bison dwarves
+BuildRequires: (elfutils-devel or libdw-devel)
 BuildRequires: (elfutils-libelf-devel or libelf-devel) flex
 BuildRequires: gcc make openssl openssl-devel perl python3 rsync