public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Michal Suchánek" <msuchanek@suse.de>
To: linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Sami Tolvanen <samitolvanen@google.com>
Subject: gendwarksyms not 32bit-clean
Date: Fri, 14 Nov 2025 14:42:36 +0100	[thread overview]
Message-ID: <aRcxzPxtJblVSh1y@kitsune.suse.cz> (raw)

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

             reply	other threads:[~2025-11-14 13:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-14 13:42 Michal Suchánek [this message]
2025-11-17 20:39 ` gendwarksyms not 32bit-clean Sami Tolvanen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aRcxzPxtJblVSh1y@kitsune.suse.cz \
    --to=msuchanek@suse.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=samitolvanen@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox