public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: build failure after merge of the kbuild tree
@ 2025-07-30  6:12 Stephen Rothwell
  2025-07-30  9:00 ` [PATCH] kbuild: modpost: Fix the order of includes in .vmlinux.export.c Alexey Gladkov
  2025-08-04  1:25 ` linux-next: build failure after merge of the kbuild tree Stephen Rothwell
  0 siblings, 2 replies; 7+ messages in thread
From: Stephen Rothwell @ 2025-07-30  6:12 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Alexey Gladkov, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

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;
      |                         ^~~~~~~~~~

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* [PATCH] kbuild: modpost: Fix the order of includes in .vmlinux.export.c
  2025-07-30  6:12 linux-next: build failure after merge of the kbuild tree Stephen Rothwell
@ 2025-07-30  9:00 ` Alexey Gladkov
  2025-08-04  1:25 ` linux-next: build failure after merge of the kbuild tree Stephen Rothwell
  1 sibling, 0 replies; 7+ messages in thread
From: Alexey Gladkov @ 2025-07-30  9:00 UTC (permalink / raw)
  To: Stephen Rothwell, Masahiro Yamada
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

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'

Link: https://lore.kernel.org/all/20250730161223.63783458@canb.auug.org.au/
Fixes: c4b487ddc51f ("modpost: Create modalias for builtin modules")
Signed-off-by: Alexey Gladkov <legion@kernel•org>
---
 scripts/mod/modpost.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 67f9cd76bdd2..47c8aa2a6939 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -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");
 
-- 
2.50.1


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

* Re: linux-next: build failure after merge of the kbuild tree
  2025-07-30  6:12 linux-next: build failure after merge of the kbuild tree Stephen Rothwell
  2025-07-30  9:00 ` [PATCH] kbuild: modpost: Fix the order of includes in .vmlinux.export.c Alexey Gladkov
@ 2025-08-04  1:25 ` Stephen Rothwell
  2025-08-04  7:09   ` Alexey Gladkov
  1 sibling, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2025-08-04  1:25 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Alexey Gladkov, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1048 bytes --]

Hi all,

On Wed, 30 Jul 2025 16:12:23 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> 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;
>       |                         ^~~~~~~~~~

I am still reverting those commits.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the kbuild tree
  2025-08-04  1:25 ` linux-next: build failure after merge of the kbuild tree Stephen Rothwell
@ 2025-08-04  7:09   ` Alexey Gladkov
  2025-08-04 22:17     ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Alexey Gladkov @ 2025-08-04  7:09 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Masahiro Yamada, Linux Kernel Mailing List,
	Linux Next Mailing List

On Mon, Aug 04, 2025 at 11:25:40AM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> On Wed, 30 Jul 2025 16:12:23 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
> >
> > 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;
> >       |                         ^~~~~~~~~~
> 
> 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/20250730090025.2402129-1-legion@kernel.org/

-- 
Rgrds, legion


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

* Re: linux-next: build failure after merge of the kbuild tree
  2025-08-04  7:09   ` Alexey Gladkov
@ 2025-08-04 22:17     ` Stephen Rothwell
  2025-08-05  3:33       ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2025-08-04 22:17 UTC (permalink / raw)
  To: Alexey Gladkov
  Cc: Masahiro Yamada, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1695 bytes --]

Hi Alexey,

On Mon, 4 Aug 2025 09:09:19 +0200 Alexey Gladkov <legion@kernel•org> wrote:
>
> On Mon, Aug 04, 2025 at 11:25:40AM +1000, Stephen Rothwell wrote:
> > Hi all,
> > 
> > On Wed, 30 Jul 2025 16:12:23 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:  
> > >
> > > 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;
> > >       |                         ^~~~~~~~~~  
> > 
> > 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/20250730090025.2402129-1-legion@kernel.org/

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 ...

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the kbuild tree
  2025-08-04 22:17     ` Stephen Rothwell
@ 2025-08-05  3:33       ` Stephen Rothwell
  2025-08-12 21:51         ` Alexey Gladkov
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2025-08-05  3:33 UTC (permalink / raw)
  To: Alexey Gladkov
  Cc: Masahiro Yamada, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1934 bytes --]

Hi all,

On Tue, 5 Aug 2025 08:17:49 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> On Mon, 4 Aug 2025 09:09:19 +0200 Alexey Gladkov <legion@kernel•org> wrote:
> >
> > On Mon, Aug 04, 2025 at 11:25:40AM +1000, Stephen Rothwell wrote:  
> > > Hi all,
> > > 
> > > On Wed, 30 Jul 2025 16:12:23 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:    
> > > >
> > > > 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;
> > > >       |                         ^~~~~~~~~~    
> > > 
> > > 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/20250730090025.2402129-1-legion@kernel.org/  
> 
> 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 ...

Tested-by: Stephen Rothwell <sfr@canb•auug.org.au> # build test

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: linux-next: build failure after merge of the kbuild tree
  2025-08-05  3:33       ` Stephen Rothwell
@ 2025-08-12 21:51         ` Alexey Gladkov
  0 siblings, 0 replies; 7+ messages in thread
From: Alexey Gladkov @ 2025-08-12 21:51 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Masahiro Yamada, Linux Kernel Mailing List,
	Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2289 bytes --]

On Tue, Aug 05, 2025 at 01:33:49PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> On Tue, 5 Aug 2025 08:17:49 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
> >
> > On Mon, 4 Aug 2025 09:09:19 +0200 Alexey Gladkov <legion@kernel•org> wrote:
> > >
> > > On Mon, Aug 04, 2025 at 11:25:40AM +1000, Stephen Rothwell wrote:  
> > > > Hi all,
> > > > 
> > > > On Wed, 30 Jul 2025 16:12:23 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:    
> > > > >
> > > > > 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;
> > > > >       |                         ^~~~~~~~~~    
> > > > 
> > > > 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/20250730090025.2402129-1-legion@kernel.org/  
> > 
> > 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 ...
> 
> Tested-by: Stephen Rothwell <sfr@canb•auug.org.au> # build test

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?

-- 
Rgrds, legion


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2025-08-12 21:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-30  6:12 linux-next: build failure after merge of the kbuild tree Stephen Rothwell
2025-07-30  9:00 ` [PATCH] kbuild: modpost: Fix the order of includes in .vmlinux.export.c Alexey Gladkov
2025-08-04  1:25 ` linux-next: build failure after merge of the kbuild tree Stephen Rothwell
2025-08-04  7:09   ` Alexey Gladkov
2025-08-04 22:17     ` Stephen Rothwell
2025-08-05  3:33       ` Stephen Rothwell
2025-08-12 21:51         ` Alexey Gladkov

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