Skip to contentSkip to conversation

aic7xxx build failure

DISCUSSION Adrian Bunk 4 participants 12 messages Feb 5, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx compilation:

<-- snip -->

$ make O=../out/x86-full
...
  SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
  SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
  CC      drivers/scsi/aic7xxx/aic79xx_core.o
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1

<-- snip -->

Next "make" run brings the same failure in
drivers/scsi/aic7xxx/aic7xxx_core.c.

With the third "make" it works.

It might compile for people with SMP systems using -j?

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
maintainer Acked-by Ingo Molnar Acked-by
#1 lore raw
Quoted 14 lines · Adrian Bunk

Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx compilation:

<-- snip -->

$ make O=../out/x86-full
...
  SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
  SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
  CC      drivers/scsi/aic7xxx/aic79xx_core.o
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1
Quoted 8 lines

<-- snip -->

Next "make" run brings the same failure in
drivers/scsi/aic7xxx/aic7xxx_core.c.

With the third "make" it works.

It might compile for people with SMP systems using -j?

I'd just say "weird behaviour" the file being complained about is definitely part of the tree ... does it actually exist in your tree when gcc claims it doesn't? if so, I suspect some type of make path screwup here. The commit in question is this:

commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb

Author: Sam Ravnborg <[email protected]>
Date:   Sun Feb 3 21:55:49 2008 +0100

scsi: fix dependency bug in aic7 Makefile

Building the aic7xxx driver includes the copy
of an .h file from a _shipped file.

In a highly parallel build Ingo saw that the build sometimes failed (included distcc usage). It was tracked down to a missing dependency from the .c source file to the generated .h file.
We started to build the .c file before the copy (cat) operation of the .h file completed and we then only got half of the definitions from the copied .h file.

Add an explicit dependency from the .c files to the generated .h files so make knows all dependencies and finsih the build of the .h files before it starts building the .o files.

Ingo tested this fix and reported:
good news: hundreds of successful kernel builds and no failures overnight.

drivers/scsi/aic7xxx/Makefile +2 -7
index e4f70c5..4c54954 100644
@@ -44,13 +44,8 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c
 
 # Dependencies for generated files need to be listed explicitly
 
-$(obj)/aic7xxx_core.o: $(obj)/aic7xxx_seq.h
-$(obj)/aic7xxx_core.o: $(obj)/aic7xxx_reg.h
-$(obj)/aic79xx_core.o: $(obj)/aic79xx_seq.h
-$(obj)/aic79xx_core.o: $(obj)/aic79xx_reg.h
-
-$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h
-$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h
+$(addprefix $(src)/,$(aic7xxx-y:.o=.c)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
+$(addprefix $(src)/,$(aic79xx-y:.o=.c)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h
 
 aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE)	:= $(obj)/aic7xxx_reg.h
 aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT)	+= $(obj)/aic7xxx_reg_print.c

The last two additions look wrong: they make source files depend on headers, which isn't right: it's object files that depend on headers (we don't know how to rebuild the .c files because they're not auto generated). However, the commit log indicates the cause might be deeper.

James

maintainer
#2 lore raw
In reply to Adrian Bunk
Quoted 5 lines · Adrian Bunk

Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx compilation:

<-- snip -->

Quoted 8 lines
$ make O=../out/x86-full
...
  SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
  SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
  CC      drivers/scsi/aic7xxx/aic79xx_core.o
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1

Could you run this with V=1 to get us a verbose output of what the exact files gcc is failing on are?

Thanks,

James

#3 lore raw
Quoted 16 lines · James Bottomley
Quoted 5 lines · Adrian Bunk

Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx compilation:

<-- snip -->

Quoted 8 lines
$ make O=../out/x86-full
...
  SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
  SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
  CC      drivers/scsi/aic7xxx/aic79xx_core.o
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1
Quoted 2 lines

Could you run this with V=1 to get us a verbose output of what the exact files gcc is failing on are?

make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build obj=drivers/scsi
make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build obj=drivers/scsi/aacraid
(cat /dev/null; ) > drivers/scsi/aacraid/modules.order
make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build obj=drivers/scsi/aic7xxx
cat /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped > drivers/scsi/aic7xxx/aic79xx_seq.h
cat /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped > drivers/scsi/aic7xxx/aic79xx_reg.h
gcc -Wp,-MD,drivers/scsi/aic7xxx/.aic79xx_core.o.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.2.3/include -D__KERNEL__ -Iinclude -Iinclude2 -I/home/bunk/linux/kernel-2.6/git/linux-2.6/include -include include/linux/autoconf.h -I/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx -Idrivers/scsi/aic7xxx -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=athlon -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -I/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-x86/mach-generic -Iinclude/asm-x86/mach-gener
ic -I/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-x86/mach-default -Iinclude/asm-x86/mach-default -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -I/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi -Idrivers/scsi -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(aic79xx_core)" -D"KBUILD_MODNAME=KBUILD_STR(aic79xx)" -c -o drivers/scsi/aic7xxx/aic79xx_core.o drivers/scsi/aic7xxx/aic79xx_core.c
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1
make[3]: *** [drivers/scsi/aic7xxx] Error 2
make[2]: *** [drivers/scsi] Error 2
make[1]: *** [drivers] Error 2
make: *** [sub-make] Error 2

Quoted 3 lines

Thanks,

James

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
maintainer
#4 lore raw
Quoted 20 lines · Adrian Bunk
Quoted 16 lines · James Bottomley
Quoted 5 lines · Adrian Bunk

Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx compilation:

<-- snip -->

Quoted 8 lines
$ make O=../out/x86-full
...
  SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
  SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
  CC      drivers/scsi/aic7xxx/aic79xx_core.o
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1
Quoted 2 lines

Could you run this with V=1 to get us a verbose output of what the exact files gcc is failing on are?

Quoted 7 lines

make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build obj=drivers/scsi
make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build obj=drivers/scsi/aacraid
(cat /dev/null; ) > drivers/scsi/aacraid/modules.order
make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build obj=drivers/scsi/aic7xxx
cat /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped > drivers/scsi/aic7xxx/aic79xx_seq.h
cat /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped > drivers/scsi/aic7xxx/aic79xx_reg.h
gcc -Wp,-MD,drivers/scsi/aic7xxx/.aic79xx_core.o.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.2.3/include -D__KERNEL__ -Iinclude -Iinclude2 -I/home/bunk/linux/kernel-2.6/git/linux-2.6/include -include include/linux/autoconf.h -I/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx -Idrivers/scsi/aic7xxx -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=athlon -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -I/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-x86/mach-generic -Iinclude/asm-x86/mach-gen

eric -I/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-x86/mach-default -Iinclude/asm-x86/mach-default -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -I/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi -Idrivers/scsi -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(aic79xx_core)" -D"KBUILD_MODNAME=KBUILD_STR(aic79xx)" -c -o drivers/scsi/aic7xxx/aic79xx_core.o drivers/scsi/aic7xxx/aic79xx_core.c

Quoted 7 lines

gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1 make[3]: *** [drivers/scsi/aic7xxx] Error 2
make[2]: *** [drivers/scsi] Error 2
make[1]: *** [drivers] Error 2
make: *** [sub-make] Error 2

Do I assume from this that you have different source and object directories? There shouldn't be a failure if this is building in /home/bunk/linux/kernel-2.6/git/linux-2.6/ because the source file should be there.

James

#5 lore raw
Quoted 22 lines · James Bottomley
Quoted 20 lines · Adrian Bunk
Quoted 18 lines · James Bottomley
Quoted 5 lines · Adrian Bunk

Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx compilation:

<-- snip -->

Quoted 8 lines
$ make O=../out/x86-full
...
  SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
  SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
  CC      drivers/scsi/aic7xxx/aic79xx_core.o
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1

Could you run this with V=1 to get us a verbose output of what the exact files gcc is failing on are?

Quoted 7 lines
Quoted 7 lines

make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build obj=drivers/scsi
make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build obj=drivers/scsi/aacraid
(cat /dev/null; ) > drivers/scsi/aacraid/modules.order
make -f /home/bunk/linux/kernel-2.6/git/linux-2.6/scripts/Makefile.build obj=drivers/scsi/aic7xxx
cat /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx/aic79xx_seq.h_shipped > drivers/scsi/aic7xxx/aic79xx_seq.h
cat /home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx/aic79xx_reg.h_shipped > drivers/scsi/aic7xxx/aic79xx_reg.h
gcc -Wp,-MD,drivers/scsi/aic7xxx/.aic79xx_core.o.d -nostdinc -isystem /usr/lib/gcc/i486-linux-gnu/4.2.3/include -D__KERNEL__ -Iinclude -Iinclude2 -I/home/bunk/linux/kernel-2.6/git/linux-2.6/include -include include/linux/autoconf.h -I/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi/aic7xxx -Idrivers/scsi/aic7xxx -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=athlon -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -I/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-x86/mach-generic -Iinclude/asm-x86/mach-g

