Re: Re: problems compiling enbd-2.4.32pre and fr1-2.16 under kernel 2.6.8.1

edward mzj <[email protected]>
Newsgroups gmane.linux.enbd.general
Message-ID <[email protected]>
hi peter

i've modified the Makefile. here is the result
... Omitted ...
make -f /usr/src/nbd-2.4.32/kernel/linux-2.6.x/scripts/Makefile.build
obj=/tmp/linux-2.6.x/drivers/block/enbd
  gcc -Wp,-MD,/tmp/linux-2.6.x/drivers/block/enbd/.enbd_base.o.d -nostdinc -iwithprefix include
-D__KERNEL__ -Iinclude  -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686
-Iinclude/asm-i386/mach-default -O2 -fomit-frame-pointer -g    -DMODULE
-DKBUILD_BASENAME=enbd_base -DKBUILD_MODNAME=enbd -c -o
/tmp/linux-2.6.x/drivers/block/enbd/.tmp_enbd_base.o
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:284: linux/enbd.h: No such file or directory
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:285: linux/enbd_ioctl.h: No such file or directory
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:314: `MAX_NBD' undeclared here (not in a function)
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:314: `ENBD_MAXCONN' undeclared here (not in a
function)
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:314: size of array `enbd_blksizes' has non-integer
type
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:315: `MAX_NBD' undeclared here (not in a function)
... Omitted ...

it looks like the gcc couldn't find the proper head files in the spcified include dir
so i copied enbd*.h from the enbd dir to the include/linux dir of the kernel src and
re-run make config all. now the new result is:

... Omitted ...
make -f /usr/src/nbd-2.4.32/kernel/linux-2.6.x/scripts/Makefile.build
obj=/tmp/linux-2.6.x/drivers/block/enbd
  gcc -Wp,-MD,/tmp/linux-2.6.x/drivers/block/enbd/.enbd_base.o.d -nostdinc -iwithprefix include
-D__KERNEL__ -Iinclude  -D__KERNEL__ -Iinclude  -Wall -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686
-Iinclude/asm-i386/mach-default -O2 -fomit-frame-pointer -g    -DMODULE
-DKBUILD_BASENAME=enbd_base -DKBUILD_MODNAME=enbd -c -o
/tmp/linux-2.6.x/drivers/block/enbd/.tmp_enbd_base.o
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c: In function `proc_doblksize':
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:4889: too few arguments to function
`proc_dointvec'
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c: In function `enbd_setup':
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:4994: warning: initialization from incompatible
pointer type
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:5000: warning: initialization from incompatible
pointer type
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:5003: warning: initialization from incompatible
pointer type
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:5006: warning: initialization from incompatible
pointer type
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:5009: warning: initialization from incompatible
pointer type
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:5012: warning: initialization from incompatible
pointer type
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:5018: warning: initialization from incompatible
pointer type
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:5021: warning: initialization from incompatible
pointer type
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:5024: warning: initialization from incompatible
pointer type
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c: At top level:
/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.c:4356: warning: `enbd_read_block_0' defined but not
used
make[2]: *** [/tmp/linux-2.6.x/drivers/block/enbd/enbd_base.o] Error 1
make[1]: *** [/tmp/linux-2.6.x/drivers/block/enbd] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.8.1'
*************************************
* please apply kernel patch instead *
*************************************
... Omitted ...

it seems the protype of proc_dointvec() has changed. since kernel 2.6.8, the new declaration in
sysctl.h is
extern int proc_dointvec(ctl_table *, int, struct file *,
                         void __user *, size_t *, loff_t *);


_________________________________________________________
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://cn.rd.yahoo.com/mail_cn/tag/yisou/music/*http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://cn.rd.yahoo.com/mail_cn/tag/yisou/image/*http://image.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.