2000-11-12 11:49:30

by f5ibh

[permalink] [raw]
Subject: 2.4.0-test11-pre3 doesn't compile


Hi!

here is the message :

gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2
-march=i586 -DMODULE -c -o sysctl_net_ax25.o sysctl_net_ax25.c
sysctl_net_ax25.c: In function `ax25_register_sysctl':
sysctl_net_ax25.c:117: warning: left-hand operand of comma expression has no
effect
sysctl_net_ax25.c:117: parse error before `;'
make[3]: *** [sysctl_net_ax25.o] Error 1
make[3]: Leaving directory `/usr/src/kernel-sources-2.4.0-test11-pre3/net/ax25'
make[2]: *** [_modsubdir_ax25] Error 2
make[2]: Leaving directory `/usr/src/kernel-sources-2.4.0-test11-pre3/net'
make[1]: *** [_mod_net] Error 2
make[1]: Leaving directory `/usr/src/kernel-sources-2.4.0-test11-pre3'
make: *** [stamp-build] Error 2
----

Regards

jean-luc


2000-11-12 12:14:26

by Arjan Filius

[permalink] [raw]
Subject: Re: 2.4.0-test11-pre3 doesn't compile (ax25 and md)

Hello,

I noticed also md.c doesn't compile (gcc version 2.95.2 )
Here is the (stripped) output from a make -i modules:

make -C md modules
make[2]: Entering directory `/usr/src/linux-2.4.0-test11-pre3/drivers/md'
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=k6 -DMODULE -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -DEXPORT_SYMTAB -c md.c
In file included from md.c:33:
/usr/src/linux/include/linux/sysctl.h:35: parse error before `size_t'
/usr/src/linux/include/linux/sysctl.h:35: warning: no semicolon at end of struct or union
/usr/src/linux/include/linux/sysctl.h:37: parse error before `newlen'
/usr/src/linux/include/linux/sysctl.h:37: warning: type defaults to `int' in declaration of `newlen'
/usr/src/linux/include/linux/sysctl.h:37: warning: data definition has no type or storage class
/usr/src/linux/include/linux/sysctl.h:39: parse error before `}'
/usr/src/linux/include/linux/sysctl.h:598: syntax error before `long'
/usr/src/linux/include/linux/sysctl.h:604: parse error before `size_t'
/usr/src/linux/include/linux/sysctl.h:606: warning: function declaration isn't a prototype
/usr/src/linux/include/linux/sysctl.h:609: parse error before `size_t'
/usr/src/linux/include/linux/sysctl.h:609: warning: `struct file' declared inside parameter list
/usr/src/linux/include/linux/sysctl.h:609: warning: its scope is only this definition or declaration, which is probably not what you want.
/usr/src/linux/include/linux/sysctl.h:609: warning: function declaration isn't a prototype
/usr/src/linux/include/linux/sysctl.h:612: parse error before `size_t'
/usr/src/linux/include/linux/sysctl.h:612: warning: `struct file' declared inside parameter list
/usr/src/linux/include/linux/sysctl.h:612: warning: function declaration isn't a prototype
/usr/src/linux/include/linux/sysctl.h:614: parse error before `size_t'
/usr/src/linux/include/linux/sysctl.h:614: warning: `struct file' declared inside parameter list
/usr/src/linux/include/linux/sysctl.h:614: warning: function declaration isn't a prototype
/usr/src/linux/include/linux/sysctl.h:616: parse error before `size_t'
/usr/src/linux/include/linux/sysctl.h:616: warning: `struct file' declared inside parameter list
/usr/src/linux/include/linux/sysctl.h:616: warning: function declaration isn't a prototype
/usr/src/linux/include/linux/sysctl.h:618: parse error before `size_t'
/usr/src/linux/include/linux/sysctl.h:618: warning: `struct file' declared inside parameter list
/usr/src/linux/include/linux/sysctl.h:618: warning: function declaration isn't a prototype
/usr/src/linux/include/linux/sysctl.h:620: parse error before `size_t'
/usr/src/linux/include/linux/sysctl.h:620: warning: `struct file' declared inside parameter list
/usr/src/linux/include/linux/sysctl.h:620: warning: function declaration isn't a prototype
/usr/src/linux/include/linux/sysctl.h:622: parse error before `size_t'
/usr/src/linux/include/linux/sysctl.h:622: warning: `struct file' declared inside parameter list
/usr/src/linux/include/linux/sysctl.h:622: warning: function declaration isn't a prototype
/usr/src/linux/include/linux/sysctl.h:624: parse error before `size_t'
/usr/src/linux/include/linux/sysctl.h:624: warning: `struct file' declared inside parameter list
/usr/src/linux/include/linux/sysctl.h:624: warning: function declaration isn't a prototype
/usr/src/linux/include/linux/sysctl.h:627: parse error before `size_t'
/usr/src/linux/include/linux/sysctl.h:628: warning: function declaration isn't a prototype
/usr/src/linux/include/linux/sysctl.h:632: parse error before `size_t'
/usr/src/linux/include/linux/sysctl.h:633: warning: function declaration isn't a prototype
/usr/src/linux/include/linux/sysctl.h:684: parse error before `mode_t'
/usr/src/linux/include/linux/sysctl.h:684: warning: no semicolon at end of struct or union
/usr/src/linux/include/linux/sysctl.h:686: `proc_handler' redeclared as different kind of symbol
/usr/src/linux/include/linux/sysctl.h:609: previous declaration of `proc_handler'
/usr/src/linux/include/linux/sysctl.h:691: parse error before `}'
md.c:83: elements of array `raid_table' have incomplete type
md.c:84: warning: excess elements in struct initializer
md.c:84: warning: (near initialization for `raid_table[0]')
md.c:84: warning: excess elements in struct initializer
md.c:84: warning: (near initialization for `raid_table[0]')
md.c:85: warning: excess elements in struct initializer
md.c:85: warning: (near initialization for `raid_table[0]')
md.c:85: warning: excess elements in struct initializer
md.c:85: warning: (near initialization for `raid_table[0]')
md.c:85: warning: excess elements in struct initializer
md.c:85: warning: (near initialization for `raid_table[0]')
md.c:85: warning: excess elements in struct initializer
md.c:85: warning: (near initialization for `raid_table[0]')
md.c:85: warning: excess elements in struct initializer
md.c:85: warning: (near initialization for `raid_table[0]')
md.c:86: warning: excess elements in struct initializer
md.c:86: warning: (near initialization for `raid_table[1]')
md.c:86: warning: excess elements in struct initializer
md.c:86: warning: (near initialization for `raid_table[1]')
md.c:87: warning: excess elements in struct initializer
md.c:87: warning: (near initialization for `raid_table[1]')
md.c:87: warning: excess elements in struct initializer
md.c:87: warning: (near initialization for `raid_table[1]')
md.c:87: warning: excess elements in struct initializer
md.c:87: warning: (near initialization for `raid_table[1]')
md.c:87: warning: excess elements in struct initializer
md.c:87: warning: (near initialization for `raid_table[1]')
md.c:87: warning: excess elements in struct initializer
md.c:87: warning: (near initialization for `raid_table[1]')
md.c:88: warning: excess elements in struct initializer
md.c:88: warning: (near initialization for `raid_table[2]')
md.c:89: invalid use of undefined type `struct ctl_table'
md.c:91: elements of array `raid_dir_table' have incomplete type
md.c:92: warning: excess elements in struct initializer
md.c:92: warning: (near initialization for `raid_dir_table[0]')
md.c:92: warning: excess elements in struct initializer
md.c:92: warning: (near initialization for `raid_dir_table[0]')
md.c:92: warning: excess elements in struct initializer
md.c:92: warning: (near initialization for `raid_dir_table[0]')
md.c:92: warning: excess elements in struct initializer
md.c:92: warning: (near initialization for `raid_dir_table[0]')
md.c:92: warning: excess elements in struct initializer
md.c:92: warning: (near initialization for `raid_dir_table[0]')
md.c:92: warning: excess elements in struct initializer
md.c:92: warning: (near initialization for `raid_dir_table[0]')
md.c:93: warning: excess elements in struct initializer
md.c:93: warning: (near initialization for `raid_dir_table[1]')
md.c:94: invalid use of undefined type `struct ctl_table'
md.c:96: elements of array `raid_root_table' have incomplete type
md.c:97: warning: excess elements in struct initializer
md.c:97: warning: (near initialization for `raid_root_table[0]')
md.c:97: warning: excess elements in struct initializer
md.c:97: warning: (near initialization for `raid_root_table[0]')
md.c:97: warning: excess elements in struct initializer
md.c:97: warning: (near initialization for `raid_root_table[0]')
md.c:97: warning: excess elements in struct initializer
md.c:97: warning: (near initialization for `raid_root_table[0]')
md.c:97: warning: excess elements in struct initializer
md.c:97: warning: (near initialization for `raid_root_table[0]')
md.c:97: warning: excess elements in struct initializer
md.c:97: warning: (near initialization for `raid_root_table[0]')
md.c:98: warning: excess elements in struct initializer
md.c:98: warning: (near initialization for `raid_root_table[1]')
md.c:99: invalid use of undefined type `struct ctl_table'
make[2]: [md.o] Error 1 (ignored)
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=k6 -DMODULE -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -DEXPORT_SYMTAB -c xor.c
make[2]: Leaving directory `/usr/src/linux-2.4.0-test11-pre3/drivers/md'


make -C ax25 modules
make[2]: Entering directory `/usr/src/linux-2.4.0-test11-pre3/net/ax25'
gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=k6 -DMODULE -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -c -o sysctl_net_ax25.o sysctl_net_ax25.c
sysctl_net_ax25.c: In function `ax25_register_sysctl':
sysctl_net_ax25.c:117: warning: left-hand operand of comma expression has no effect
sysctl_net_ax25.c:117: parse error before `;'
make[2]: [sysctl_net_ax25.o] Error 1 (ignored)
rm -f ax25.o
ld -m elf_i386 -r -o ax25.o af_ax25.o ax25_addr.o ax25_dev.o ax25_iface.o ax25_in.o ax25_ip.o ax25_out.o ax25_route.o ax25_std_in.o ax25_std_subr.o ax25_std_timer.o ax25_subr.o ax25_timer.o ax25_uid.o ax25_ds_in.o ax25_ds_subr.o ax25_ds_timer.o sysctl_net_ax25.o
ld: cannot open sysctl_net_ax25.o: No such file or directory
make[2]: [ax25.o] Error 1 (ignored)
make[2]: Leaving directory `/usr/src/linux-2.4.0-test11-pre3/net/ax25'


Greatings,

Arjan Filius
mailto:[email protected]

2000-11-12 12:23:18

by Jeff Garzik

[permalink] [raw]
Subject: Re: 2.4.0-test11-pre3 doesn't compile (ax25 and md)

Arjan Filius wrote:
>
> Hello,
>
> I noticed also md.c doesn't compile (gcc version 2.95.2 )
> Here is the (stripped) output from a make -i modules:
>
> make -C md modules
> make[2]: Entering directory `/usr/src/linux-2.4.0-test11-pre3/drivers/md'
> gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=k6 -DMODULE -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -DEXPORT_SYMTAB -c md.c
> In file included from md.c:33:
> /usr/src/linux/include/linux/sysctl.h:35: parse error before `size_t'

Either md.c or sysctl.h needs to include <linux/types.h>.

--
Jeff Garzik |
Building 1024 | Would you like a Twinkie?
MandrakeSoft |

2000-11-12 13:04:52

by Arjan Filius

[permalink] [raw]
Subject: [PATCH] net/ax25/sysctl_net_ax25.c Re: 2.4.0-test11-pre3 doesn't compile

Hello,

On Sun, 12 Nov 2000, f5ibh wrote:

>
> Hi!
>
> here is the message :
>
> gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
> -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2
> -march=i586 -DMODULE -c -o sysctl_net_ax25.o sysctl_net_ax25.c
> sysctl_net_ax25.c: In function `ax25_register_sysctl':
> sysctl_net_ax25.c:117: warning: left-hand operand of comma expression has no
> effect
> sysctl_net_ax25.c:117: parse error before `;'

The folowing patch did fix this for me:
--- ./net/ax25/sysctl_net_ax25.c~ Sun Nov 12 09:31:39 2000
+++ ./net/ax25/sysctl_net_ax25.c Sun Nov 12 13:45:11 2000
@@ -114,7 +114,7 @@
memset(ax25_table, 0x00, ax25_table_size);

for (n = 0, ax25_dev = ax25_dev_list; ax25_dev != NULL; ax25_dev = ax25_dev->next) {
- ctl_table *child = kmalloc(sizeof(ax25_param_table, GFP_ATOMIC);
+ ctl_table *child = kmalloc(sizeof(ax25_param_table), GFP_ATOMIC);
if (!child) {
while (n--)
kfree(ax25_table[n].child);


Arjan Filius
mailto:[email protected]

2000-11-12 14:21:27

by Rasmus Andersen

[permalink] [raw]
Subject: Re: 2.4.0-test11-pre3 doesn't compile (ax25 and md)

On Sun, Nov 12, 2000 at 07:22:49AM -0500, Jeff Garzik wrote:
> Arjan Filius wrote:
> >
> > Hello,
> >
> > I noticed also md.c doesn't compile (gcc version 2.95.2 )
> > Here is the (stripped) output from a make -i modules:
> >
> > make -C md modules
> > make[2]: Entering directory `/usr/src/linux-2.4.0-test11-pre3/drivers/md'
> > gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strict-aliasing -pipe -mpreferred-stack-boundary=2 -march=k6 -DMODULE -DMODVERSIONS -include /usr/src/linux/include/linux/modversions.h -DEXPORT_SYMTAB -c md.c
> > In file included from md.c:33:
> > /usr/src/linux/include/linux/sysctl.h:35: parse error before `size_t'
>
> Either md.c or sysctl.h needs to include <linux/types.h>.
>

I tried to include <linux/types.h> in md.c and had to include
<linux/blkdev.h> also. Otherwise I got the following:

/home/rasmus/kernel/linux/include/linux/sysctl.h:598: syntax error before `long'/home/rasmus/kernel/linux/include/linux/sysctl.h:609: warning: `struct file' declared inside parameter list
/home/rasmus/kernel/linux/include/linux/sysctl.h:609: warning: its scope is only this definition or declaration,
/home/rasmus/kernel/linux/include/linux/sysctl.h:609: warning: which is probably not what you want.
/home/rasmus/kernel/linux/include/linux/sysctl.h:612: warning: `struct file' declared inside parameter list
/home/rasmus/kernel/linux/include/linux/sysctl.h:614: warning: `struct file' declared inside parameter list
/home/rasmus/kernel/linux/include/linux/sysctl.h:616: warning: `struct file' declared inside parameter list
/home/rasmus/kernel/linux/include/linux/sysctl.h:618: warning: `struct file' declared inside parameter list
/home/rasmus/kernel/linux/include/linux/sysctl.h:620: warning: `struct file' declared inside parameter list
/home/rasmus/kernel/linux/include/linux/sysctl.h:622: warning: `struct file' declared inside parameter list
/home/rasmus/kernel/linux/include/linux/sysctl.h:624: warning: `struct file' declared inside parameter list
drivers/md/md.c:89: warning: initialization from incompatible pointer type
drivers/md/md.c:91: warning: initialization from incompatible pointer type
drivers/md/md.c:3090: warning: `md_status_read_proc' defined but not used
make: *** [drivers/md/md.o] Error 1

--
Regards,
Rasmus([email protected])

The difference between theory and practice is that, in theory, there is
no difference between theory and practice. -- Anonymous

2000-11-12 22:23:32

by Eyal Lebedinsky

[permalink] [raw]
Subject: Re: 2.4.0-test11-pre3 doesn't compile (ax25 and md)

Jeff Garzik wrote:
>
> Either md.c or sysctl.h needs to include <linux/types.h>.

It actually needs <linux/fs.h>

--
Eyal Lebedinsky ([email protected])