* error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information?
@ 2025-02-11 23:55 kernel test robot
2025-02-12 0:56 ` Sami Tolvanen
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2025-02-11 23:55 UTC (permalink / raw)
To: Sami Tolvanen; +Cc: llvm, oe-kbuild-all, linux-kernel, Masahiro Yamada
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 09fbf3d502050282bf47ab3babe1d4ed54dd1fd8
commit: 9c3681f9b9fd12cdbc4a542df599f1837512f3d5 kbuild: Add gendwarfksyms as an alternative to genksyms
date: 5 weeks ago
config: s390-randconfig-002-20250212 (https://download.01.org/0day-ci/archive/20250212/202502120752.U3fOKScQ-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250212/202502120752.U3fOKScQ-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/202502120752.U3fOKScQ-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information?
--
In file included from <stdin>:3:
In file included from arch/s390/include/asm/asm-prototypes.h:4:
>> include/linux/kvm_host.h:1908:24: warning: field 'desc' with variable sized type 'struct kvm_stats_desc' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
1908 | struct kvm_stats_desc desc;
| ^
1 warning generated.
>> error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information?
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information?
2025-02-11 23:55 error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information? kernel test robot
@ 2025-02-12 0:56 ` Sami Tolvanen
2025-02-13 21:09 ` Sami Tolvanen
0 siblings, 1 reply; 3+ messages in thread
From: Sami Tolvanen @ 2025-02-12 0:56 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: llvm, oe-kbuild-all, linux-kernel, kernel test robot
On Wed, Feb 12, 2025 at 07:55:45AM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 09fbf3d502050282bf47ab3babe1d4ed54dd1fd8
> commit: 9c3681f9b9fd12cdbc4a542df599f1837512f3d5 kbuild: Add gendwarfksyms as an alternative to genksyms
> date: 5 weeks ago
> config: s390-randconfig-002-20250212 (https://download.01.org/0day-ci/archive/20250212/202502120752.U3fOKScQ-lkp@intel.com/config)
> compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250212/202502120752.U3fOKScQ-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/202502120752.U3fOKScQ-lkp@intel.com/
>
> All error/warnings (new ones prefixed by >>):
>
> >> error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information?
> --
> In file included from <stdin>:3:
> In file included from arch/s390/include/asm/asm-prototypes.h:4:
> >> include/linux/kvm_host.h:1908:24: warning: field 'desc' with variable sized type 'struct kvm_stats_desc' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
> 1908 | struct kvm_stats_desc desc;
> | ^
> 1 warning generated.
> >> error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information?
The issue appears to be that the files in arch/s390/purgatory are
always built without debugging information, even though they include
code that uses EXPORT_SYMBOL.
I suspect the correct solution here is to ignore the object files in
this directory when calculating modversions. The quick patch below
fixes the build issue for me. Masahiro, does this look reasonable to
you?
Sami
diff --git a/arch/s390/purgatory/Makefile b/arch/s390/purgatory/Makefile
index bdcf2a3b6c41..bdcecc19441d 100644
--- a/arch/s390/purgatory/Makefile
+++ b/arch/s390/purgatory/Makefile
@@ -28,6 +28,8 @@ KBUILD_AFLAGS := $(filter-out -DCC_USING_EXPOLINE,$(KBUILD_AFLAGS))
PURGATORY_LDFLAGS := -nostdlib -z nodefaultlib
LDFLAGS_purgatory := -r $(PURGATORY_LDFLAGS) -T
LDFLAGS_purgatory.chk := -e purgatory_start $(PURGATORY_LDFLAGS)
+# Purgatory doesn't export symbols, so disable symbol versioning.
+$(obj)/purgatory: skip_gendwarfksyms = 1
$(obj)/purgatory: $(obj)/purgatory.lds $(PURGATORY_OBJS) FORCE
$(call if_changed,ld)
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 993708d11874..cfb4b57ff617 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -309,11 +309,11 @@ getasmexports = \
$(call getexportsymbols,EXPORT_SYMBOL(\1);) ; }
ifdef CONFIG_GENDWARFKSYMS
-cmd_gensymtypes_S = \
+cmd_gensymtypes_S = $(if $(skip_gendwarfksyms),, \
$(getasmexports) | \
$(CC) $(c_flags) -c -o $(@:.o=.gendwarfksyms.o) -xc -; \
$(call getexportsymbols,\1) | \
- $(gendwarfksyms) $(@:.o=.gendwarfksyms.o)
+ $(gendwarfksyms) $(@:.o=.gendwarfksyms.o))
else
cmd_gensymtypes_S = \
$(getasmexports) | \
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information?
2025-02-12 0:56 ` Sami Tolvanen
@ 2025-02-13 21:09 ` Sami Tolvanen
0 siblings, 0 replies; 3+ messages in thread
From: Sami Tolvanen @ 2025-02-13 21:09 UTC (permalink / raw)
To: Masahiro Yamada; +Cc: llvm, oe-kbuild-all, linux-kernel, kernel test robot
On Tue, Feb 11, 2025 at 4:56 PM Sami Tolvanen <samitolvanen@google.com> wrote:
>
> On Wed, Feb 12, 2025 at 07:55:45AM +0800, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> > head: 09fbf3d502050282bf47ab3babe1d4ed54dd1fd8
> > commit: 9c3681f9b9fd12cdbc4a542df599f1837512f3d5 kbuild: Add gendwarfksyms as an alternative to genksyms
> > date: 5 weeks ago
> > config: s390-randconfig-002-20250212 (https://download.01.org/0day-ci/archive/20250212/202502120752.U3fOKScQ-lkp@intel.com/config)
> > compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250212/202502120752.U3fOKScQ-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/202502120752.U3fOKScQ-lkp@intel.com/
> >
> > All error/warnings (new ones prefixed by >>):
> >
> > >> error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information?
> > --
> > In file included from <stdin>:3:
> > In file included from arch/s390/include/asm/asm-prototypes.h:4:
> > >> include/linux/kvm_host.h:1908:24: warning: field 'desc' with variable sized type 'struct kvm_stats_desc' not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]
> > 1908 | struct kvm_stats_desc desc;
> > | ^
> > 1 warning generated.
> > >> error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information?
>
> The issue appears to be that the files in arch/s390/purgatory are
> always built without debugging information, even though they include
> code that uses EXPORT_SYMBOL.
>
> I suspect the correct solution here is to ignore the object files in
> this directory when calculating modversions. The quick patch below
> fixes the build issue for me. Masahiro, does this look reasonable to
> you?
Ugh, we should just set __DISABLE_EXPORTS for all the object files,
not only sha256.o. I'll send a patch.
Sami
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-02-13 21:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-11 23:55 error: gendwarfksyms: process_module: dwarf_get_units failed: no debugging information? kernel test robot
2025-02-12 0:56 ` Sami Tolvanen
2025-02-13 21:09 ` Sami Tolvanen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox