mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Cannot compile linux-2.4.27-rc1 ... ipt_REJECT.c
@ 2004-06-21 11:44 Martin MOKREJŠ
  2004-06-21 13:02 ` Mikael Pettersson
  0 siblings, 1 reply; 5+ messages in thread
From: Martin MOKREJŠ @ 2004-06-21 11:44 UTC (permalink / raw)
  To: Linux Kernel Mailing

Hi,
  has someone seen the following error? I can provide .config if required.
I think I've seen this in 2.4.27-pre6, not in -pre3.
Please Cc: me in replies. Thanks.
Martin

gcc -D__KERNEL__ -I/usr/src/linux-2.4.27-rc1/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.27-rc1/include/linux/modversions.h  -nostdinc -iwithprefix include -DKBUILD_BASENAME=ipt_REJECT  -c -o ipt_REJECT.o ipt_REJECT.c
In file included from ipt_REJECT.c:8:
/usr/src/linux-2.4.27-rc1/include/linux/skbuff.h: In function `kmap_skb_frag':
/usr/src/linux-2.4.27-rc1/include/linux/skbuff.h:1121: warning: use of compound expressions as lvalues is deprecated
/usr/src/linux-2.4.27-rc1/include/linux/skbuff.h: In function `kunmap_skb_frag':
/usr/src/linux-2.4.27-rc1/include/linux/skbuff.h:1130: warning: use of compound expressions as lvalues is deprecated
In file included from /usr/src/linux-2.4.27-rc1/include/linux/icmpv6.h:144,
                 from /usr/src/linux-2.4.27-rc1/include/net/sock.h:44,
                 from /usr/src/linux-2.4.27-rc1/include/net/icmp.h:24,
                 from ipt_REJECT.c:12:
/usr/src/linux-2.4.27-rc1/include/linux/netdevice.h: In function `__netif_rx_schedule':
/usr/src/linux-2.4.27-rc1/include/linux/netdevice.h:775: warning: use of compound expressions as lvalues is deprecated
/usr/src/linux-2.4.27-rc1/include/linux/netdevice.h: In function `netif_rx_reschedule':
/usr/src/linux-2.4.27-rc1/include/linux/netdevice.h:800: warning: use of compound expressions as lvalues is deprecated
/usr/src/linux-2.4.27-rc1/include/linux/netdevice.h: In function `netif_tx_disable':
/usr/src/linux-2.4.27-rc1/include/linux/netdevice.h:851: warning: use of compound expressions as lvalues is deprecated
/usr/src/linux-2.4.27-rc1/include/linux/netdevice.h:853: warning: use of compound expressions as lvalues is deprecated
In file included from /usr/src/linux-2.4.27-rc1/include/net/icmp.h:24,
                 from ipt_REJECT.c:12:
/usr/src/linux-2.4.27-rc1/include/net/sock.h: In function `sock_orphan':
/usr/src/linux-2.4.27-rc1/include/net/sock.h:1088: warning: use of compound expressions as lvalues is deprecated
/usr/src/linux-2.4.27-rc1/include/net/sock.h:1092: warning: use of compound expressions as lvalues is deprecated
/usr/src/linux-2.4.27-rc1/include/net/sock.h: In function `sock_graft':
/usr/src/linux-2.4.27-rc1/include/net/sock.h:1097: warning: use of compound expressions as lvalues is deprecated
/usr/src/linux-2.4.27-rc1/include/net/sock.h:1101: warning: use of compound expressions as lvalues is deprecated
In file included from /usr/src/linux-2.4.27-rc1/include/net/route.h:29,
                 from /usr/src/linux-2.4.27-rc1/include/net/ip.h:32,
                 from ipt_REJECT.c:13:
