linux-next: build failure after merge of the kbuild tree
Subsystems (2)
Hi all,
After merging the kbuild tree, today's linux-next build (i386 defconfig) failed like this:
ld: .vmlinux.export.o: in function `__ksymtab___builtin_memcmp':
.vmlinux.export.c:(___ksymtab+__builtin_memcmp+0x0): undefined reference to `__builtin_memcmp'
Caused by commit
c4b487ddc51f ("modpost: Create modalias for builtin modules")
I have reverted that commit, along with its parent and child, for today. It's parent commit
66ef3890c628 ("modpost: Add modname to mod_device_table alias")
generated this warning in the i386 defconfig build:
scripts/mod/file2alias.c: In function ‘handle_moddevtable’:scripts/mod/file2alias.c:1480:25: warning: variable ‘modnamelen’ set but not used [-Wunused-but-set-variable]
1480 | size_t typelen, modnamelen;
| ^~~~~~~~~~Signature · 2 lines
Cheers, Stephen Rothwell
PATCH 1/1 kbuild: modpost: Fix the order of includes in .vmlinux.export.c
The linux/module.h cannot be used at the beginning of file because linux/dynamic_debug.h adds linux/string.h and then string_32.h, where some functions may be redefined as __builtin_<name> under certain conditions.
This results in the following error (i386 defconfig):
ld: .vmlinux.export.o: in function `__ksymtab___builtin_memcmp':
.vmlinux.export.c:(___ksymtab+__builtin_memcmp+0x0): undefined reference to `__builtin_memcmp'
--- scripts/mod/modpost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/mod/modpost.c +2 -2
@@ -2070,12 +2070,12 @@ static void write_vmlinux_export_c_file(struct module *mod)struct module_alias *alias, *next;buf_printf (&buf, -"#include <linux/export-internal.h>\n" -"#include <linux/module.h>\n" ); +"#include <linux/export-internal.h>\n" );add_exported_symbols (&buf, mod);buf_printf (&buf, +"#include <linux/module.h>\n" "#undef __MODULE_INFO_PREFIX\n" "#define __MODULE_INFO_PREFIX\n" );
Signature · 1 line
2.50.1
Hi all,
Quoted 14 lines · On Wed, 30 Jul 2025 16:12:23 +1000 Stephen Rothwell <[email protected]>…
After merging the kbuild tree, today's linux-next build (i386 defconfig) failed like this:
ld: .vmlinux.export.o: in function `__ksymtab___builtin_memcmp':
.vmlinux.export.c:(___ksymtab+__builtin_memcmp+0x0): undefined reference to `__builtin_memcmp'Caused by commit
c4b487ddc51f("modpost: Create modalias for builtin modules")I have reverted that commit, along with its parent and child, for today. It's parent commit
Quoted 8 lines
66ef3890c628("modpost: Add modname tomod_device_tablealias")generated this warning in the i386 defconfig build:
scripts/mod/file2alias.c: In function ‘handle_moddevtable’:scripts/mod/file2alias.c:1480:25: warning: variable ‘modnamelen’ set but not used [-Wunused-but-set-variable]1480 | size_t typelen, modnamelen; | ^~~~~~~~~~
I am still reverting those commits.
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 19 lines · Stephen Rothwell
Hi all,
Quoted 16 lines · On Wed, 30 Jul 2025 16:12:23 +1000 Stephen Rothwell <[email protected]>…
After merging the kbuild tree, today's linux-next build (i386 defconfig) failed like this:
ld: .vmlinux.export.o: in function `__ksymtab___builtin_memcmp':
.vmlinux.export.c:(___ksymtab+__builtin_memcmp+0x0): undefined reference to `__builtin_memcmp'Caused by commit
c4b487ddc51f("modpost: Create modalias for builtin modules")I have reverted that commit, along with its parent and child, for today. It's parent commit
66ef3890c628("modpost: Add modname tomod_device_tablealias")
Quoted 8 lines
Quoted 6 lines
generated this warning in the i386 defconfig build:
scripts/mod/file2alias.c: In function ‘handle_moddevtable’:scripts/mod/file2alias.c:1480:25: warning: variable ‘modnamelen’ set but not used [-Wunused-but-set-variable]1480 | size_t typelen, modnamelen; | ^~~~~~~~~~I am still reverting those commits.
I do not have my tree. Can you apply my fix for original commit instead of revert ?
https://lore.kernel.org/all/[email protected]/
Signature · 1 line
Rgrds, legion
Hi Alexey,
Quoted 28 lines · On Mon, 4 Aug 2025 09:09:19 +0200 Alexey Gladkov <[email protected]> wrote:
Quoted 26 lines · Stephen Rothwell
Hi all,
Quoted 22 lines · On Wed, 30 Jul 2025 16:12:23 +1000 Stephen Rothwell <[email protected]>…
After merging the kbuild tree, today's linux-next build (i386 defconfig) failed like this:
ld: .vmlinux.export.o: in function `__ksymtab___builtin_memcmp':
.vmlinux.export.c:(___ksymtab+__builtin_memcmp+0x0): undefined reference to `__builtin_memcmp'Caused by commit
c4b487ddc51f("modpost: Create modalias for builtin modules")I have reverted that commit, along with its parent and child, for today. It's parent commit
66ef3890c628("modpost: Add modname tomod_device_tablealias")generated this warning in the i386 defconfig build:
scripts/mod/file2alias.c: In function ‘handle_moddevtable’:scripts/mod/file2alias.c:1480:25: warning: variable ‘modnamelen’ set but not used [-Wunused-but-set-variable]1480 | size_t typelen, modnamelen; | ^~~~~~~~~~
Quoted 6 lines
Quoted 1 line
I am still reverting those commits.
I do not have my tree. Can you apply my fix for original commit instead of revert ?
I did wonder why this patch has not been applied to the kbuild tree?
I will apply that today to the linux-next merge, but it is presumably delaying the kbuild tree being merged by Linus ...
Signature · 2 lines
Cheers, Stephen Rothwell
Stephen Rothwell
Tested-byHi all,
Quoted 35 lines · On Tue, 5 Aug 2025 08:17:49 +1000 Stephen Rothwell <[email protected]> wrote:
Quoted 33 lines · On Mon, 4 Aug 2025 09:09:19 +0200 Alexey Gladkov <[email protected]> wrote:
Quoted 19 lines · Stephen Rothwell
Hi all,
Quoted 16 lines · On Wed, 30 Jul 2025 16:12:23 +1000 Stephen Rothwell <[email protected]>…
After merging the kbuild tree, today's linux-next build (i386 defconfig) failed like this:
ld: .vmlinux.export.o: in function `__ksymtab___builtin_memcmp':
.vmlinux.export.c:(___ksymtab+__builtin_memcmp+0x0): undefined reference to `__builtin_memcmp'Caused by commit
c4b487ddc51f("modpost: Create modalias for builtin modules")I have reverted that commit, along with its parent and child, for today. It's parent commit
66ef3890c628("modpost: Add modname tomod_device_tablealias")Quoted 8 lines
Quoted 6 lines
generated this warning in the i386 defconfig build:
scripts/mod/file2alias.c: In function ‘handle_moddevtable’:scripts/mod/file2alias.c:1480:25: warning: variable ‘modnamelen’ set but not used [-Wunused-but-set-variable]1480 | size_t typelen, modnamelen; | ^~~~~~~~~~I am still reverting those commits.
I do not have my tree. Can you apply my fix for original commit instead of revert ?
Quoted 6 lines
Quoted 1 line
I did wonder why this patch has not been applied to the kbuild tree?
I will apply that today to the linux-next merge, but it is presumably delaying the kbuild tree being merged by Linus ...
Signature · 2 lines
Cheers, Stephen Rothwell
Quoted 38 lines · Stephen Rothwell
Hi all,
Quoted 35 lines · On Tue, 5 Aug 2025 08:17:49 +1000 Stephen Rothwell <[email protected]> wrote:
Quoted 33 lines · On Mon, 4 Aug 2025 09:09:19 +0200 Alexey Gladkov <[email protected]> wrote:
Quoted 19 lines · Stephen Rothwell
Hi all,
Quoted 16 lines · On Wed, 30 Jul 2025 16:12:23 +1000 Stephen Rothwell <[email protected]>…
After merging the kbuild tree, today's linux-next build (i386 defconfig) failed like this:
ld: .vmlinux.export.o: in function `__ksymtab___builtin_memcmp':
.vmlinux.export.c:(___ksymtab+__builtin_memcmp+0x0): undefined reference to `__builtin_memcmp'Caused by commit
c4b487ddc51f("modpost: Create modalias for builtin modules")I have reverted that commit, along with its parent and child, for today. It's parent commit
66ef3890c628("modpost: Add modname tomod_device_tablealias")Quoted 8 lines
Quoted 6 lines
generated this warning in the i386 defconfig build:
scripts/mod/file2alias.c: In function ‘handle_moddevtable’:scripts/mod/file2alias.c:1480:25: warning: variable ‘modnamelen’ set but not used [-Wunused-but-set-variable]1480 | size_t typelen, modnamelen; | ^~~~~~~~~~I am still reverting those commits.
I do not have my tree. Can you apply my fix for original commit instead of revert ?
Quoted 8 lines
Quoted 6 lines
Quoted 1 line
I did wonder why this patch has not been applied to the kbuild tree?
I will apply that today to the linux-next merge, but it is presumably delaying the kbuild tree being merged by Linus ...
I noticed that this patchset is not in the tree. I somehow missed when and why it was excluded. I thought I had submitted a fix and it had been accepted.
Do I need to resend it to the mailing list?
Signature · 1 line
Rgrds, legion