public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
* linux-next: occassional build errors
@ 2018-10-03  3:50 Stephen Rothwell
  2018-10-03  4:31 ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2018-10-03  3:50 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Linux-Next Mailing List, Linux Kernel Mailing List

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

Hi Masahiro,

I don't know if that has anything to changes in the kbuild system, but
since Tuesday, I have been getting random build errors that go away after
I remove the object directory and build again.  The latest example is this:

include/linux/kconfig.h: file not recognized: file format not recognized
make[2]: *** [scripts/Makefile.build:492: crypto/crypto_user.o] Error 1
make[1]: *** [Makefile:1057: crypto] Error 2
make: *** [Makefile:152: sub-make] Error 2
Command exited with non-zero status 2

It is always complaining about a .h file ...

Makefile:152 is the MAKE lien below:

# Invoke a second make in the output directory, passing relevant variables
sub-make:
        $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \
        -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))

Makefile:1057 is the MAKE line below:

PHONY += $(vmlinux-dirs)
$(vmlinux-dirs): prepare scripts
        $(Q)$(MAKE) $(build)=$@ need-builtin=1

scripts/Makefile.build:492 is the if_changed line below:

$(multi-used-m): FORCE
        $(call if_changed,link_multi-m)
        @{ echo $(@:.o=.ko); echo $(filter-out FORCE,$^); \
           $(cmd_undef_syms); } > $(MODVERDIR)/$(@F:.o=.mod)
$(call multi_depend, $(multi-used-m), .o, -objs -y -m)

Not sure what else I can tell you.

-- 
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: occassional build errors
  2018-10-03  3:50 linux-next: occassional build errors Stephen Rothwell
@ 2018-10-03  4:31 ` Masahiro Yamada
  2018-10-03  6:55   ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2018-10-03  4:31 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Linux-Next Mailing List, Linux Kernel Mailing List

Hi Stephen,

On Wed, Oct 3, 2018 at 12:51 PM Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> Hi Masahiro,
>
> I don't know if that has anything to changes in the kbuild system, but
> since Tuesday, I have been getting random build errors that go away after
> I remove the object directory and build again.


I have no idea.

Is it fine if you use kbuild tree from the last week?


I added 4 kbuild patches this week, but they look irrelevant.

masahiro@pug:~/ref/linux-next$ git log  --oneline
next-20180928..next-20181002  | grep kbuild
4712eca8 Merge remote-tracking branch 'kbuild/for-next'
ae5c311 Merge remote-tracking branch 'kbuild-current/fixes'
7163c4d Merge branch 'kbuild' into for-next
7c59867 kbuild: simplify command line creation in scripts/mkmakefile
23d86e8 kbuild: do not pass $(objtree) to scripts/mkmakefile
166011a kbuild: remove user ID check in scripts/mkmakefile
e4db0f7 kbuild: remove VERSION and PATCHLEVEL from $(objtree)/Makefile



>  The latest example is this:
>
> include/linux/kconfig.h: file not recognized: file format not recognized
> make[2]: *** [scripts/Makefile.build:492: crypto/crypto_user.o] Error 1
> make[1]: *** [Makefile:1057: crypto] Error 2
> make: *** [Makefile:152: sub-make] Error 2
> Command exited with non-zero status 2
>
> It is always complaining about a .h file ...
>
> Makefile:152 is the MAKE lien below:
>
> # Invoke a second make in the output directory, passing relevant variables
> sub-make:
>         $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \
>         -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))
>
> Makefile:1057 is the MAKE line below:
>
> PHONY += $(vmlinux-dirs)
> $(vmlinux-dirs): prepare scripts
>         $(Q)$(MAKE) $(build)=$@ need-builtin=1
>
> scripts/Makefile.build:492 is the if_changed line below:
>
> $(multi-used-m): FORCE
>         $(call if_changed,link_multi-m)
>         @{ echo $(@:.o=.ko); echo $(filter-out FORCE,$^); \
>            $(cmd_undef_syms); } > $(MODVERDIR)/$(@F:.o=.mod)
> $(call multi_depend, $(multi-used-m), .o, -objs -y -m)
>
> Not sure what else I can tell you.
>


Does this happen only when building a module?

Can you provide a procedure
to reproduce this?



-- 
Best Regards
Masahiro Yamada

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

* Re: linux-next: occassional build errors
  2018-10-03  4:31 ` Masahiro Yamada
