Kernel build fail with "Circular xxxx <- xxxx dependency dropped"

8 messages, 2 authors, 2014-06-12 · open the first message on its own page

Kernel build fail with "Circular xxxx <- xxxx dependency dropped"

From: Mike Qiu <hidden>
Date: 2014-06-11 06:02:31

Hi all,

I recently build linux next kernel in IBM Power7 platform, use default 
config file copy from /boot/config-3.6.10-4.fc18.ppc64p7

[root@cena01 linux-next]# uname -a
Linux cena01.austin.ibm.com 3.15.0-rc1+ #47 SMP Thu Apr 24 20:59:46 CDT 
2014 ppc64 ppc64 ppc64 GNU/Linux

[root@cena01 linux-next]# cat /etc/issue
Fedora release 18 (Spherical Cow)
Kernel \r on an \m (\l)

and build error log below:

[root@cena01 linux-next]# make -j60
   CHK     include/config/kernel.release
   CHK     include/generated/uapi/linux/version.h
   CHK     include/generated/utsrelease.h
   CALL    scripts/checksyscalls.sh
   CHK     include/generated/compile.h
   CALL    arch/powerpc/kernel/systbl_chk.sh
   CALL    arch/powerpc/kernel/prom_init_check.sh
   CHK     include/generated/uapi/linux/version.h
   CALL    arch/powerpc/relocs_check.pl
   Building modules, stage 2.
WARNING: 1 bad relocations
c000000001455040 R_PPC64_ADDR64    uprobes_fetch_type_table
make[1]: Circular arch/powerpc/boot/zImage.lds.S <- 
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.coff.lds.S <- 
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.coff.lds.S <- 
arch/powerpc/boot/zImage.coff.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <- 
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <- 
arch/powerpc/boot/zImage.coff.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <- 
arch/powerpc/boot/zImage.ps3.lds dependency dropped.
   WRAP    arch/powerpc/boot/zImage.ps3.lds.S
INFO: Uncompressed kernel (size 0x14d0db8) overlaps the address of the 
wrapper(0x400000)
INFO: Fixing the link_address of wrapper to (0x1500000)
ld: cannot open linker script file arch/powerpc/boot/zImage.lds: No such 
file or directory
make[1]: *** [arch/powerpc/boot/zImage.ps3.lds.S] Error 1
make: *** [zImage] Error 2
make: *** Waiting for unfinished jobs....
   MODPOST 1853 modules

I use git bisect to find out the possible commits to lead this problem:
7e1c04779efd51154baf652e653ceb24ce68939b kbuild: Use relative path for 
$(objtree)
890676c65d699db3ad82e7dddd0cf8fb449031af kbuild: Use relative path when 
building in the source tree
9da0763bdd82572be243fcf5161734f11568960f kbuild: Use relative path when 
building in a subdir of the source tree


Thanks
Mike

Re: Kernel build fail with "Circular xxxx <- xxxx dependency dropped"

From: Michal Marek <hidden>
Date: 2014-06-11 08:24:30

Dne 11.6.2014 08:02, Mike Qiu napsal(a):
Hi all,

I recently build linux next kernel in IBM Power7 platform, use default
config file copy from /boot/config-3.6.10-4.fc18.ppc64p7

[root@cena01 linux-next]# uname -a
Linux cena01.austin.ibm.com 3.15.0-rc1+ #47 SMP Thu Apr 24 20:59:46 CDT
2014 ppc64 ppc64 ppc64 GNU/Linux

[root@cena01 linux-next]# cat /etc/issue
Fedora release 18 (Spherical Cow)
Kernel \r on an \m (\l)

and build error log below:

[root@cena01 linux-next]# make -j60
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CALL    arch/powerpc/kernel/systbl_chk.sh
  CALL    arch/powerpc/kernel/prom_init_check.sh
  CHK     include/generated/uapi/linux/version.h
  CALL    arch/powerpc/relocs_check.pl
  Building modules, stage 2.
WARNING: 1 bad relocations
c000000001455040 R_PPC64_ADDR64    uprobes_fetch_type_table
make[1]: Circular arch/powerpc/boot/zImage.lds.S <-
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.coff.lds.S <-
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.coff.lds.S <-
arch/powerpc/boot/zImage.coff.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <-
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <-
arch/powerpc/boot/zImage.coff.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <-
arch/powerpc/boot/zImage.ps3.lds dependency dropped.
  WRAP    arch/powerpc/boot/zImage.ps3.lds.S