eneric -I/home/bunk/linux/kernel-2.6/git/linux-2.6/include/asm-x86/mach-default -Iinclude/asm-x86/mach-default -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign -I/home/bunk/linux/kernel-2.6/git/linux-2.6/drivers/scsi -Idrivers/scsi -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(aic79xx_core)" -D"KBUILD_MODNAME=KBUILD_STR(aic79xx)" -c -o drivers/scsi/aic7xxx/aic79xx_core.o drivers/scsi/aic7xxx/aic79xx_core.c

Quoted 10 lines
Quoted 7 lines

gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1 make[3]: *** [drivers/scsi/aic7xxx] Error 2
make[2]: *** [drivers/scsi] Error 2
make[1]: *** [drivers] Error 2
make: *** [sub-make] Error 2

Do I assume from this that you have different source and object directories?

Yes, as I wrote in my bug report:
make O=../out/x86-full

Quoted 5 lines

There shouldn't be a failure if this is building
in /home/bunk/linux/kernel-2.6/git/linux-2.6/ because the source file should be there.

James

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#6 lore raw
In reply to James Bottomley

On Tue, 05 Feb 2008 12:30:56 -0600

Quoted 8 lines
Quoted 1 line

make: *** [sub-make] Error 2

Do I assume from this that you have different source and object directories? There shouldn't be a failure if this is building in /home/bunk/linux/kernel-2.6/git/linux-2.6/ because the source file should be there.

James

time to run a fsck as well just to rule stuff out?

Signature · 3 lines
If you want to reach me at my work email, use [email protected]
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org
#7 lore raw
In reply to Adrian Bunk
Quoted 14 lines · Adrian Bunk

Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx compilation:

<-- snip -->

$ make O=../out/x86-full
...
  SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
  SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
  CC      drivers/scsi/aic7xxx/aic79xx_core.o
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1
Quoted 8 lines

<-- snip -->

Next "make" run brings the same failure in
drivers/scsi/aic7xxx/aic7xxx_core.c.

With the third "make" it works.

It might compile for people with SMP systems using -j?

I can reproduce it and will fix it.

Sam

#8 lore raw
Quoted 17 lines · Sam Ravnborg
Quoted 16 lines · Adrian Bunk

Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx compilation:

<-- snip -->

$ make O=../out/x86-full
...
  SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
  SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
  CC      drivers/scsi/aic7xxx/aic79xx_core.o
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1

<-- snip -->

Quoted 8 lines
Quoted 6 lines

Next "make" run brings the same failure in
drivers/scsi/aic7xxx/aic7xxx_core.c.

With the third "make" it works.

It might compile for people with SMP systems using -j?

I can reproduce it and will fix it.

Seems I was sidetracked by some wrong assumptions. Could you please test this fix.

Works for me but this time I will do more testing....

Sam

drivers/scsi/aic7xxx/Makefile +2 -2
index 4c54954..6aa49e7 100644
@@ -44,8 +44,8 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c
 
 # Dependencies for generated files need to be listed explicitly
 