/usr/src/linux-2.4.27-rc1/include/net/inetpeer.h: In function `inet_putpeer':
/usr/src/linux-2.4.27-rc1/include/net/inetpeer.h:43: warning: use of compound expressions as lvalues is deprecated
/usr/src/linux-2.4.27-rc1/include/net/inetpeer.h:51: warning: use of compound expressions as lvalues is deprecated
/usr/src/linux-2.4.27-rc1/include/net/inetpeer.h: In function `inet_getid':
/usr/src/linux-2.4.27-rc1/include/net/inetpeer.h:60: warning: use of compound expressions as lvalues is deprecated
/usr/src/linux-2.4.27-rc1/include/net/inetpeer.h:62: warning: use of compound expressions as lvalues is deprecated
ipt_REJECT.c: In function `send_unreach':
/usr/src/linux-2.4.27-rc1/include/net/ip.h:140: sorry, unimplemented: inlining failed in call to 'ip_finish_output_Rfeff06db': function body not available
ipt_REJECT.c:138: sorry, unimplemented: called from here
make[2]: *** [ipt_REJECT.o] Error 1


$ gcc --version
gcc (GCC) 3.4.0 20040601 (Gentoo Linux 3.4.0-r6, ssp-3.4-2, pie-8.7.6.3)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$

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

* Re: Cannot compile linux-2.4.27-rc1 ... ipt_REJECT.c
  2004-06-21 11:44 Cannot compile linux-2.4.27-rc1 ... ipt_REJECT.c Martin MOKREJŠ
@ 2004-06-21 13:02 ` Mikael Pettersson
  2004-06-21 16:50   ` Martin MOKREJŠ
  0 siblings, 1 reply; 5+ messages in thread
From: Mikael Pettersson @ 2004-06-21 13:02 UTC (permalink / raw)
  To: Martin MOKREJŠ; +Cc: Linux Kernel Mailing

Martin MOKREJ© writes:
 > Hi,
 >   has someone seen the following error? I can provide .config if required.
 > I think I've seen this in 2.4.27-pre6, not in -pre3.
 > Please Cc: me in replies. Thanks.
 > Martin
 > 
 > gcc -D__KERNEL__ -I/usr/src/linux-2.4.27-rc1/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.27-rc1/include/linux/modversions.h  -nostdinc -iwithprefix include -DKBUILD_BASENAME=ipt_REJECT  -c -o ipt_REJECT.o ipt_REJECT.c
 > In file included from ipt_REJECT.c:8:
 > /usr/src/linux-2.4.27-rc1/include/linux/skbuff.h: In function `kmap_skb_frag':
 > /usr/src/linux-2.4.27-rc1/include/linux/skbuff.h:1121: warning: use of compound expressions as lvalues is deprecated
...
 > $ gcc --version
 > gcc (GCC) 3.4.0 20040601 (Gentoo Linux 3.4.0-r6, ssp-3.4-2, pie-8.7.6.3)

For this error you need to apply
<http://www.csd.uu.se/~mikpe/linux/patches/2.4/patch-gcc340-fixes-2.4.27-rc1>.

If you're using ACPI you should also apply
<http://www.csd.uu.se/~mikpe/linux/patches/2.4/patch-mpparse-fix-2.4.27-rc1>.

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

* Re: Cannot compile linux-2.4.27-rc1 ... ipt_REJECT.c
  2004-06-21 13:02 ` Mikael Pettersson
@ 2004-06-21 16:50   ` Martin MOKREJŠ
  2004-06-21 21:22     ` Mikael Pettersson
  0 siblings, 1 reply; 5+ messages in thread
From: Martin MOKREJŠ @ 2004-06-21 16:50 UTC (permalink / raw)
  To: Mikael Pettersson; +Cc: Linux Kernel Mailing

On Mon, 21 Jun 2004, Mikael Pettersson wrote:

> Martin MOKREJ? writes:
>  > Hi,
>  >   has someone seen the following error? I can provide .config if required.
>  > I think I've seen this in 2.4.27-pre6, not in -pre3.
>  > Please Cc: me in replies. Thanks.
>  > Martin
>  >
>  > gcc -D__KERNEL__ -I/usr/src/linux-2.4.27-rc1/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DMODULE -DMODVERSIONS -include /usr/src/linux-2.4.27-rc1/include/linux/modversions.h  -nostdinc -iwithprefix include -DKBUILD_BASENAME=ipt_REJECT  -c -o ipt_REJECT.o ipt_REJECT.c
>  > In file included from ipt_REJECT.c:8:
>  > /usr/src/linux-2.4.27-rc1/include/linux/skbuff.h: In function `kmap_skb_frag':
>  > /usr/src/linux-2.4.27-rc1/include/linux/skbuff.h:1121: warning: use of compound expressions as lvalues is deprecated
> ...
>  > $ gcc --version
>  > gcc (GCC) 3.4.0 20040601 (Gentoo Linux 3.4.0-r6, ssp-3.4-2, pie-8.7.6.3)
>
> For this error you need to apply
> <http://www.csd.uu.se/~mikpe/linux/patches/2.4/patch-gcc340-fixes-2.4.27-rc1>.
>
> If you're using ACPI you should also apply
> <http://www.csd.uu.se/~mikpe/linux/patches/2.4/patch-mpparse-fix-2.4.27-rc1>.


Great, only 2 problems left:

