Linux内核编译时错误
2012-11-25 17:59 owenyang 阅读(608) 评论(0) 编辑 收藏 举报Linux内核剪裁编译时出来错误,如下
[root@yang linux-2.6.24.4]# make menuconfig make: Warning: File `/UP-Magic/exp/kernel/linux-2.6.24.4/arch/arm/Makefile' has modification time 3.8e+08 s in the future make[1]: Warning: File `scripts/Makefile.host' has modification time 3.8e+08 s i n the future HOSTCC scripts/basic/fixdep scripts/basic/fixdep.c: 在函数‘traps’中: scripts/basic/fixdep.c:377: 警告:提领类型双关的指针将破坏强重叠规则 scripts/basic/fixdep.c:379: 警告:提领类型双关的指针将破坏强重叠规则 HOSTCC scripts/basic/docproc make[1]: 警告:检测到时钟错误。您的创建可能是不完整的。 make[1]: Warning: File `scripts/Makefile.host' has modification time 3.8e+08 s i n the future HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/kxgettext.o HOSTCC scripts/kconfig/lxdialog/checklist.o 在包含自 scripts/kconfig/lxdialog/checklist.c:24 的文件中: scripts/kconfig/lxdialog/dialog.h:32:20: 错误:curses.h:没有那个文件或目录 In file included from scripts/kconfig/lxdialog/checklist.c:24: scripts/kconfig/lxdialog/dialog.h:97: 错误:expected specifier-qualifier-list be fore ‘chtype’ scripts/kconfig/lxdialog/dialog.h:187: 错误:expected ‘)’ before ‘*’ token scripts/kconfig/lxdialog/dialog.h:194: 错误:expected ‘)’ before ‘*’ token scripts/kconfig/lxdialog/dialog.h:196: 错误:expected ‘)’ before ‘*’ token scripts/kconfig/lxdialog/dialog.h:197: 错误:expected ‘)’ before ‘*’ token scripts/kconfig/lxdialog/dialog.h:198: 错误:expected ‘)’ before ‘*’ token scripts/kconfig/lxdialog/dialog.h:199: 错误:expected ‘)’ before ‘*’ token scripts/kconfig/lxdialog/dialog.h:201: 错误:expected ‘)’ before ‘*’ token scripts/kconfig/lxdialog/checklist.c:31: 错误:expected ‘)’ before ‘*’ token scripts/kconfig/lxdialog/checklist.c:59: 错误:expected ‘)’ before ‘*’ token scripts/kconfig/lxdialog/checklist.c:95: 错误:expected ‘)’ before ‘*’ token scripts/kconfig/lxdialog/checklist.c: 在函数‘dialog_checklist’中: scripts/kconfig/lxdialog/checklist.c:116: 错误:‘WINDOW’未声明(在此函数内第一次 使用) scripts/kconfig/lxdialog/checklist.c:116: 错误:(即使在一个函数内多次出现,每个 未声明的标识符在其 scripts/kconfig/lxdialog/checklist.c:116: 错误:所在的函数内也只报告一次。) scripts/kconfig/lxdialog/checklist.c:116: 错误:‘dialog’未声明(在此函数内第一次 使用) scripts/kconfig/lxdialog/checklist.c:116: 错误:‘list’未声明(在此函数内第一次使 用) scripts/kconfig/lxdialog/checklist.c:116: 警告:逗号表达式的左操作数不起作用 scripts/kconfig/lxdialog/checklist.c:129: 警告:隐式声明函数‘getmaxy’ scripts/kconfig/lxdialog/checklist.c:129: 错误:‘stdscr’未声明(在此函数内第一次 使用) scripts/kconfig/lxdialog/checklist.c:130: 错误:‘KEY_MAX’未声明(在此函数内第一次 使用) scripts/kconfig/lxdialog/checklist.c:131: 警告:隐式声明函数‘getmaxx’ scripts/kconfig/lxdialog/checklist.c:137: 错误:‘COLS’未声明(在此函数内第一次使 用) scripts/kconfig/lxdialog/checklist.c:138: 错误:‘LINES’未声明(在此函数内第一次使 用) scripts/kconfig/lxdialog/checklist.c:140: 警告:隐式声明函数‘draw_shadow’ scripts/kconfig/lxdialog/checklist.c:142: 警告:隐式声明函数‘newwin’ scripts/kconfig/lxdialog/checklist.c:143: 警告:隐式声明函数‘keypad’ scripts/kconfig/lxdialog/checklist.c:143: 错误:‘TRUE’未声明(在此函数内第一次使 用) scripts/kconfig/lxdialog/checklist.c:145: 警告:隐式声明函数‘draw_box’ scripts/kconfig/lxdialog/checklist.c:146: 错误:‘struct dialog_color’没有名为‘at r’的成员 scripts/kconfig/lxdialog/checklist.c:146: 错误:‘struct dialog_color’没有名为‘at r’的成员 scripts/kconfig/lxdialog/checklist.c:147: 警告:隐式声明函数‘wattrset’ scripts/kconfig/lxdialog/checklist.c:147: 错误:‘struct dialog_color’没有名为‘at r’的成员 scripts/kconfig/lxdialog/checklist.c:148: 警告:隐式声明函数‘mvwaddch’ scripts/kconfig/lxdialog/checklist.c:150: 警告:隐式声明函数‘waddch’ scripts/kconfig/lxdialog/checklist.c:151: 错误:‘struct dialog_color’没有名为‘at r’的成员 scripts/kconfig/lxdialog/checklist.c:154: 警告:隐式声明函数‘print_title’ scripts/kconfig/lxdialog/checklist.c:156: 错误:‘struct dialog_color’没有名为‘at r’的成员 scripts/kconfig/lxdialog/checklist.c:157: 警告:隐式声明函数‘print_autowrap’ scripts/kconfig/lxdialog/checklist.c:164: 警告:隐式声明函数‘subwin’ scripts/kconfig/lxdialog/checklist.c:171: 错误:‘struct dialog_color’没有名为‘at r’的成员 scripts/kconfig/lxdialog/checklist.c:171: 错误:‘struct dialog_color’没有名为‘at r’的成员 scripts/kconfig/lxdialog/checklist.c:189: 警告:隐式声明函数‘print_item’ scripts/kconfig/lxdialog/checklist.c:192: 警告:隐式声明函数‘print_arrows’ scripts/kconfig/lxdialog/checklist.c:195: 警告:隐式声明函数‘print_buttons’ scripts/kconfig/lxdialog/checklist.c:197: 警告:隐式声明函数‘wnoutrefresh’ scripts/kconfig/lxdialog/checklist.c:199: 警告:隐式声明函数‘doupdate’ scripts/kconfig/lxdialog/checklist.c:202: 警告:隐式声明函数‘wgetch’ scripts/kconfig/lxdialog/checklist.c:210: 错误:‘KEY_UP’未声明(在此函数内第一次 使用) scripts/kconfig/lxdialog/checklist.c:210: 错误:‘KEY_DOWN’未声明(在此函数内第一 次使用) scripts/kconfig/lxdialog/checklist.c:220: 错误:‘FALSE’未声明(在此函数内第一次使 用) scripts/kconfig/lxdialog/checklist.c:221: 警告:隐式声明函数‘scrollok’ scripts/kconfig/lxdialog/checklist.c:222: 警告:隐式声明函数‘wscrl’ scripts/kconfig/lxdialog/checklist.c:232: 警告:隐式声明函数‘wrefresh’ scripts/kconfig/lxdialog/checklist.c:293: 警告:隐式声明函数‘delwin’ scripts/kconfig/lxdialog/checklist.c:297: 错误:‘KEY_LEFT’未声明(在此函数内第一 次使用) scripts/kconfig/lxdialog/checklist.c:298: 错误:‘KEY_RIGHT’未声明(在此函数内第一 次使用) scripts/kconfig/lxdialog/checklist.c:310: 警告:隐式声明函数‘on_key_esc’ scripts/kconfig/lxdialog/checklist.c:312: 错误:‘KEY_RESIZE’未声明(在此函数内第 一次使用) make[1]: *** [scripts/kconfig/lxdialog/checklist.o] 错误 1 make: *** [menuconfig] 错误 2
解决方法:
1. 安装ncurses-devel,这个是红帽或者FC的安装程序,Ubuntu的需要安装libncurses5-dev
本人是 Redhat6.0,直接到光盘镜像里选择包安装便OK
[root@yang /]# mount /dev/cdrom /mnt mount: block device /dev/sr0 is write-protected, mounting read-only [root@yang /]# cd /mnt/Packages/ [root@yang Packages]# ls ncur* ncurses-5.7-3.20090208.el6.i686.rpm ncurses-devel-5.7-3.20090208.el6.i686. ncurses-base-5.7-3.20090208.el6.i686.rpm ncurses-libs-5.7-3.20090208.el6.i686.r [root@yang Packages]# rpm -ivh ncurses-devel-5.7-3.20090208.el6.i686.rpm warning: ncurses-devel-5.7-3.20090208.el6.i686.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY Preparing... ########################################### [100%] 1:ncurses-devel ########################################### [100%] [root@yang Packages]#
2.同时出现时钟检测错误
make[1]: 警告:检测到时钟错误。您的创建可能是不完整的。
解决方法:
[root@yang linux-2.6.24.4]# find . -type f -exec touch {} \;