@ 2018-10-03  6:55   ` Stephen Rothwell
  2018-10-04  0:39     ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2018-10-03  6:55 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Linux-Next Mailing List, Linux Kernel Mailing List

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

Hi Masahiro,

On Wed, 3 Oct 2018 13:31:54 +0900 Masahiro Yamada <yamada.masahiro@socionext•com> wrote:
>
> On Wed, Oct 3, 2018 at 12:51 PM Stephen Rothwell <sfr@canb•auug.org.au> wrote:
> >
> > I don't know if that has anything to changes in the kbuild system, but
> > since Tuesday, I have been getting random build errors that go away after
> > I remove the object directory and build again.  
> 
> I have no idea.

I did not expect a fast/simple answer :-)

> Is it fine if you use kbuild tree from the last week?

I did not see this in next-20180928 or before i.e. it has only happened
yesterday and today.

> I added 4 kbuild patches this week, but they look irrelevant.

Yeah, that was my feeling as well.

> >  The latest example is this:
> >
> > include/linux/kconfig.h: file not recognized: file format not recognized
> > make[2]: *** [scripts/Makefile.build:492: crypto/crypto_user.o] Error 1
> > make[1]: *** [Makefile:1057: crypto] Error 2
> > make: *** [Makefile:152: sub-make] Error 2
> > Command exited with non-zero status 2
> >
> > It is always complaining about a .h file ...
> >
> > Makefile:152 is the MAKE lien below:
> >
> > # Invoke a second make in the output directory, passing relevant variables
> > sub-make:
> >         $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \
> >         -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))
> >
> > Makefile:1057 is the MAKE line below:
> >
> > PHONY += $(vmlinux-dirs)
> > $(vmlinux-dirs): prepare scripts
> >         $(Q)$(MAKE) $(build)=$@ need-builtin=1
> >
> > scripts/Makefile.build:492 is the if_changed line below:
> >
> > $(multi-used-m): FORCE
> >         $(call if_changed,link_multi-m)
> >         @{ echo $(@:.o=.ko); echo $(filter-out FORCE,$^); \
> >            $(cmd_undef_syms); } > $(MODVERDIR)/$(@F:.o=.mod)
> > $(call multi_depend, $(multi-used-m), .o, -objs -y -m)
> >
> > Not sure what else I can tell you.
> 
> Does this happen only when building a module?

I don't know, sorry, I build with -s and -j80, so it is hard to tell
what it is currently up to.

> Can you provide a procedure
> to reproduce this?

Not really.  Each day, I merge all the trees, but between each merge I
do 3 builds (arm, powerpc and x86_64) and of the 100+ builds, yesterday
2 failed and so far today 2 have failed.  It is not even the same build
each time, or after the same merges.

The report above was from the arm build, a while later (a few merges
later) the x86_64 build failed - complaining about a different .h file.
-- 
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: occassional build errors
  2018-10-03  6:55   ` Stephen Rothwell