INFO: Uncompressed kernel (size 0x14d0db8) overlaps the address of the
wrapper(0x400000)
INFO: Fixing the link_address of wrapper to (0x1500000)
ld: cannot open linker script file arch/powerpc/boot/zImage.lds: No such
file or directory
make[1]: *** [arch/powerpc/boot/zImage.ps3.lds.S] Error 1
make: *** [zImage] Error 2
make: *** Waiting for unfinished jobs....
  MODPOST 1853 modules

I use git bisect to find out the possible commits to lead this problem:
7e1c04779efd51154baf652e653ceb24ce68939b kbuild: Use relative path for
$(objtree)
890676c65d699db3ad82e7dddd0cf8fb449031af kbuild: Use relative path when
building in the source tree
9da0763bdd82572be243fcf5161734f11568960f kbuild: Use relative path when
building in a subdir of the source tree
Thanks for the report, I'll have a look. If I do not come up with a
solution soon, I'll revert the series.

Michal

Re: Kernel build fail with "Circular xxxx <- xxxx dependency dropped"

From: Michal Marek <hidden>
Date: 2014-06-11 12:21:10

On Wed, Jun 11, 2014 at 10:24:24AM +0200, Michal Marek wrote:
Dne 11.6.2014 08:02, Mike Qiu napsal(a):
quoted
make[1]: Circular arch/powerpc/boot/zImage.lds.S <-
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.coff.lds.S <-
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.coff.lds.S <-
arch/powerpc/boot/zImage.coff.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <-
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <-
arch/powerpc/boot/zImage.coff.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <-
arch/powerpc/boot/zImage.ps3.lds dependency dropped.
  WRAP    arch/powerpc/boot/zImage.ps3.lds.S
INFO: Uncompressed kernel (size 0x14d0db8) overlaps the address of the
wrapper(0x400000)
INFO: Fixing the link_address of wrapper to (0x1500000)
ld: cannot open linker script file arch/powerpc/boot/zImage.lds: No such
file or directory
make[1]: *** [arch/powerpc/boot/zImage.ps3.lds.S] Error 1
make: *** [zImage] Error 2
make: *** Waiting for unfinished jobs....
  MODPOST 1853 modules

I use git bisect to find out the possible commits to lead this problem:
7e1c04779efd51154baf652e653ceb24ce68939b kbuild: Use relative path for
$(objtree)
890676c65d699db3ad82e7dddd0cf8fb449031af kbuild: Use relative path when
building in the source tree
9da0763bdd82572be243fcf5161734f11568960f kbuild: Use relative path when
building in a subdir of the source tree
Thanks for the report, I'll have a look. If I do not come up with a
solution soon, I'll revert the series.
I have yet to test this, but can you try the patch below?

Thanks!
Michal

From 7f8336f4c7f2131efbe82543580dda3ec1988609 Mon Sep 17 00:00:00 2001
From: Michal Marek <redacted>
Date: Wed, 11 Jun 2014 13:53:48 +0200
Subject: [PATCH] powerpc: Avoid circular dependency with zImage.%

The rule to create the final images uses a zImage.% pattern.
Unfortunately, this also matches the names of the zImage.*.lds linker
scripts, which appear as a dependency of the final images. This somehow
worked when $(srctree) used to be an absolute path, but now the pattern
matches too much. List only the images from $(image-y) as the target of
the rule, to avoid the circular dependency.

