[PATCH] Documentation/kbuild: Document gendwarfksyms build dependencies

Jihan LIN via B4 Relay posted 1 patch 1 month ago
Documentation/kbuild/gendwarfksyms.rst | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
[PATCH] Documentation/kbuild: Document gendwarfksyms build dependencies
Posted by Jihan LIN via B4 Relay 1 month ago
From: Jihan LIN <linjh22s@gmail.com>

Although dependencies for gendwarfksyms were recently added to the
packaging rules [1-2], the corresponding documentation was missing.

Document the required build dependencies for gendwarfksyms, and
include a few examples for installing these dependencies on some
distributions.

[1] commit 657f96cb7c06 ("kbuild: deb-pkg: Add libdw-dev:native to
Build-Depends-Arch")
[2] commit 5bd6bdd0f76e ("kbuild: rpm-pkg: Add (elfutils-devel or
libdw-devel) to BuildRequires")

Fixes: f28568841ae0 ("tools: Add gendwarfksyms")
Signed-off-by: Jihan LIN <linjh22s@gmail.com>
---
Hi,

I found there is no documentation for build dependencies in gendwarfksyms
while digging into Rust drivers. Though Yuli added libdw-dev to the build
dependencies for packaging [1], it seems that there is no documentation
about it.

This patch documents the build dependencies of gendwarfksyms and adds a few
examples for installing these dependencies on some distributions.

[1]: https://lore.kernel.org/all/79C925DCE2E963FF+20250422104927.144252-1-wangyuli@uniontech.com/
---
 Documentation/kbuild/gendwarfksyms.rst | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/Documentation/kbuild/gendwarfksyms.rst b/Documentation/kbuild/gendwarfksyms.rst
index ed366250a54eac3a72c2f529da94a9e803704ae4..85fe9086beb760500250e7539058dce515681378 100644
--- a/Documentation/kbuild/gendwarfksyms.rst
+++ b/Documentation/kbuild/gendwarfksyms.rst
@@ -14,6 +14,29 @@ selected, **gendwarfksyms** is used instead to calculate symbol versions
 from the DWARF debugging information, which contains the necessary
 details about the final module ABI.
 
+Dependencies
+-----
+
+libelf, libdw and zlib are dependencies of gendwarfksyms.
+
+Here are a few examples for installing these dependencies:
+
+* Arch Linux and derivatives::
+
+    sudo pacman --needed -S zlib libelf
+
+* Debian, Ubuntu, and derivatives::
+
+    sudo apt install libelf-dev libdw-dev zlib1g-dev
+
+* Fedora and derivatives::
+
+    sudo dnf install elfutils-libelf-devel elfutils-devel zlib-devel
+
+* openSUSE and derivatives::
+
+    sudo zypper install libelf-devel libdw-devel zlib-devel
+
 Usage
 -----
 

---
base-commit: f0b9d8eb98dfee8d00419aa07543bdc2c1a44fb1
change-id: 20260105-documents_gendwarfksyms-9f88e4a7ad2f

Best regards,
-- 
Jihan LIN <linjh22s@gmail.com>
Re: [PATCH] Documentation/kbuild: Document gendwarfksyms build dependencies
Posted by kernel test robot 1 month ago
Hi Jihan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on f0b9d8eb98dfee8d00419aa07543bdc2c1a44fb1]

url:    https://github.com/intel-lab-lkp/linux/commits/Jihan-LIN-via-B4-Relay/Documentation-kbuild-Document-gendwarfksyms-build-dependencies/20260108-194655
base:   f0b9d8eb98dfee8d00419aa07543bdc2c1a44fb1
patch link:    https://lore.kernel.org/r/20260108-documents_gendwarfksyms-v1-1-52b1f9c38c70%40gmail.com
patch subject: [PATCH] Documentation/kbuild: Document gendwarfksyms build dependencies
reproduce: (https://download.01.org/0day-ci/archive/20260109/202601090349.xxTPrbB1-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601090349.xxTPrbB1-lkp@intel.com/

All warnings (new ones prefixed by >>):

   WARNING: No kernel-doc for file ./include/linux/hid_bpf.h
   ERROR: Cannot find file ./include/linux/hid.h
   WARNING: No kernel-doc for file ./include/linux/hid.h
   ERROR: Cannot find file ./include/linux/i2c-atr.h
   WARNING: No kernel-doc for file ./include/linux/i2c-atr.h
>> Documentation/kbuild/gendwarfksyms.rst:18: WARNING: Title underline too short.


vim +18 Documentation/kbuild/gendwarfksyms.rst

    16	
    17	Dependencies
  > 18	-----
    19	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Re: [PATCH] Documentation/kbuild: Document gendwarfksyms build dependencies
Posted by Miguel Ojeda 1 month ago
On Thu, Jan 8, 2026 at 9:45 AM Jihan LIN via B4 Relay
<devnull+linjh22s.gmail.com@kernel.org> wrote:
>
> Fixes: f28568841ae0 ("tools: Add gendwarfksyms")

Not sure if this is meant to be a fix or not; but if it is, then Cc:
stable should be considered since that commit is in an LTS and a
Stable kernel.

> +Dependencies
> +-----

Shouldn't this be the full length?

> +    sudo pacman --needed -S zlib libelf

I think these are supposed to be a tab (at least this file uses that)..

Also, Cc'ing linux-modules@vger.kernel.org as per the "GENDWARFKSYMS"
entry in `MAINTAINERS`.

I hope that helps!

Cheers,
Miguel