gcc -D__KERNEL__ -I/usr/src/linux-2.4.27-rc1/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -fno-unit-at-a-time   -nostdinc -iwithprefix include -DKBUILD_BASENAME=vt  -c -o vt.o vt.c
vt.c: In function `do_kdsk_ioctl':
vt.c:166: warning: comparison is always false due to limited range of data type
vt.c: In function `do_kdgkb_ioctl':
vt.c:283: warning: comparison is always false due to limited range of data type

<cut>

gcc -D__KERNEL__ -I/usr/src/linux-2.4.27-rc1/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -fno-unit-at-a-time   -nostdinc -iwithprefix include -DKBUILD_BASENAME=highmem  -c -o highmem.o highmem.c
highmem.c:133: error: conflicting types for 'kmap_high'
/usr/src/linux-2.4.27-rc1/include/asm/highmem.h:59: error: previous declaration of 'kmap_high' was here
highmem.c:133: error: conflicting types for 'kmap_high'
/usr/src/linux-2.4.27-rc1/include/asm/highmem.h:59: error: previous declaration of 'kmap_high' was here
highmem.c:158: error: conflicting types for 'kunmap_high'
/usr/src/linux-2.4.27-rc1/include/asm/highmem.h:60: error: previous declaration of 'kunmap_high' was here
highmem.c:158: error: conflicting types for 'kunmap_high'
/usr/src/linux-2.4.27-rc1/include/asm/highmem.h:60: error: previous declaration of 'kunmap_high' was here
make[2]: *** [highmem.o] Error 1
make[2]: Leaving directory `/usr/src/linux-2.4.27-rc1/mm'

-- 
Martin Mokrejs
GPG key is at http://www.natur.cuni.cz/~mmokrejs

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

* Re: Cannot compile linux-2.4.27-rc1 ... ipt_REJECT.c
  2004-06-21 16:50   ` Martin MOKREJŠ
@ 2004-06-21 21:22     ` Mikael Pettersson
  2004-06-22  9:10       ` Martin MOKREJŠ
  0 siblings, 1 reply; 5+ messages in thread
From: Mikael Pettersson @ 2004-06-21 21:22 UTC (permalink / raw)
  To: Martin MOKREJŠ; +Cc: Linux Kernel Mailing

Martin MOKREJ© writes:
 > gcc -D__KERNEL__ -I/usr/src/linux-2.4.27-rc1/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -fno-unit-at-a-time   -nostdinc -iwithprefix include -DKBUILD_BASENAME=vt  -c -o vt.o vt.c
 > vt.c: In function `do_kdsk_ioctl':
 > vt.c:166: warning: comparison is always false due to limited range of data type
 > vt.c: In function `do_kdgkb_ioctl':
 > vt.c:283: warning: comparison is always false due to limited range of data type

This happens with many gcc-3.x versions, not just gcc-3.4.
In any case, it doesn't prevent a successful kernel build.

 > gcc -D__KERNEL__ -I/usr/src/linux-2.4.27-rc1/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -fno-unit-at-a-time   -nostdinc -iwithprefix include -DKBUILD_BASENAME=highmem  -c -o highmem.o highmem.c
 > highmem.c:133: error: conflicting types for 'kmap_high'
 > /usr/src/linux-2.4.27-rc1/include/asm/highmem.h:59: error: previous declaration of 'kmap_high' was here
 > highmem.c:133: error: conflicting types for 'kmap_high'
 > /usr/src/linux-2.4.27-rc1/include/asm/highmem.h:59: error: previous declaration of 'kmap_high' was here
 > highmem.c:158: error: conflicting types for 'kunmap_high'
 > /usr/src/linux-2.4.27-rc1/include/asm/highmem.h:60: error: previous declaration of 'kunmap_high' was here
 > highmem.c:158: error: conflicting types for 'kunmap_high'
 > /usr/src/linux-2.4.27-rc1/include/asm/highmem.h:60: error: previous declaration of 'kunmap_high' was here

This is HIGHMEM which I never tested before. The problem is yet
another FASTCALL/fastcall discrepancy where a function's definition
doesn't have the exact same attributes as its prototype.

My updated gcc340 patch fixes this problem. Get
<http://www.csd.uu.se/~mikpe/linux/patches/2.4/patch-gcc340-fixes-v2-2.4.27-rc1>
or simply apply the patch below on top of the previous version.

/Mikael

--- linux-2.4.27-rc1/mm/highmem.c.~1~	2003-06-14 13:30:29.000000000 +0200
+++ linux-2.4.27-rc1/mm/highmem.c	2004-06-21 22:42:58.000000000 +0200
@@ -129,7 +129,7 @@
 	return vaddr;
 }
 
-void *kmap_high(struct page *page, int nonblocking)
+void fastcall *kmap_high(struct page *page, int nonblocking)
 {
 	unsigned long vaddr;
 
@@ -154,7 +154,7 @@
 	return (void*) vaddr;
 }
 
-void kunmap_high(struct page *page)
+void fastcall kunmap_high(struct page *page)
 {
 	unsigned long vaddr;
 	unsigned long nr;

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

* Re: Cannot compile linux-2.4.27-rc1 ... ipt_REJECT.c
  2004-06-21 21:22     ` Mikael Pettersson
@ 2004-06-22  9:10       ` Martin MOKREJŠ
  0 siblings, 0 replies; 5+ messages in thread
From: Martin MOKREJŠ @ 2004-06-22  9:10 UTC (permalink / raw)
  To: Mikael Pettersson; +Cc: Linux Kernel Mailing

On Mon, 21 Jun 2004, Mikael Pettersson wrote:

Thanks, this patch helped.

> Martin MOKREJ? writes:
>  > gcc -D__KERNEL__ -I/usr/src/linux-2.4.27-rc1/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -fno-unit-at-a-time   -nostdinc -iwithprefix include -DKBUILD_BASENAME=vt  -c -o vt.o vt.c
>  > vt.c: In function `do_kdsk_ioctl':
>  > vt.c:166: warning: comparison is always false due to limited range of data type
>  > vt.c: In function `do_kdgkb_ioctl':
>  > vt.c:283: warning: comparison is always false due to limited range of data type
>
> This happens with many gcc-3.x versions, not just gcc-3.4.
> In any case, it doesn't prevent a successful kernel build.
>
>  > gcc -D__KERNEL__ -I/usr/src/linux-2.4.27-rc1/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -fno-unit-at-a-time   -nostdinc -iwithprefix include -DKBUILD_BASENAME=highmem  -c -o highmem.o highmem.c
>  > highmem.c:133: error: conflicting types for 'kmap_high'
>  > /usr/src/linux-2.4.27-rc1/include/asm/highmem.h:59: error: previous declaration of 'kmap_high' was here
>  > highmem.c:133: error: conflicting types for 'kmap_high'
>  > /usr/src/linux-2.4.27-rc1/include/asm/highmem.h:59: error: previous declaration of 'kmap_high' was here
>  > highmem.c:158: error: conflicting types for 'kunmap_high'
>  > /usr/src/linux-2.4.27-rc1/include/asm/highmem.h:60: error: previous declaration of 'kunmap_high' was here
>  > highmem.c:158: error: conflicting types for 'kunmap_high'
>  > /usr/src/linux-2.4.27-rc1/include/asm/highmem.h:60: error: previous declaration of 'kunmap_high' was here
>
> This is HIGHMEM which I never tested before. The problem is yet
> another FASTCALL/fastcall discrepancy where a function's definition
> doesn't have the exact same attributes as its prototype.
>
> My updated gcc340 patch fixes this problem. Get
> <http://www.csd.uu.se/~mikpe/linux/patches/2.4/patch-gcc340-fixes-v2-2.4.27-rc1>
> or simply apply the patch below on top of the previous version.
>
> /Mikael
>
> --- linux-2.4.27-rc1/mm/highmem.c.~1~	2003-06-14 13:30:29.000000000 +0200
> +++ linux-2.4.27-rc1/mm/highmem.c	2004-06-21 22:42:58.000000000 +0200
> @@ -129,7 +129,7 @@
>  	return vaddr;
>  }
>
> -void *kmap_high(struct page *page, int nonblocking)
> +void fastcall *kmap_high(struct page *page, int nonblocking)
>  {
>  	unsigned long vaddr;
>
> @@ -154,7 +154,7 @@
>  	return (void*) vaddr;
>  }
>
> -void kunmap_high(struct page *page)
> +void fastcall kunmap_high(struct page *page)
>  {
>  	unsigned long vaddr;
>  	unsigned long nr;
>

-- 
Martin Mokrejs
GPG key is at http://www.natur.cuni.cz/~mmokrejs

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

end of thread, other threads:[~2004-06-22  9:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-21 11:44 Cannot compile linux-2.4.27-rc1 ... ipt_REJECT.c Martin MOKREJŠ
2004-06-21 13:02 ` Mikael Pettersson
2004-06-21 16:50   ` Martin MOKREJŠ
2004-06-21 21:22     ` Mikael Pettersson
2004-06-22  9:10       ` Martin MOKREJŠ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®