LDD编译错误

1,

错误:

make -C /lib/modules/2.6.32-21-generic/build M=/home/qwq/first/LDD/block/sbull modules
make[1]: 正在进入目录 `/usr/src/linux-headers-2.6.32-21-generic'
scripts/Makefile.build:49: *** CFLAGS was changed in "/home/qwq/first/LDD/block/sbull/Makefile". Fix it to use EXTRA_CFLAGS。 停止。
make[1]: *** [_module_/home/qwq/first/LDD/block/sbull] 错误 2
make[1]:正在离开目录 `/usr/src/linux-headers-2.6.32-21-generic'
make: *** [default] 错误 2

解决:

CFLAGS was changed Fix it to use EXTRA_CFLAGS

这个标志已经变了,把makefile中的 CFLAGS 替换威EXTRA_CFLAGS

2,

错误:

make[1]: 正在进入目录 `/usr/src/linux-headers-2.6.32-21-generic'
  CC [M]  /home/qwq/first/LDD/block/sbull/sbull.o
/home/qwq/first/LDD/block/sbull/sbull.c:8:26: error: linux/config.h: 没有那个文件或目录
/home/qwq/first/LDD/block/sbull/sbull.c:109: error: expected ‘)’ before ‘*’ token
/home/qwq/first/LDD/block/sbull/sbull.c: In function ‘sbull_xfer_bio’:
/home/qwq/first/LDD/block/sbull/sbull.c:150: error: implicit declaration of function ‘bio_cur_sectors’
/home/qwq/first/LDD/block/sbull/sbull.c: In function ‘sbull_xfer_request’:


解决:

The file include/linux/config.h has been removed from 2.6.18 kernel. So remember this if you build your favorite module against the new 2.6.19 kernel and you get an error。 Thats because there is no more include/linux/config.h file in 2.6.19.

Put linux/config.h out of its misery. 把这个头文件注释掉即可



错误:

make -C /lib/modules/2.6.32-21-generic/build M=/home/qwq/first/LDD/block/sbull modules
make[1]: 正在进入目录 `/usr/src/linux-headers-2.6.32-21-generic'
  CC [M]  /home/qwq/first/LDD/block/sbull/sbull.o
/home/qwq/first/LDD/block/sbull/sbull.c:109: error: expected ‘)’ before ‘*’ token
/home/qwq/first/LDD/block/sbull/sbull.c: In function ‘sbull_xfer_bio’:
/home/qwq/first/LDD/block/sbull/sbull.c:150: error: implicit declaration of function ‘bio_cur_sectors’
/home/qwq/first/LDD/block/sbull/sbull.c: In function ‘sbull_xfer_request’:
/home/qwq/first/LDD/block/sbull/sbull.c:166: error: implicit declaration of function ‘rq_for_each_bio’
/home/qwq/first/LDD/block/sbull/sbull.c:166: error: expected ‘;’ before ‘{’ token
/home/qwq/first/LDD/block/sbull/sbull.c:164: warning: unused variable ‘nsect’
/home/qwq/first/LDD/block/sbull/sbull.c:171: warning: no return statement in function returning non-void
/home/qwq/first/LDD/block/sbull/sbull.c: At top level:
/home/qwq/first/LDD/block/sbull/sbull.c:178: error: expected ‘)’ before ‘*’ token
/home/qwq/first/LDD/block/sbull/sbull.c:203: error: expected ‘)’ before ‘*’ token
/home/qwq/first/LDD/block/sbull/sbull.c:328: warning: initialization from incompatible pointer type
/home/qwq/first/LDD/block/sbull/sbull.c:329: warning: initialization from incompatible pointer type
/home/qwq/first/LDD/block/sbull/sbull.c:333: warning: initialization from incompatible pointer type
/home/qwq/first/LDD/block/sbull/sbull.c: In function ‘setup_device’:
/home/qwq/first/LDD/block/sbull/sbull.c:371: error: ‘sbull_make_request’ undeclared (first use in this function)
/home/qwq/first/LDD/block/sbull/sbull.c:371: error: (Each undeclared identifier is reported only once
/home/qwq/first/LDD/block/sbull/sbull.c:371: error: for each function it appears in.)
/home/qwq/first/LDD/block/sbull/sbull.c:375: error: ‘sbull_full_request’ undeclared (first use in this function)
/home/qwq/first/LDD/block/sbull/sbull.c:385: error: ‘sbull_request’ undeclared (first use in this function)
/home/qwq/first/LDD/block/sbull/sbull.c:392: error: implicit declaration of function ‘blk_queue_hardsect_size’
make[2]: *** [/home/qwq/first/LDD/block/sbull/sbull.o] 错误 1
make[1]: *** [_module_/home/qwq/first/LDD/block/sbull] 错误 2
make[1]:正在离开目录 `/usr/src/linux-headers-2.6.32-21-generic'
make: *** [default] 错误 2





参考http://hi.baidu.com/zr1988/blog/item/c98e833d551397ca9e3d6215.html/cmtid/93ea1ffbc0b295186d22eb84


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值