linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.6.9 BK build broken
@ 2004-10-19  2:17 Matthias Andree
  2004-10-19  2:32 ` Jeff Garzik
  2004-10-19  5:10 ` Andrew Morton
  0 siblings, 2 replies; 9+ messages in thread
From: Matthias Andree @ 2004-10-19  2:17 UTC (permalink / raw)
  To: Linux-Kernel mailing list

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:
torvalds@ppc970.osdl.org|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.
...

-- 
Matthias Andree

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

* Re: 2.6.9 BK build broken
  2004-10-19  2:17 2.6.9 BK build broken Matthias Andree
@ 2004-10-19  2:32 ` Jeff Garzik
  2004-10-19  3:32   ` Jeff Garzik
  2004-10-19  5:10 ` Andrew Morton
  1 sibling, 1 reply; 9+ messages in thread
From: Jeff Garzik @ 2004-10-19  2:32 UTC (permalink / raw)
  To: Matthias Andree; +Cc: Linux-Kernel mailing list, Linus Torvalds

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

Matthias Andree wrote:
> 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:
> torvalds@ppc970.osdl.org|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


I 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 that
linux/init.h + linux/compiler.h + asm == boom ?

	Jeff



[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 350 bytes --]

===== include/linux/compiler.h 1.31 vs edited =====
--- 1.31/include/linux/compiler.h	2004-10-18 18:50:37 -04:00
+++ edited/include/linux/compiler.h	2004-10-18 22:26:18 -04:00
@@ -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__

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

* Re: 2.6.9 BK build broken
  2004-10-19  2:32 ` Jeff Garzik
@ 2004-10-19  3:32   ` Jeff Garzik
  2004-10-19  5:14     ` Linus Torvalds
  0 siblings, 1 reply; 9+ messages in thread
From: Jeff Garzik @ 2004-10-19  3:32 UTC (permalink / raw)
  To: Matthias Andree; +Cc: Linux-Kernel mailing list, Linus Torvalds

Jeff Garzik wrote:
> Matthias Andree wrote:
>> $ 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
> 
> 
> 
> 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



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

* Re: 2.6.9 BK build broken
  2004-10-19  2:17 2.6.9 BK build broken Matthias Andree
  2004-10-19  2:32 ` Jeff Garzik
@ 2004-10-19  5:10 ` Andrew Morton
  2004-10-19  9:03   ` Matthias Andree
  1 sibling, 1 reply; 9+ messages in thread
From: Andrew Morton @ 2004-10-19  5:10 UTC (permalink / raw)
  To: Matthias Andree; +Cc: linux-kernel

Matthias Andree <matthias.andree@gmx.de> wrote:
>
> 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.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/include/linux/compiler.h |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -puN include/linux/compiler.h~builtin_warning-is-not-traditional include/linux/compiler.h
--- 25/include/linux/compiler.h~builtin_warning-is-not-traditional	2004-10-18 22:08:25.224796488 -0700
+++ 25-akpm/include/linux/compiler.h	2004-10-18 22:09:05.505672864 -0700
@@ -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__
_


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

* Re: 2.6.9 BK build broken
  2004-10-19  3:32   ` Jeff Garzik
@ 2004-10-19  5:14     ` Linus Torvalds
  2004-10-19  9:00       ` Matthias Andree
  2004-10-19  9:23       ` SOLVED: " Matthias Andree
  0 siblings, 2 replies; 9+ messages in thread
From: Linus Torvalds @ 2004-10-19  5:14 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Matthias Andree, Linux-Kernel mailing list



On Mon, 18 Oct 2004, Jeff Garzik wrote:
> > 
> > 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..

> 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

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

* Re: 2.6.9 BK build broken
  2004-10-19  5:14     ` Linus Torvalds
@ 2004-10-19  9:00       ` Matthias Andree
  2004-10-19 16:05         ` Linus Torvalds
  2004-10-19  9:23       ` SOLVED: " Matthias Andree
  1 sibling, 1 reply; 9+ messages in thread
From: Matthias Andree @ 2004-10-19  9:00 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Garzik, Matthias Andree, Linux-Kernel mailing list

On Mon, 18 Oct 2004, Linus Torvalds wrote:

> > > 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.

-- 
Matthias Andree

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

* Re: 2.6.9 BK build broken
  2004-10-19  5:10 ` Andrew Morton
@ 2004-10-19  9:03   ` Matthias Andree
  0 siblings, 0 replies; 9+ messages in thread
From: Matthias Andree @ 2004-10-19  9:03 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Matthias Andree, linux-kernel

On Mon, 18 Oct 2004, Andrew Morton wrote:

> Matthias Andree <matthias.andree@gmx.de> wrote:
> >
> > include/linux/compiler.h:20: syntax error in macro parameter list
> 
> I used this:
> 
> diff -puN include/linux/compiler.h~builtin_warning-is-not-traditional include/linux/compiler.h
> --- 25/include/linux/compiler.h~builtin_warning-is-not-traditional	2004-10-18 22:08:25.224796488 -0700
> +++ 25-akpm/include/linux/compiler.h	2004-10-18 22:09:05.505672864 -0700
> @@ -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!

-- 
Matthias Andree

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

* SOLVED: 2.6.9 BK build broken
  2004-10-19  5:14     ` Linus Torvalds
  2004-10-19  9:00       ` Matthias Andree
@ 2004-10-19  9:23       ` Matthias Andree
  1 sibling, 0 replies; 9+ messages in thread
From: Matthias Andree @ 2004-10-19  9:23 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Jeff Garzik, Matthias Andree, Linux-Kernel mailing list

On Mon, 18 Oct 2004, Linus Torvalds wrote:

> 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
torvalds@ppc970.osdl.org|ChangeSet|20041019071619|06021
compiles fine on gcc-3.3.4, 3.4.2 and SuSE's gcc-3.3.3-41.

Thank you.

-- 
Matthias Andree

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

* Re: 2.6.9 BK build broken
  2004-10-19  9:00       ` Matthias Andree
@ 2004-10-19 16:05         ` Linus Torvalds
  0 siblings, 0 replies; 9+ messages in thread
From: Linus Torvalds @ 2004-10-19 16:05 UTC (permalink / raw)
  To: Matthias Andree; +Cc: Jeff Garzik, Linux-Kernel mailing list



On Tue, 19 Oct 2004, Matthias Andree wrote:
> 
> 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

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

end of thread, other threads:[~2004-10-19 16:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-19  2:17 2.6.9 BK build broken Matthias Andree
2004-10-19  2:32 ` Jeff Garzik
2004-10-19  3:32   ` Jeff Garzik
2004-10-19  5:14     ` Linus Torvalds
2004-10-19  9:00       ` Matthias Andree
2004-10-19 16:05         ` Linus Torvalds
2004-10-19  9:23       ` SOLVED: " Matthias Andree
2004-10-19  5:10 ` Andrew Morton
2004-10-19  9:03   ` Matthias Andree

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).