@ 2018-10-04  0:39     ` Stephen Rothwell
  2018-10-04  1:56       ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2018-10-04  0:39 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Linux-Next Mailing List, Linux Kernel Mailing List

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

Hi Masahiro,

On Wed, 3 Oct 2018 16:55:34 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> > >  The latest example is this:
> > >
> > > include/linux/kconfig.h: file not recognized: file format not recognized
> > > make[2]: *** [scripts/Makefile.build:492: crypto/crypto_user.o] Error 1
> > > make[1]: *** [Makefile:1057: crypto] Error 2
> > > make: *** [Makefile:152: sub-make] Error 2
> > > Command exited with non-zero status 2
> > >
> > > It is always complaining about a .h file ...
> > >
> > > Makefile:152 is the MAKE lien below:
> > >
> > > # Invoke a second make in the output directory, passing relevant variables
> > > sub-make:
> > >         $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \
> > >         -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))
> > >
> > > Makefile:1057 is the MAKE line below:
> > >
> > > PHONY += $(vmlinux-dirs)
> > > $(vmlinux-dirs): prepare scripts
> > >         $(Q)$(MAKE) $(build)=$@ need-builtin=1
> > >
> > > scripts/Makefile.build:492 is the if_changed line below:
> > >
> > > $(multi-used-m): FORCE
> > >         $(call if_changed,link_multi-m)
> > >         @{ echo $(@:.o=.ko); echo $(filter-out FORCE,$^); \
> > >            $(cmd_undef_syms); } > $(MODVERDIR)/$(@F:.o=.mod)
> > > $(call multi_depend, $(multi-used-m), .o, -objs -y -m)
> > >
> > > Not sure what else I can tell you.  
> > 
> > Does this happen only when building a module?  
> 
> I don't know, sorry, I build with -s and -j80, so it is hard to tell
> what it is currently up to.

Today, I got this from the x86_64 allmodconfig build after merging the hid tree:

x86_64-linux-gnu-ld: include/config/acpi.h: file not recognized: file truncated
make[4]: *** [/home/sfr/next/next/scripts/Makefile.build:492: drivers/hid/i2c-hid/i2c-hid.o] Error 1
make[3]: *** [/home/sfr/next/next/scripts/Makefile.build:520: drivers/hid/i2c-hid] Error 2
make[2]: *** [/home/sfr/next/next/scripts/Makefile.build:520: drivers/hid] Error 2
make[1]: *** [/home/sfr/next/next/Makefile:1057: drivers] Error 2
make: *** [Makefile:152: sub-make] Error 2

-- 
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: occassional build errors
  2018-10-04  0:39     ` Stephen Rothwell
@ 2018-10-04  1:56       ` Stephen Rothwell
  2018-10-04  3:09         ` Masahiro Yamada
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2018-10-04  1:56 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Linux-Next Mailing List, Linux Kernel Mailing List

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

Hi Masahiro,

On Thu, 4 Oct 2018 10:39:37 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
> 
> On Wed, 3 Oct 2018 16:55:34 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
> >  
> > > >  The latest example is this:
> > > >
> > > > include/linux/kconfig.h: file not recognized: file format not recognized
> > > > make[2]: *** [scripts/Makefile.build:492: crypto/crypto_user.o] Error 1
> > > > make[1]: *** [Makefile:1057: crypto] Error 2
> > > > make: *** [Makefile:152: sub-make] Error 2
> > > > Command exited with non-zero status 2
> > > >
> > > > It is always complaining about a .h file ...
> > > >
> > > > Makefile:152 is the MAKE lien below:
> > > >
> > > > # Invoke a second make in the output directory, passing relevant variables
> > > > sub-make:
> > > >         $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \
> > > >         -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))
> > > >
> > > > Makefile:1057 is the MAKE line below:
> > > >
> > > > PHONY += $(vmlinux-dirs)
> > > > $(vmlinux-dirs): prepare scripts
> > > >         $(Q)$(MAKE) $(build)=$@ need-builtin=1
> > > >
> > > > scripts/Makefile.build:492 is the if_changed line below:
> > > >
> > > > $(multi-used-m): FORCE
> > > >         $(call if_changed,link_multi-m)
> > > >         @{ echo $(@:.o=.ko); echo $(filter-out FORCE,$^); \
> > > >            $(cmd_undef_syms); } > $(MODVERDIR)/$(@F:.o=.mod)
> > > > $(call multi_depend, $(multi-used-m), .o, -objs -y -m)
> > > >
> > > > Not sure what else I can tell you.    
> > > 
> > > Does this happen only when building a module?    
> > 
> > I don't know, sorry, I build with -s and -j80, so it is hard to tell
> > what it is currently up to.  
> 
> Today, I got this from the x86_64 allmodconfig build after merging the hid tree:
> 
> x86_64-linux-gnu-ld: include/config/acpi.h: file not recognized: file truncated
> make[4]: *** [/home/sfr/next/next/scripts/Makefile.build:492: drivers/hid/i2c-hid/i2c-hid.o] Error 1
> make[3]: *** [/home/sfr/next/next/scripts/Makefile.build:520: drivers/hid/i2c-hid] Error 2
> make[2]: *** [/home/sfr/next/next/scripts/Makefile.build:520: drivers/hid] Error 2
> make[1]: *** [/home/sfr/next/next/Makefile:1057: drivers] Error 2
> make: *** [Makefile:152: sub-make] Error 2

