Build errors on mainline kernel

Subsystems: linux for powerpc (32-bit and 64-bit), linux for powerpc embedded ppc85xx, the rest · Maintainers: Madhavan Srinivasan, Scott Wood, Linus Torvalds

6 messages, 3 authors, 2013-08-13 · open the first message on its own page

Build errors on mainline kernel

From: Sukadev Bhattiprolu <hidden>
Date: 2013-08-09 18:25:19

I am tryng to compile clean mainline kernel with a few different config files
and running into errors with some configs.

I am building on RHEL6.3 with following binaries:

	gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
	GNU ld version 2.20.51.0.2-5.34.el6 20100205
	binutils-2.20.51.0.2-5.34.el6.ppc64
	binutils-devel-2.20.51.0.2-5.34.el6.ppc64

I am getting the error with several files and configs, but other configs 
(eg: ppc64_defconfig, pmac32_defconfig) build fine.

For instance, with latest mainline kernel (commit 6c2580c) and ppc64_defconfig, I get:

	make O=linux-obj mrproper
	make O=linux-obj ppc64e_defconfig
	make O=linux-obj arch/powerpc/platforms/85xx/smp.o
	  ...

	CC      arch/powerpc/platforms/85xx/smp.o
	{standard input}: Assembler messages:
	{standard input}:240: Error: junk at end of line: `1'
	make[2]: *** [arch/powerpc/platforms/85xx/smp.o] Error 1
	make[1]: *** [arch/powerpc/platforms/85xx/smp.o] Error 2

Not sure if 240 is a line number in smp.c, but looking through the function
containing line 240, I was able to compile the smp.c after commenting out
the two WARN_ON() messages.
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp
index 5ced4f5..9705850 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -151,8 +151,10 @@ static int smp_85xx_kick_cpu(int nr)
        int ioremappable;
        int ret = 0;
 
+#if 0
        WARN_ON(nr < 0 || nr >= NR_CPUS);
        WARN_ON(hw_cpu < 0 || hw_cpu >= NR_CPUS);
+#endif
 
        pr_debug("smp_85xx_kick_cpu: kick CPU #%d\n", nr);

---
The pre-processor output for the first WARN_ON() is:

 ---
 ({ int __ret_warn_on = !!(nr < 0 || nr >= 32); if (__builtin_constant_p(__ret_warn_on)) { if (__ret_warn_on) do { __asm__ __volatile__( "1:    twi 31,0,0\n" ".section __bug_table,\"a\"\n" "2:\t" ".llong" " " "1b, %0\n" "\t.short %1, %2\n" ".org 2b+%3\n" ".previous\n" : : "i" ("/root/tmp/linux.git/arch/powerpc/platforms/85xx/smp.c"), "i" (154), "i" (((1 << 0) | ((9) << 8))), "i" (sizeof(struct bug_entry))); } while (0); } else { __asm__ __volatile__( "1:      ""tdnei" " ""   %4,0\n" ".section __bug_table,\"a\"\n" "2:\t" ".llong" " " "1b, %0\n" "\t.short %1, %2\n" ".org 2b+%3\n" ".previous\n" : : "i" ("/root/tmp/linux.git/arch/powerpc/platforms/85xx/smp.c"), "i" (154), "i" (((1 << 0) | ((9) << 8))), "i" (sizeof(struct bug_entry)), "r" (__ret_warn_on)); } __builtin_expect(!!(__ret_warn_on), 0); });

---


Should I be doing something different to build with these configs ?

Re: Build errors on mainline kernel

From: Kumar Gala <hidden>
Date: 2013-08-09 23:47:11

On Aug 9, 2013, at 1:24 PM, Sukadev Bhattiprolu wrote:
=20
I am tryng to compile clean mainline kernel with a few different =
config files
and running into errors with some configs.
=20
I am building on RHEL6.3 with following binaries:
=20
	gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
	GNU ld version 2.20.51.0.2-5.34.el6 20100205
	binutils-2.20.51.0.2-5.34.el6.ppc64
	binutils-devel-2.20.51.0.2-5.34.el6.ppc64
=20
I am getting the error with several files and configs, but other =
configs=20
(eg: ppc64_defconfig, pmac32_defconfig) build fine.
=20
For instance, with latest mainline kernel (commit 6c2580c) and =
ppc64_defconfig, I get:
=20
	make O=3Dlinux-obj mrproper
	make O=3Dlinux-obj ppc64e_defconfig
	make O=3Dlinux-obj arch/powerpc/platforms/85xx/smp.o
	  ...
=20
	CC      arch/powerpc/platforms/85xx/smp.o
	{standard input}: Assembler messages:
	{standard input}:240: Error: junk at end of line: `1'
	make[2]: *** [arch/powerpc/platforms/85xx/smp.o] Error 1
	make[1]: *** [arch/powerpc/platforms/85xx/smp.o] Error 2
=20
Not sure if 240 is a line number in smp.c, but looking through the =
function
containing line 240, I was able to compile the smp.c after commenting =
out
quoted hunk
the two WARN_ON() messages.
=20
diff --git a/arch/powerpc/platforms/85xx/smp.c =
b/arch/powerpc/platforms/85xx/smp
quoted hunk
index 5ced4f5..9705850 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -151,8 +151,10 @@ static int smp_85xx_kick_cpu(int nr)
       int ioremappable;
       int ret =3D 0;
=20
+#if 0
       WARN_ON(nr < 0 || nr >=3D NR_CPUS);
       WARN_ON(hw_cpu < 0 || hw_cpu >=3D NR_CPUS);
+#endif
=20
       pr_debug("smp_85xx_kick_cpu: kick CPU #%d\n", nr);
=20
---
=20
The pre-processor output for the first WARN_ON() is:
=20
---
({ int __ret_warn_on =3D !!(nr < 0 || nr >=3D 32); if =
(__builtin_constant_p(__ret_warn_on)) { if (__ret_warn_on) do { __asm__ =
__volatile__( "1:    twi 31,0,0\n" ".section __bug_table,\"a\"\n" "2:\t" =
".llong" " " "1b, %0\n" "\t.short %1, %2\n" ".org 2b+%3\n" ".previous\n" =
: : "i" ("/root/tmp/linux.git/arch/powerpc/platforms/85xx/smp.c"), "i" =
(154), "i" (((1 << 0) | ((9) << 8))), "i" (sizeof(struct bug_entry))); } =
while (0); } else { __asm__ __volatile__( "1:      ""tdnei" " ""   =
%4,0\n" ".section __bug_table,\"a\"\n" "2:\t" ".llong" " " "1b, %0\n" =
"\t.short %1, %2\n" ".org 2b+%3\n" ".previous\n" : : "i" =
("/root/tmp/linux.git/arch/powerpc/platforms/85xx/smp.c"), "i" (154), =
"i" (((1 << 0) | ((9) << 8))), "i" (sizeof(struct bug_entry)), "r" =
(__ret_warn_on)); } __builtin_expect(!!(__ret_warn_on), 0); });
=20
---
=20
=20
Should I be doing something different to build with these configs ?
=20
Hmm, that is odd.

How about doing:

$ make V=3D1

so we can see what compiler flags are being passed around.

- k=

Re: Build errors on mainline kernel

From: Sukadev Bhattiprolu <hidden>
Date: 2013-08-10 01:01:51

Kumar Gala [galak@kernel.crashing.org] wrote:
|=20
| >=20
| > The pre-processor output for the first WARN_ON() is:
| >=20
| > ---
| > ({ int __ret_warn_on =3D !!(nr < 0 || nr >=3D 32); if (__builtin_consta=
nt_p(__ret_warn_on)) { if (__ret_warn_on) do { __asm__ __volatile__( "1:   =
 twi 31,0,0\n" ".section __bug_table,\"a\"\n" "2:\t" ".llong" " " "1b, %0\n=
" "\t.short %1, %2\n" ".org 2b+%3\n" ".previous\n" : : "i" ("/root/tmp/linu=
x.git/arch/powerpc/platforms/85xx/smp.c"), "i" (154), "i" (((1 << 0) | ((9)=
 << 8))), "i" (sizeof(struct bug_entry))); } while (0); } else { __asm__ __=
volatile__( "1:      ""tdnei" " ""   %4,0\n" ".section __bug_table,\"a\"\n"=
 "2:\t" ".llong" " " "1b, %0\n" "\t.short %1, %2\n" ".org 2b+%3\n" ".previo=
us\n" : : "i" ("/root/tmp/linux.git/arch/powerpc/platforms/85xx/smp.c"), "i=
" (154), "i" (((1 << 0) | ((9) << 8))), "i" (sizeof(struct bug_entry)), "r"=
 (__ret_warn_on)); } __builtin_expect(!!(__ret_warn_on), 0); });
| >=20
| > ---
| >=20
| >=20
| > Should I be doing something different to build with these configs ?
| >=20
|=20
| Hmm, that is odd.
|=20
| How about doing:
|=20
| $ make V=3D1
|=20
| so we can see what compiler flags are being passed around.

Sure.=20

make -f /root/tmp/linux.git/scripts/Makefile.build obj=3Darch/powerpc/platf=
orms/85xx arch/powerpc/platforms/85xx/smp.o
  gcc -m64 -Wp,-MD,arch/powerpc/platforms/85xx/.smp.o.d  -nostdinc -isystem=
 /usr/lib/gcc/ppc64-redhat-linux/4.4.6/include -I/root/tmp/linux.git/arch/p=
owerpc/include -Iarch/powerpc/include/generated  -I/root/tmp/linux.git/incl=
ude -Iinclude -I/root/tmp/linux.git/arch/powerpc/include/uapi -Iarch/powerp=

20 more lines

Re: Build errors on mainline kernel

From: Michael Ellerman <hidden>
Date: 2013-08-12 05:42:03

On Fri, 2013-08-09 at 11:24 -0700, Sukadev Bhattiprolu wrote:
I am tryng to compile clean mainline kernel with a few different config files
and running into errors with some configs.

I am building on RHEL6.3 with following binaries:

	gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
	GNU ld version 2.20.51.0.2-5.34.el6 20100205
	binutils-2.20.51.0.2-5.34.el6.ppc64
	binutils-devel-2.20.51.0.2-5.34.el6.ppc64

I am getting the error with several files and configs, but other configs 
(eg: ppc64_defconfig, pmac32_defconfig) build fine.

For instance, with latest mainline kernel (commit 6c2580c) and ppc64_defconfig, I get:
Here you say ppc64_defconfig ..
	make O=linux-obj mrproper
	make O=linux-obj ppc64e_defconfig
But here you say ppc64e_defconfig ?
	make O=linux-obj arch/powerpc/platforms/85xx/smp.o
	  ...

	CC      arch/powerpc/platforms/85xx/smp.o
	{standard input}: Assembler messages:
	{standard input}:240: Error: junk at end of line: `1'
	make[2]: *** [arch/powerpc/platforms/85xx/smp.o] Error 1
	make[1]: *** [arch/powerpc/platforms/85xx/smp.o] Error 2
So I'm not clear which config you're building.

cheers

Re: Build errors on mainline kernel

From: Sukadev Bhattiprolu <hidden>
Date: 2013-08-12 06:02:59

Michael Ellerman [michael@ellerman.id.au] wrote:
| On Fri, 2013-08-09 at 11:24 -0700, Sukadev Bhattiprolu wrote:
| > I am tryng to compile clean mainline kernel with a few different config files
| > and running into errors with some configs.
| > 
| > I am building on RHEL6.3 with following binaries:
| > 
| > 	gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
| > 	GNU ld version 2.20.51.0.2-5.34.el6 20100205
| > 	binutils-2.20.51.0.2-5.34.el6.ppc64
| > 	binutils-devel-2.20.51.0.2-5.34.el6.ppc64
| > 
| > I am getting the error with several files and configs, but other configs 
| > (eg: ppc64_defconfig, pmac32_defconfig) build fine.
| > 
| > For instance, with latest mainline kernel (commit 6c2580c) and ppc64_defconfig, I get:
| 
| Here you say ppc64_defconfig ..

That was a stupid typo. ppc64_defconfig works.

| 
| > 	make O=linux-obj mrproper
| > 	make O=linux-obj ppc64e_defconfig
| 
| But here you say ppc64e_defconfig ?

ppc64e_defconfig fails (checked again now).

Re: Build errors on mainline kernel

From: Michael Ellerman <hidden>
Date: 2013-08-13 02:23:50

On Sun, Aug 11, 2013 at 11:02:28PM -0700, Sukadev Bhattiprolu wrote:
Michael Ellerman [michael@ellerman.id.au] wrote:
| On Fri, 2013-08-09 at 11:24 -0700, Sukadev Bhattiprolu wrote:
| > I am tryng to compile clean mainline kernel with a few different config files
| > and running into errors with some configs.
| > 
| > I am building on RHEL6.3 with following binaries:
| > 
| > 	gcc (GCC) 4.4.6 20120305 (Red Hat 4.4.6-4)
| > 	GNU ld version 2.20.51.0.2-5.34.el6 20100205
| > 	binutils-2.20.51.0.2-5.34.el6.ppc64
| > 	binutils-devel-2.20.51.0.2-5.34.el6.ppc64
| > 
| > I am getting the error with several files and configs, but other configs 
| > (eg: ppc64_defconfig, pmac32_defconfig) build fine.
| > 
| > For instance, with latest mainline kernel (commit 6c2580c) and ppc64_defconfig, I get:
| 
| Here you say ppc64_defconfig ..

That was a stupid typo. ppc64_defconfig works.

| 
| > 	make O=linux-obj mrproper
| > 	make O=linux-obj ppc64e_defconfig
| 
| But here you say ppc64e_defconfig ?

ppc64e_defconfig fails (checked again now).
OK. I don't have a RHEL 6 system around. But I can build
ppc64e_defconfig on debian with gcc 4.4.7-2.

So not sure what's going on.
 
cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help