-$(addprefix $(src)/,$(aic7xxx-y:.o=.c)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
-$(addprefix $(src)/,$(aic79xx-y:.o=.c)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h
+$(addprefix $(src)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
+$(addprefix $(src)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h
 
 aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE)	:= $(obj)/aic7xxx_reg.h
 aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT)	+= $(obj)/aic7xxx_reg_print.c
maintainer
#9 lore raw
Quoted 38 lines · Sam Ravnborg
Quoted 17 lines · Sam Ravnborg
Quoted 16 lines · Adrian Bunk

Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx compilation:

<-- snip -->

$ make O=../out/x86-full
...
  SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
  SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
  CC      drivers/scsi/aic7xxx/aic79xx_core.o
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1

<-- snip -->

Quoted 8 lines
Quoted 6 lines

Next "make" run brings the same failure in
drivers/scsi/aic7xxx/aic7xxx_core.c.

With the third "make" it works.

It might compile for people with SMP systems using -j?

I can reproduce it and will fix it.

Seems I was sidetracked by some wrong assumptions. Could you please test this fix.

Works for me but this time I will do more testing....

Sam

drivers/scsi/aic7xxx/Makefile +0 -0
index 4c54954..6aa49e7 100644

drivers/scsi/aic7xxx/Makefile clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c · line 48

Quoted 7 lines
drivers/scsi/aic7xxx/Makefile +2 -2
@@ -44,8 +44,8 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c
 
 # Dependencies for generated files need to be listed explicitly
 
-$(addprefix $(src)/,$(aic7xxx-y:.o=.c)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
-$(addprefix $(src)/,$(aic79xx-y:.o=.c)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h
+$(addprefix $(src)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
+$(addprefix $(src)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h

OK, I think it's time for me to give up completely on understanding kbuild. To me this construction looks like you're adding source directory prefixes to objects ... which can never be satisfied can it, if the objectas are in the object directory?

James

#11 lore raw
In reply to Sam Ravnborg
Quoted 23 lines · Sam Ravnborg
Quoted 22 lines · Sam Ravnborg
Quoted 21 lines · Adrian Bunk

Commit 8891fec65ac5b5a74b50c705e31b66c92c3eddeb broke aic7xxx compilation:

<-- snip -->

$ make O=../out/x86-full
...
  SHIPPED drivers/scsi/aic7xxx/aic79xx_seq.h
  SHIPPED drivers/scsi/aic7xxx/aic79xx_reg.h
  CC      drivers/scsi/aic7xxx/aic79xx_core.o
gcc: drivers/scsi/aic7xxx/aic79xx_core.c: No such file or directory
gcc: no input files
make[4]: *** [drivers/scsi/aic7xxx/aic79xx_core.o] Error 1

<-- snip -->

Next "make" run brings the same failure in
drivers/scsi/aic7xxx/aic7xxx_core.c.

With the third "make" it works.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

It might compile for people with SMP systems using -j?

I can reproduce it and will fix it.

Seems I was sidetracked by some wrong assumptions. Could you please test this fix.

Works for me but this time I will do more testing....

Thanks, works fine for me.

Quoted 7 lines

Sam

drivers/scsi/aic7xxx/Makefile +0 -0
index 4c54954..6aa49e7 100644

drivers/scsi/aic7xxx/Makefile clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c · line 51

Quoted 10 lines
drivers/scsi/aic7xxx/Makefile +2 -2
@@ -44,8 +44,8 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c
 
 # Dependencies for generated files need to be listed explicitly
 
-$(addprefix $(src)/,$(aic7xxx-y:.o=.c)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
-$(addprefix $(src)/,$(aic79xx-y:.o=.c)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h
+$(addprefix $(src)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
+$(addprefix $(src)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h
 
 aic7xxx-gen-$(CONFIG_AIC7XXX_BUILD_FIRMWARE)	:= $(obj)/aic7xxx_reg.h
 aic7xxx-gen-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT)	+= $(obj)/aic7xxx_reg_print.c

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#10 lore raw
In reply to James Bottomley
Quoted 7 lines
Quoted 7 lines

index 4c54954..6aa49e7 100644

drivers/scsi/aic7xxx/Makefile +0 -0
@@ -44,8 +44,8 @@ clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c
 
 # Dependencies for generated files need to be listed explicitly
 
Quoted 9 lines

drivers/scsi/aic7xxx/Makefile clean-files += aic79xx_seq.h aic79xx_reg.h aic79xx_reg_print.c · line 48

Quoted 4 lines
drivers/scsi/aic7xxx/Makefile +2 -2
-$(addprefix $(src)/,$(aic7xxx-y:.o=.c)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
-$(addprefix $(src)/,$(aic79xx-y:.o=.c)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h
+$(addprefix $(src)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h
+$(addprefix $(src)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h

OK, I think it's time for me to give up completely on understanding kbuild. To me this construction looks like you're adding source directory prefixes to objects ... which can never be satisfied can it, if the objectas are in the object directory?

Or maybe I'm just so damn tired that I should sleep instead of trying to fix this Makefile for 117 time.
You are right that it should read:

-$(addprefix $(src)/,$(aic7xxx-y:.o=.c)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h -$(addprefix $(src)/,$(aic79xx-y:.o=.c)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h +$(addprefix $(obj)/,$(aic7xxx-y)): $(obj)/aic7xxx_seq.h $(obj)/aic7xxx_reg.h +$(addprefix $(obj)/,$(aic79xx-y)): $(obj)/aic79xx_seq.h $(obj)/aic79xx_reg.h

But for now the distinction between src and obj is purely for documentation as they have the same value - also when O= is used.
So it should work anyway.

If you use M=... (or SUBDIRS=...) I think it matters but this is not the case for this in-tree driver in normal usage situations.

I will test some more tomorrow and if feedback from Adrian is positive I will submit the hopefully last update to this Makefile to Linus.
[I need to test if it can generate the files using the aicasm tool for instance).

Sam