免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1421 | 回复: 0
打印 上一主题 下一主题

LDD3 SCULL Compiler Error [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-09-25 10:59 |只看该作者 |倒序浏览
Question 1:
make -C /lib/modules/2.6.27.10-1/build M=/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull LDDINC=/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/../include modules
make[1]: Entering directory `/usr/src/kernels/2.6.27.10-1-i686'
scripts/Makefile.build:46: *** CFLAGS was changed in "/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/Makefile". Fix it to use EXTRA_CFLAGS.  Stop.
make[1]: *** [_module_/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.27.10-1-i686'
make: *** [modules] Error 2
Answer:
Change  file L12~L13
  1 # Comment/uncomment the following line to disable/enable debugging
  2 #DEBUG = y
  3
  4
  5 # Add your debugging flag (or not) to CFLAGS
  6 ifeq ($(DEBUG),y)
  7   DEBFLAGS = -O -g -DSCULL_DEBUG # "-O" is needed to expand inlines
  8 else
  9   DEBFLAGS = -O2
10 endif
11
12 CFLAGS += -I$(LDDINC)
13 CFLAGS += $(DEBFLAGS)
14
15 ifneq ($(KERNELRELEASE),)
16 # call from kernel build system
To
  1 # Comment/uncomment the following line to disable/enable debugging
  2 #DEBUG = y
  3
  4
  5 # Add your debugging flag (or not) to CFLAGS
  6 ifeq ($(DEBUG),y)
  7   DEBFLAGS = -O -g -DSCULL_DEBUG # "-O" is needed to expand inlines
  8 else
  9   DEBFLAGS = -O2
10 endif
11
12 #CFLAGS += -I$(LDDINC)
13 #CFLAGS += $(DEBFLAGS)
14
15 ifneq ($(KERNELRELEASE),)
16 # call from kernel build system
Question 2:
make -C /lib/modules/2.6.27.10-1/build M=/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull LDDINC=/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/../include modules
make[1]: Entering directory `/usr/src/kernels/2.6.27.10-1-i686'
  CC [M]  /mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.o
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c: In function 'scull_u_open':
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:107: error: dereferencing pointer to incomplete type
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:108: error: dereferencing pointer to incomplete type
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:115: error: dereferencing pointer to incomplete type
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c: In function 'scull_w_available':
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:166: error: dereferencing pointer to incomplete type
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:167: error: dereferencing pointer to incomplete type
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c: In function 'scull_w_open':
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:180: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:180: error: (Each undeclared identifier is reported only once
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:180: error: for each function it appears in.)
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:180: error: implicit declaration of function 'signal_pending'
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:180: error: implicit declaration of function 'schedule'
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:185: error: dereferencing pointer to incomplete type
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c: In function 'scull_w_release':
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:206: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c: In function 'scull_c_open':
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:278: error: dereferencing pointer to incomplete type
/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.c:282: error: dereferencing pointer to incomplete type
make[2]: *** [/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull/access.o] Error 1
make[1]: *** [_module_/mnt/sda7/Linux/Devices_Drivers/LDD3/ldd3_code/scull] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.27.10-1-i686'
make: *** [modules] Error 2
Answer:
Insert head file
#include
#include  /* printk() */
#include
#include    /* kmalloc() */
#include      /* everything... */
#include   /* error codes */
#include   /* size_t */
#include
#include
#include
#include
#include
Question:
if print the message is ""
Answer:
sudo touch /usr/include/linux/config.h
and modifi the main.c
#include
to
#include "/usr/include/linux/config.h"
if you del the line, I think you're right.
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u3/96896/showart_2059709.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP