public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* gendwarksyms not 32bit-clean
@ 2025-11-14 13:42 Michal Suchánek
  2025-11-17 20:39 ` Sami Tolvanen
  0 siblings, 1 reply; 2+ messages in thread
From: Michal Suchánek @ 2025-11-14 13:42 UTC (permalink / raw)
  To: linux-modules, linux-kbuild, linux-kernel; +Cc: Sami Tolvanen

Also cc lists

Hello,

I tried to build kernel with gendwarfksyms and it does not work on
32bit:

[   30s]   HOSTCC  scripts/gendwarfksyms/dwarf.o
[   30s] ../scripts/gendwarfksyms/dwarf.c: In function ‘process_enumerator_type’:
[   30s] ../scripts/gendwarfksyms/dwarf.c:764:64: error: passing argument 3 of ‘kabi_get_enumerator_value’ from incompatible pointer type [-Wincompatible-pointer-types]
[   30s]   764 |                         state->expand.current_fqn, cache->fqn, &value);
[   30s]       |                                                                ^~~~~~
[   30s]       |                                                                |
[   30s]       |                                                                Dwarf_Word * {aka long long unsigned int *}
[   30s] In file included from ../scripts/gendwarfksyms/dwarf.c:10:
[   30s] ../scripts/gendwarfksyms/gendwarfksyms.h:283:47: note: expected ‘long unsigned int *’ but argument is of type ‘Dwarf_Word *’ {aka ‘long long unsigned int *’}
[   30s]   283 |                                unsigned long *value);
[   30s]       |                                ~~~~~~~~~~~~~~~^~~~~
[   30s] make[3]: *** [../scripts/Makefile.host:131: scripts/gendwarfksyms/dwarf.o] Error 1
[   30s] make[3]: *** Waiting for unfinished jobs....
[   30s]   HOSTCC  scripts/gendwarfksyms/cache.o
[   30s]   HOSTCC  scripts/gendwarfksyms/gendwarfksyms.o
[   30s]   HOSTCC  scripts/gendwarfksyms/kabi.o
[   30s]   HOSTCC  scripts/selinux/mdp/mdp
[   30s]   HOSTCC  scripts/gendwarfksyms/die.o
[   30s]   HOSTCC  scripts/gendwarfksyms/symbols.o
[   30s] In file included from ../scripts/gendwarfksyms/symbols.c:6:
[   30s] ../scripts/gendwarfksyms/symbols.c: In function ‘elf_for_each_global’:
[   30s] ../scripts/gendwarfksyms/gendwarfksyms.h:47:27: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘Elf64_Xword’ {aka ‘long long unsigned int’} [-Wformat=]
[   30s]    47 |                 __println("error: ", format, ##__VA_ARGS__); \
[   30s]       |                           ^~~~~~~~~
[   30s] ../scripts/gendwarfksyms/gendwarfksyms.h:35:25: note: in definition of macro ‘__println’
[   30s]    35 |         fprintf(stderr, prefix __PREFIX "%s: " format "\n", __func__, \
[   30s]       |                         ^~~~~~
[   30s] ../scripts/gendwarfksyms/symbols.c:243:33: note: in expansion of macro ‘error’
[   30s]   243 |                                 error("expected sh_entsize (%lu) to be %zu",
[   30s]       |                                 ^~~~~
[   30s] ../scripts/gendwarfksyms/symbols.c: In function ‘set_symbol_addr’:
[   30s] ../scripts/gendwarfksyms/gendwarfksyms.h:41:35: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘Elf64_Addr’ {aka ‘long long unsigned int’} [-Wformat=]
[   30s]    41 |                         __println("", format, ##__VA_ARGS__); \
[   30s]       |                                   ^~
[   30s] ../scripts/gendwarfksyms/gendwarfksyms.h:35:25: note: in definition of macro ‘__println’
[   30s]    35 |         fprintf(stderr, prefix __PREFIX "%s: " format "\n", __func__, \
[   30s]       |                         ^~~~~~
[   30s] ../scripts/gendwarfksyms/symbols.c:293:17: note: in expansion of macro ‘debug’
[   30s]   293 |                 debug("%s -> { %u, %lx }", sym->name, sym->addr.section,
[   30s]       |                 ^~~~~
[   30s]   HOSTCC  scripts/kallsyms
[   30s]   HOSTCC  scripts/gendwarfksyms/types.o
[   30s] make[2]: *** [../scripts/Makefile.build:556: scripts/gendwarfksyms] Error 2
[   30s] make[2]: *** Waiting for unfinished jobs....
[   30s]   HOSTCC  scripts/sign-file
[   31s]   HOSTCC  scripts/sorttable
[   31s]   HOSTCC  scripts/asn1_compiler
[   31s] make[1]: *** [/home/abuild/rpmbuild/BUILD/kernel-default-6.18_rc5-build/kernel-default-6.18~rc5/linux-6.18-rc5/Makefile:1285: scripts] Error 2
[   31s] make: *** [/home/abuild/rpmbuild/BUILD/kernel-default-6.18_rc5-build/kernel-default-6.18~rc5/linux-6.18-rc5/Makefile:248: __sub-make] Error 2
[   31s] error: Bad exit status from /var/tmp/rpm-tmp.a006l0 (%prep)

Can you fix it, or make it depend on host being 64bit?

Thanks

Michal

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: gendwarksyms not 32bit-clean
  2025-11-14 13:42 gendwarksyms not 32bit-clean Michal Suchánek
@ 2025-11-17 20:39 ` Sami Tolvanen
  0 siblings, 0 replies; 2+ messages in thread
From: Sami Tolvanen @ 2025-11-17 20:39 UTC (permalink / raw)
  To: Michal Suchánek; +Cc: linux-modules, linux-kbuild, linux-kernel

Hi Michal,

On Fri, Nov 14, 2025 at 5:42 AM Michal Suchánek <msuchanek@suse.de> wrote:
> I tried to build kernel with gendwarfksyms and it does not work on
> 32bit:
[...]
>
> Can you fix it, or make it depend on host being 64bit?

Thanks for the report. Can you test if this fixes the issue for you?

https://lore.kernel.org/linux-modules/20251117203806.970840-2-samitolvanen@google.com/

Sami

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-17 20:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-14 13:42 gendwarksyms not 32bit-clean Michal Suchánek
2025-11-17 20:39 ` Sami Tolvanen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox