2.6.9 BK build broken
BitKeeper fails to build (error message with GCC 3.4, ICE with GCC 3.3):
Parent repository is bk://linux.bkbits.net/linux-2.5
MD5KEY: 417454bfpfdm0m7rr7xnJadPA4ioZA
KEY of latest changeset:
[email protected]|ChangeSet|20041018234151|19286
$ LANG=C make CC=/opt/gcc-3.4/bin/gcc
...
LDS arch/i386/kernel/vsyscall.lds
AS arch/i386/kernel/vsyscall-int80.o
SYSCALL arch/i386/kernel/vsyscall-int80.so
AS arch/i386/kernel/vsyscall-sysenter.o
SYSCALL arch/i386/kernel/vsyscall-sysenter.so
AS arch/i386/kernel/vsyscall.o
In file included from include/linux/init.h:5,
from arch/i386/kernel/vsyscall.S:1:
include/linux/compiler.h:20: syntax error in macro parameter list
make[1]: *** [arch/i386/kernel/vsyscall.o] Error 1
make: *** [arch/i386/kernel] Error 2$ nl -ba include/linux/compiler.h | grep -5 20
15 # define __safe
16 # define __force
17 # define __iomem
18 # define __chk_user_ptr(x) (void)0
19 # define __chk_io_ptr(x) (void)0
20 #define __builtin_warning(x, ...) (1)
21 #endif
22
23 #ifdef __KERNEL__
24
25 #ifndef __ASSEMBLY__$ /opt/gcc-3.4/bin/gcc --version gcc (GCC) 3.4.2 Copyright (C) 2004 Free Software Foundation, Inc. ...
Signature · 1 line
Matthias Andree
Quoted 8 lines · Matthias Andree
BitKeeper fails to build (error message with GCC 3.4, ICE with GCC 3.3):
Parent repository is bk://linux.bkbits.net/linux-2.5
MD5KEY: 417454bfpfdm0m7rr7xnJadPA4ioZAKEY of latest changeset:
[email protected]|ChangeSet|20041018234151|19286
Quoted 13 lines
$ LANG=C make CC=/opt/gcc-3.4/bin/gcc
...
LDS arch/i386/kernel/vsyscall.lds
AS arch/i386/kernel/vsyscall-int80.o
SYSCALL arch/i386/kernel/vsyscall-int80.so
AS arch/i386/kernel/vsyscall-sysenter.o
SYSCALL arch/i386/kernel/vsyscall-sysenter.so
AS arch/i386/kernel/vsyscall.o
In file included from include/linux/init.h:5,
from arch/i386/kernel/vsyscall.S:1:
include/linux/compiler.h:20: syntax error in macro parameter list
make[1]: *** [arch/i386/kernel/vsyscall.o] Error 1
make: *** [arch/i386/kernel] Error 2I get an ICE here in -BK-latest, which the attached patch fixes (backs out Linus's change).
I _also_ get a similar failure, in the exact same place, in 2.6.9 [release version] which does _not_ have Linus's change in it. See http://lkml.org/lkml/2004/10/18/230 for the report.
Maybe the moral of the story is thatlinux/init.h + linux/compiler.h + asm == boom ?
Jeff
===== include/linux/compiler.h 1.31 vs edited =====
include/linux/compiler.h +0 -1
@@ -17,7 +17,6 @@# define __iomem# define __chk_user_ptr (x) (void)0# define __chk_io_ptr (x) (void)0 -#define __builtin_warning (x, ...) (1)#endif #ifdef __KERNEL__
Quoted 17 lines · Jeff Garzik
Quoted 5 lines · Matthias Andree
$ LANG=C make CC=/opt/gcc-3.4/bin/gcc ... LDS arch/i386/kernel/vsyscall.lds AS arch/i386/kernel/vsyscall-int80.o SYSCALL arch/i386/kernel/vsyscall-int80.soQuoted 8 lines
AS arch/i386/kernel/vsyscall-sysenter.o SYSCALL arch/i386/kernel/vsyscall-sysenter.so AS arch/i386/kernel/vsyscall.o In file included from include/linux/init.h:5, from arch/i386/kernel/vsyscall.S:1: include/linux/compiler.h:20: syntax error in macro parameter list make[1]: *** [arch/i386/kernel/vsyscall.o] Error 1 make: *** [arch/i386/kernel] Error 2
Quoted 1 line
I get an ICE here in -BK-latest, which the attached patch fixes (backs out Linus's change).
Another data point, I have no problems with 2.6-BK-latest on x86-64, with gcc 3.3.3 (FC2)...
Jeff
Quoted 3 lines · Jeff Garzik
Quoted 3 lines
I get an ICE here in -BK-latest, which the attached patch fixes (backs out Linus's change).
Heh. Clearly there's a gcc bug.. What compiler version?
I've got gcc-3.2 and gcc-3.3, and neither seems to have any trouble, but hey, I'm cursed by having fairly up-to-date systems.
That said, I know what's up, but it would be good to know what compilers have this problem..
Quoted 2 lines
Another data point, I have no problems with 2.6-BK-latest on x86-64, with gcc 3.3.3 (FC2)...
Too much C syntax, too little CPP braindamage.
I bet the thing is fixed by changing the
#define __builtin_warning(x, ...) (1)
into
#define __builtin_warning(x, y...) (1)
(ie add the name for the varargs macro argument). Never mind that we don't use it, and newer gcc's are happy - older gcc's clearly aren't ;)
Linus
Quoted 7 lines · Linus Torvalds
Quoted 2 lines
Quoted 2 lines
I get an ICE here in -BK-latest, which the attached patch fixes (backs out Linus's change).
Heh. Clearly there's a gcc bug.. What compiler version?
I've got gcc-3.2 and gcc-3.3, and neither seems to have any trouble, but hey, I'm cursed by having fairly up-to-date systems.
Linus,
I'd tried SuSE's gcc-3.3.3-41 (as shipped with SuSE Linux 9.1 Pro), pristine gcc 3.3.4, pristine gcc 3.4.2, each of the three failed - and I therefore claim "having really up-to-date compilers" for my system.
Signature · 1 line
Matthias Andree
Quoted 4 lines · Matthias Andree
I'd tried SuSE's gcc-3.3.3-41 (as shipped with SuSE Linux 9.1 Pro), pristine gcc 3.3.4, pristine gcc 3.4.2, each of the three failed - and I therefore claim "having really up-to-date compilers" for my system.
Yes. My problem was that ppc64 doesn't use "-traditional", and the x86 machine I thought I had tried it on had plain 2.6.9, not my latest tree ;)
Anyway. It should all be fixed in current BK.
Linus
SOLVED: 2.6.9 BK build broken
In reply to Linus TorvaldsQuoted 7 lines · Linus Torvalds
I bet the thing is fixed by changing the
#define __builtin_warning(x, ...) (1)into
#define __builtin_warning(x, y...) (1)
Indeed it is. I just did bk pull and found that [email protected]|ChangeSet|20041019071619|06021 compiles fine on gcc-3.3.4, 3.4.2 and SuSE's gcc-3.3.3-41.
Thank you.
Signature · 1 line
Matthias Andree
Quoted 2 lines · Matthias Andree
include/linux/compiler.h:20: syntax error in macro parameter list
I used this:
include/linux/compiler.h:20: syntax error in macro parameter list
It fails because we use -traditional when compiling .S files.
---
25-akpm/include/linux/compiler.h | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-)
include/linux/compiler.h renamed from include/linux/compiler.h~builtin_warning-is-not-traditional +3 -1
@@ -17,7 +17,9 @@ extern void __chk_io_ptr(void __iomem *)# define __iomem# define __chk_user_ptr (x) (void)0# define __chk_io_ptr (x) (void)0 -#define __builtin_warning (x, ...) (1) +#ifndef __ASSEMBLY__/* gcc -traditional fails with varargs-style macros */ +# define __builtin_warning (x, ...) (1) +#endif #endif #ifdef __KERNEL__
_
Quoted 10 lines · Andrew Morton
Quoted 2 lines · Matthias Andree
include/linux/compiler.h:20: syntax error in macro parameter listI used this:
diff -puN
include/linux/compiler.h~builtin_warning-is-not-traditionalinclude/linux/compiler.h
include/linux/compiler.h extern void __chk_io_ptr(void __iomem *) · line 23
Quoted 8 lines
include/linux/compiler.h renamed from include/linux/compiler.h~builtin_warning-is-not-traditional +3
-1@@ -17,7 +17,9 @@ extern void __chk_io_ptr(void __iomem *)# define __iomem# define __chk_user_ptr (x) (void)0# define __chk_io_ptr (x) (void)0 -#define __builtin_warning (x, ...) (1) +#ifndef __ASSEMBLY__/* gcc -traditional fails with varargs-style macros */ +# define __builtin_warning (x, ...) (1) +#endif #endif
This fixes the problem for me with SuSE's gcc-3.3.3-41, with pristine gcc-3.3.4 and gcc-3.4.2.
Thank you!
Signature · 1 line
Matthias Andree