Signed-off-by: Michal Marek <redacted>
---
 arch/powerpc/boot/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 426dce7..c60992c 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -333,7 +333,7 @@ $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
 $(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
 	$(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz)
 
-$(obj)/zImage.%: vmlinux $(wrapperbits)
+$(addprefix $(obj)/, $(filter zImage.%, $(image-y))): vmlinux $(wrapperbits)
 	$(call if_changed,wrap,$*)
 
 # dtbImage% - a dtbImage is a zImage with an embedded device tree blob
-- 
1.9.2

Re: Kernel build fail with "Circular xxxx <- xxxx dependency dropped"

From: Michal Marek <hidden>
Date: 2014-06-11 12:22:18

Dne 11.6.2014 14:21, Michal Marek napsal(a):
On Wed, Jun 11, 2014 at 10:24:24AM +0200, Michal Marek wrote:
quoted
Dne 11.6.2014 08:02, Mike Qiu napsal(a):
quoted
make[1]: Circular arch/powerpc/boot/zImage.lds.S <-
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.coff.lds.S <-
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.coff.lds.S <-
arch/powerpc/boot/zImage.coff.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <-
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <-
arch/powerpc/boot/zImage.coff.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <-
arch/powerpc/boot/zImage.ps3.lds dependency dropped.
  WRAP    arch/powerpc/boot/zImage.ps3.lds.S
INFO: Uncompressed kernel (size 0x14d0db8) overlaps the address of the
wrapper(0x400000)
INFO: Fixing the link_address of wrapper to (0x1500000)
ld: cannot open linker script file arch/powerpc/boot/zImage.lds: No such
file or directory
make[1]: *** [arch/powerpc/boot/zImage.ps3.lds.S] Error 1
make: *** [zImage] Error 2
make: *** Waiting for unfinished jobs....
  MODPOST 1853 modules

I use git bisect to find out the possible commits to lead this problem:
7e1c04779efd51154baf652e653ceb24ce68939b kbuild: Use relative path for
$(objtree)
890676c65d699db3ad82e7dddd0cf8fb449031af kbuild: Use relative path when
building in the source tree
9da0763bdd82572be243fcf5161734f11568960f kbuild: Use relative path when
building in a subdir of the source tree
Thanks for the report, I'll have a look. If I do not come up with a
solution soon, I'll revert the series.
I have yet to test this, but can you try the patch below?

Thanks!
Michal


From 7f8336f4c7f2131efbe82543580dda3ec1988609 Mon Sep 17 00:00:00 2001
From: Michal Marek <redacted>
Date: Wed, 11 Jun 2014 13:53:48 +0200
Subject: [PATCH] powerpc: Avoid circular dependency with zImage.%

The rule to create the final images uses a zImage.% pattern.
Unfortunately, this also matches the names of the zImage.*.lds linker
scripts, which appear as a dependency of the final images. This somehow
worked when $(srctree) used to be an absolute path, but now the pattern
matches too much. List only the images from $(image-y) as the target of
the rule, to avoid the circular dependency.
If merged, this should of course have a Reported-by: Mike Qiu
[off-list ref]

Michal

Re: Kernel build fail with "Circular xxxx <- xxxx dependency dropped"

From: Mike Qiu <hidden>
Date: 2014-06-11 12:36:39

Hi Michal,

after ally you patch, it also has some issue, see below:

WARNING: 1 bad relocations
c000000001455040 R_PPC64_ADDR64    uprobes_fetch_type_table
arch/powerpc/boot/Makefile:336: target 
`arch/powerpc/boot/zImage.pseries' given more than once in the same rule.
gcc -m32 -Wp,-MD,arch/powerpc/boot/.zImage.lds.d  -nostdinc -isystem 
/usr/lib/gcc/ppc64-redhat-linux/4.7.2/include -I./arch/powerpc/include 
-Iarch/powerpc/include/generated -Iinclude -I./arch/powe
rpc/include/uapi -Iarch/powerpc/include/generated/uapi -I./include/uapi 
-Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ 
-Iarch/powerpc      -E -Wp,-MD,arch/powerpc/boot/.zI
mage.lds.d -P -Upowerpc \
         -D__ASSEMBLY__ -DLINKER_SCRIPT -o arch/powerpc/boot/zImage.lds 
arch/powerpc/boot/zImage.lds.S
   WRAP    arch/powerpc/boot/zImage.pseries
   WRAP    arch/powerpc/boot/zImage.epapr
   MODPOST 1853 modules
INFO: Uncompressed kernel (size 0x14d0db8) overlaps the address of the 
wrapper(0x400000)
INFO: Fixing the link_address of wrapper to (0x1500000)
ld: cannot find arch/powerpc/boot/vmlinux.o: No such file or directory
make[1]: *** [arch/powerpc/boot/zImage.pseries] Error 1
make[1]: *** Waiting for unfinished jobs....
INFO: Uncompressed kernel (size 0x14d0db8) overlaps the address of the 
wrapper(0x400000)
INFO: Fixing the link_address of wrapper to (0x1500000)
ld: cannot find arch/powerpc/boot/vmlinux.o: No such file or directory
make[1]: *** [arch/powerpc/boot/zImage.epapr] Error 1
make: *** [zImage] Error 2
make: *** Waiting for unfinished jobs....

Thanks
Mike

On 06/11/2014 08:22 PM, Michal Marek wrote:
Dne 11.6.2014 14:21, Michal Marek napsal(a):
quoted
On Wed, Jun 11, 2014 at 10:24:24AM +0200, Michal Marek wrote:
quoted
Dne 11.6.2014 08:02, Mike Qiu napsal(a):
quoted
make[1]: Circular arch/powerpc/boot/zImage.lds.S <-
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.coff.lds.S <-
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.coff.lds.S <-
arch/powerpc/boot/zImage.coff.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <-
arch/powerpc/boot/zImage.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <-
arch/powerpc/boot/zImage.coff.lds dependency dropped.
make[1]: Circular arch/powerpc/boot/zImage.ps3.lds.S <-
arch/powerpc/boot/zImage.ps3.lds dependency dropped.
   WRAP    arch/powerpc/boot/zImage.ps3.lds.S
INFO: Uncompressed kernel (size 0x14d0db8) overlaps the address of the
wrapper(0x400000)
INFO: Fixing the link_address of wrapper to (0x1500000)
ld: cannot open linker script file arch/powerpc/boot/zImage.lds: No such
file or directory
make[1]: *** [arch/powerpc/boot/zImage.ps3.lds.S] Error 1
make: *** [zImage] Error 2
make: *** Waiting for unfinished jobs....
   MODPOST 1853 modules

I use git bisect to find out the possible commits to lead this problem:
7e1c04779efd51154baf652e653ceb24ce68939b kbuild: Use relative path for
$(objtree)
890676c65d699db3ad82e7dddd0cf8fb449031af kbuild: Use relative path when
building in the source tree
9da0763bdd82572be243fcf5161734f11568960f kbuild: Use relative path when
building in a subdir of the source tree
Thanks for the report, I'll have a look. If I do not come up with a
solution soon, I'll revert the series.
I have yet to test this, but can you try the patch below?

Thanks!
Michal


 From 7f8336f4c7f2131efbe82543580dda3ec1988609 Mon Sep 17 00:00:00 2001
From: Michal Marek <redacted>
Date: Wed, 11 Jun 2014 13:53:48 +0200
Subject: [PATCH] powerpc: Avoid circular dependency with zImage.%

The rule to create the final images uses a zImage.% pattern.
Unfortunately, this also matches the names of the zImage.*.lds linker
scripts, which appear as a dependency of the final images. This somehow
worked when $(srctree) used to be an absolute path, but now the pattern
matches too much. List only the images from $(image-y) as the target of
the rule, to avoid the circular dependency.
If merged, this should of course have a Reported-by: Mike Qiu
[off-list ref]

Michal

[PATCH v2] powerpc: Avoid circular dependency with zImage.%

From: Michal Marek <hidden>
Date: 2014-06-11 15:40:58

The rule to create the final images uses a zImage.% pattern.
Unfortunately, this also matches the names of the zImage.*.lds linker
scripts, which appear as a dependency of the final images. This somehow
worked when $(srctree) used to be an absolute path, but now the pattern
matches too much. List only the images from $(image-y) as the target of
the rule, to avoid the circular dependency.

Signed-off-by: Michal Marek <redacted>
---
v2:
  - Filter out duplicates in the target list
  - fix the platform argument to cmd_wrap

 arch/powerpc/boot/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 426dce7..ccc25ed 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -333,8 +333,8 @@ $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
 $(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
 	$(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz)
 
-$(obj)/zImage.%: vmlinux $(wrapperbits)
-	$(call if_changed,wrap,$*)
+$(addprefix $(obj)/, $(sort $(filter zImage.%, $(image-y)))): vmlinux $(wrapperbits)
+	$(call if_changed,wrap,$(subst $(obj)/zImage.,,$@))
 
 # dtbImage% - a dtbImage is a zImage with an embedded device tree blob
 $(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb
-- 
1.9.2

Re: [PATCH v2] powerpc: Avoid circular dependency with zImage.%

From: Mike Qiu <hidden>
Date: 2014-06-12 02:07:14

This v2 patch is good,

Tested-by: Mike Qiu <redacted>

On 06/11/2014 11:40 PM, Michal Marek wrote:
quoted hunk
The rule to create the final images uses a zImage.% pattern.
Unfortunately, this also matches the names of the zImage.*.lds linker
scripts, which appear as a dependency of the final images. This somehow
worked when $(srctree) used to be an absolute path, but now the pattern
matches too much. List only the images from $(image-y) as the target of
the rule, to avoid the circular dependency.

Signed-off-by: Michal Marek <redacted>
---
v2:
   - Filter out duplicates in the target list
   - fix the platform argument to cmd_wrap

  arch/powerpc/boot/Makefile | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 426dce7..ccc25ed 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -333,8 +333,8 @@ $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
  $(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
  	$(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz)

-$(obj)/zImage.%: vmlinux $(wrapperbits)
-	$(call if_changed,wrap,$*)
+$(addprefix $(obj)/, $(sort $(filter zImage.%, $(image-y)))): vmlinux $(wrapperbits)
+	$(call if_changed,wrap,$(subst $(obj)/zImage.,,$@))

  # dtbImage% - a dtbImage is a zImage with an embedded device tree blob
  $(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb

Re: [PATCH v2] powerpc: Avoid circular dependency with zImage.%

From: Michal Marek <hidden>
Date: 2014-06-12 08:09:17

Dne 12.6.2014 04:07, Mike Qiu napsal(a):
This v2 patch is good,

Tested-by: Mike Qiu <redacted>
Thanks. In kbuild.git it goes.

Michal
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help