OK, it seems to have to do with an object changing from a simple build
to a multi object build.

i.e. Tuesday's linux-next has these changes:

 obj-$(CONFIG_CRYPTO_USER) += crypto_user.o
+crypto_user-y := crypto_user_base.o crypto_user_stat.o
 obj-$(CONFIG_CRYPTO_CMAC) += cmac.o

 obj-$(CONFIG_I2C_HID)				+= i2c-hid.o
+
+i2c-hid-objs					=  i2c-hid-core.o
+i2c-hid-$(CONFIG_DMI)				+= i2c-hid-dmi-quirks.o

-- 
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: occassional build errors
  2018-10-04  1:56       ` Stephen Rothwell
@ 2018-10-04  3:09         ` Masahiro Yamada
  2018-10-04  3:41           ` Stephen Rothwell
  0 siblings, 1 reply; 7+ messages in thread
From: Masahiro Yamada @ 2018-10-04  3:09 UTC (permalink / raw)
  To: Stephen Rothwell; +Cc: Linux-Next Mailing List, Linux Kernel Mailing List

Hi Stephen,


On Thu, Oct 4, 2018 at 10:57 AM Stephen Rothwell <sfr@canb•auug.org.au> wrote:
>
> Hi Masahiro,
>
> On Thu, 4 Oct 2018 10:39:37 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
> >
> > On Wed, 3 Oct 2018 16:55:34 +1000 Stephen Rothwell <sfr@canb•auug.org.au> wrote:
> > >
> > > > >  The latest example is this:
> > > > >
> > > > > include/linux/kconfig.h: file not recognized: file format not recognized
> > > > > make[2]: *** [scripts/Makefile.build:492: crypto/crypto_user.o] Error 1
> > > > > make[1]: *** [Makefile:1057: crypto] Error 2
> > > > > make: *** [Makefile:152: sub-make] Error 2
> > > > > Command exited with non-zero status 2
> > > > >
> > > > > It is always complaining about a .h file ...
> > > > >
> > > > > Makefile:152 is the MAKE lien below:
> > > > >
> > > > > # Invoke a second make in the output directory, passing relevant variables
> > > > > sub-make:
> > > > >         $(Q)$(MAKE) -C $(KBUILD_OUTPUT) KBUILD_SRC=$(CURDIR) \
> > > > >         -f $(CURDIR)/Makefile $(filter-out _all sub-make,$(MAKECMDGOALS))
> > > > >
> > > > > Makefile:1057 is the MAKE line below:
> > > > >
> > > > > PHONY += $(vmlinux-dirs)
> > > > > $(vmlinux-dirs): prepare scripts
> > > > >         $(Q)$(MAKE) $(build)=$@ need-builtin=1
> > > > >
> > > > > scripts/Makefile.build:492 is the if_changed line below:
> > > > >
> > > > > $(multi-used-m): FORCE
> > > > >         $(call if_changed,link_multi-m)
> > > > >         @{ echo $(@:.o=.ko); echo $(filter-out FORCE,$^); \
> > > > >            $(cmd_undef_syms); } > $(MODVERDIR)/$(@F:.o=.mod)
> > > > > $(call multi_depend, $(multi-used-m), .o, -objs -y -m)
> > > > >
> > > > > Not sure what else I can tell you.
> > > >
> > > > Does this happen only when building a module?
> > >
> > > I don't know, sorry, I build with -s and -j80, so it is hard to tell
> > > what it is currently up to.
> >
> > Today, I got this from the x86_64 allmodconfig build after merging the hid tree:
> >
> > x86_64-linux-gnu-ld: include/config/acpi.h: file not recognized: file truncated
> > make[4]: *** [/home/sfr/next/next/scripts/Makefile.build:492: drivers/hid/i2c-hid/i2c-hid.o] Error 1
> > make[3]: *** [/home/sfr/next/next/scripts/Makefile.build:520: drivers/hid/i2c-hid] Error 2
> > make[2]: *** [/home/sfr/next/next/scripts/Makefile.build:520: drivers/hid] Error 2
> > make[1]: *** [/home/sfr/next/next/Makefile:1057: drivers] Error 2
> > make: *** [Makefile:152: sub-make] Error 2
>
> OK, it seems to have to do with an object changing from a simple build
> to a multi object build.
>
> i.e. Tuesday's linux-next has these changes:
>
>  obj-$(CONFIG_CRYPTO_USER) += crypto_user.o
> +crypto_user-y := crypto_user_base.o crypto_user_stat.o
>  obj-$(CONFIG_CRYPTO_CMAC) += cmac.o
>
>  obj-$(CONFIG_I2C_HID)                          += i2c-hid.o
> +
> +i2c-hid-objs                                   =  i2c-hid-core.o
> +i2c-hid-$(CONFIG_DMI)                          += i2c-hid-dmi-quirks.o
>


OK, confirmed.


This is a regression of

commit bb5de5d28f730eeec0aa1ced51a6f11327cd1201
Author: Masahiro Yamada <yamada.masahiro@socionext•com>
Date:   Thu Sep 13 17:20:41 2018 +0900

    kbuild: remove unneeded link_multi_deps



I will fix like follows for tomorrow's linux-next.  Thanks!




diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index d7fa203..f21b48d 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -486,11 +486,11 @@ targets += $(obj)/lib-ksyms.o
 endif

 quiet_cmd_link_multi-m = LD [M]  $@
-cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter-out FORCE,$^)
$(cmd_secanalysis)
+cmd_link_multi-m = $(LD) $(ld_flags) -r -o $@ $(filter %.o,$^)
$(cmd_secanalysis)

 $(multi-used-m): FORCE
        $(call if_changed,link_multi-m)
-       @{ echo $(@:.o=.ko); echo $(filter-out FORCE,$^); \
+       @{ echo $(@:.o=.ko); echo $(filter %.o,$^); \
           $(cmd_undef_syms); } > $(MODVERDIR)/$(@F:.o=.mod)
 $(call multi_depend, $(multi-used-m), .o, -objs -y -m)




-- 
Best Regards
Masahiro Yamada

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

* Re: linux-next: occassional build errors
  2018-10-04  3:09         ` Masahiro Yamada
@ 2018-10-04  3:41           ` Stephen Rothwell
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2018-10-04  3:41 UTC (permalink / raw)
  To: Masahiro Yamada; +Cc: Linux-Next Mailing List, Linux Kernel Mailing List

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

Hi Masahiro,

On Thu, 4 Oct 2018 12:09:54 +0900 Masahiro Yamada <yamada.masahiro@socionext•com> wrote:
>
> OK, confirmed.
> 
> 
> This is a regression of
> 
> commit bb5de5d28f730eeec0aa1ced51a6f11327cd1201
> Author: Masahiro Yamada <yamada.masahiro@socionext•com>
> Date:   Thu Sep 13 17:20:41 2018 +0900
> 
>     kbuild: remove unneeded link_multi_deps
> 
> 
> 
> I will fix like follows for tomorrow's linux-next.  Thanks!

I am glad that there was a good reason :-)

Thanks.

-- 
Cheers,
Stephen Rothwell

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

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

end of thread, other threads:[~2018-10-04  3:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-03  3:50 linux-next: occassional build errors Stephen Rothwell
2018-10-03  4:31 ` Masahiro Yamada
2018-10-03  6:55   ` Stephen Rothwell
2018-10-04  0:39     ` Stephen Rothwell
2018-10-04  1:56       ` Stephen Rothwell
2018-10-04  3:09         ` Masahiro Yamada
2018-10-04  3:41           ` Stephen Rothwell

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