免费注册 查看新帖 |

Chinaunix

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

CentOS内核编译问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-05-20 10:12 |只看该作者 |倒序浏览
最近刚刚把fedora12换成了CentOS 5.6
问题来了,CentOS默认不支持NTFS格式。只得将kernel-devel包装上,然后打算重新编译module了。
过程是这样:
先rpm -ivh kernel-devel-xxxx.rpm
然后
[root@localhost ~]# cd /usr/src/kernels/2.6.18-238.el5-i686/
[root@localhost 2.6.18-238.el5-i686]# ls -l
total 816
drwxr-xr-x 26 root root   4096 May 11 19:16 arch
drwxr-xr-x  2 root root   4096 May 11 19:16 block
drwxr-xr-x  4 root root   4096 May 11 19:16 crypto
drwxr-xr-x 68 root root   4096 May 11 19:16 drivers
drwxr-xr-x 66 root root   4096 May 11 19:16 fs
drwxr-xr-x 22 root root   4096 May 11 19:16 include
drwxr-xr-x  2 root root   4096 May 11 19:16 init
drwxr-xr-x  2 root root   4096 May 11 19:16 ipc
-rw-r--r--  1 root root  58985 Jan 13 17:00 kabi_whitelist
drwxr-xr-x  5 root root   4096 May 11 19:16 kernel
drwxr-xr-x  5 root root   4096 May 11 19:16 lib
-rw-r--r--  1 root root  48355 Jan 13 17:01 Makefile
drwxr-xr-x  2 root root   4096 May 11 19:16 mm
-rw-r--r--  1 root root 171890 Jan 13 17:01 Module.kabi
-rw-r--r--  1 root root   2065 Jan 13 17:01 Module.markers
-rw-r--r--  1 root root 417726 Jan 13 17:01 Module.symvers
drwxr-xr-x 43 root root   4096 May 11 19:16 net
drwxr-xr-x  4 root root   4096 May 11 19:16 samples
drwxr-xr-x 10 root root   4096 May 11 19:16 scripts
drwxr-xr-x  4 root root   4096 May 11 19:16 security
drwxr-xr-x 18 root root   4096 May 11 19:16 sound
-rw-r--r--  1 root root  48740 Jan 13 17:01 symsets-2.6.18-238.el5.tar.gz
drwxr-xr-x  2 root root   4096 May 11 19:16 usr
[root@localhost 2.6.18-238.el5-i686]# make menuconfig
  HOSTCC  scripts/kconfig/lxdialog/checklist.o
In file included from scripts/kconfig/lxdialog/checklist.c:24:
scripts/kconfig/lxdialog/dialog.h:31:20: error: curses.h: No such file or directory
In file included from scripts/kconfig/lxdialog/checklist.c:24:
scripts/kconfig/lxdialog/dialog.h:128: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘use_colors’
scripts/kconfig/lxdialog/dialog.h:129: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘use_shadow’
scripts/kconfig/lxdialog/dialog.h:131: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘attributes’
scripts/kconfig/lxdialog/dialog.h:143: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:146: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:147: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:148: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:149: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/dialog.h:151: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/checklist.c:31: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/checklist.c:59: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/checklist.c:95: error: expected ‘)’ before ‘*’ token
scripts/kconfig/lxdialog/checklist.c: In function ‘dialog_checklist’:
scripts/kconfig/lxdialog/checklist.c:117: error: ‘WINDOW’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:117: error: (Each undeclared identifier is reported only once
scripts/kconfig/lxdialog/checklist.c:117: error: for each function it appears in.)
scripts/kconfig/lxdialog/checklist.c:117: error: ‘dialog’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:117: error: ‘list’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:117: warning: left-hand operand of comma expression has no effect
scripts/kconfig/lxdialog/checklist.c:121: warning: implicit declaration of function ‘endwin’
scripts/kconfig/lxdialog/checklist.c:122: warning: implicit declaration of function ‘fprintf’
scripts/kconfig/lxdialog/checklist.c:122: warning: incompatible implicit declaration of built-in function ‘fprintf’
scripts/kconfig/lxdialog/checklist.c:122: error: ‘stderr’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:140: error: ‘COLS’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:141: error: ‘LINES’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:143: warning: implicit declaration of function ‘draw_shadow’
scripts/kconfig/lxdialog/checklist.c:143: error: ‘stdscr’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:145: warning: implicit declaration of function ‘newwin’
scripts/kconfig/lxdialog/checklist.c:146: warning: implicit declaration of function ‘keypad’
scripts/kconfig/lxdialog/checklist.c:146: error: ‘TRUE’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:148: warning: implicit declaration of function ‘draw_box’
scripts/kconfig/lxdialog/checklist.c:148: error: ‘attributes’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:149: warning: implicit declaration of function ‘wattrset’
scripts/kconfig/lxdialog/checklist.c:150: warning: implicit declaration of function ‘mvwaddch’
scripts/kconfig/lxdialog/checklist.c:152: warning: implicit declaration of function ‘waddch’
scripts/kconfig/lxdialog/checklist.c:156: warning: implicit declaration of function ‘print_title’
scripts/kconfig/lxdialog/checklist.c:159: warning: implicit declaration of function ‘print_autowrap’
scripts/kconfig/lxdialog/checklist.c:166: warning: implicit declaration of function ‘subwin’
scripts/kconfig/lxdialog/checklist.c:191: warning: implicit declaration of function ‘print_item’
scripts/kconfig/lxdialog/checklist.c:197: warning: implicit declaration of function ‘print_arrows’
scripts/kconfig/lxdialog/checklist.c:200: warning: implicit declaration of function ‘print_buttons’
scripts/kconfig/lxdialog/checklist.c:202: warning: implicit declaration of function ‘wnoutrefresh’
scripts/kconfig/lxdialog/checklist.c:204: warning: implicit declaration of function ‘doupdate’
scripts/kconfig/lxdialog/checklist.c:207: warning: implicit declaration of function ‘wgetch’
scripts/kconfig/lxdialog/checklist.c:214: error: ‘KEY_UP’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:214: error: ‘KEY_DOWN’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:224: error: ‘FALSE’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:225: warning: implicit declaration of function ‘scrollok’
scripts/kconfig/lxdialog/checklist.c:226: warning: implicit declaration of function ‘wscrl’
scripts/kconfig/lxdialog/checklist.c:235: warning: implicit declaration of function ‘wrefresh’
scripts/kconfig/lxdialog/checklist.c:285: warning: incompatible implicit declaration of built-in function ‘fprintf’
scripts/kconfig/lxdialog/checklist.c:286: warning: implicit declaration of function ‘delwin’
scripts/kconfig/lxdialog/checklist.c:290: error: ‘KEY_LEFT’ undeclared (first use in this function)
scripts/kconfig/lxdialog/checklist.c:291: error: ‘KEY_RIGHT’ undeclared (first use in this function)
make[2]: *** [scripts/kconfig/lxdialog/checklist.o] Error 1
make[1]: *** [menuconfig] Error 2
make: *** [menuconfig] Error 2

请问大家,这样的语法错误,会不会是因为gcc编译器的版本不对引起的呢?
如果是的话,那应该如何改呢。

论坛徽章:
1
操作系统版块每日发帖之星
日期:2015-07-11 22:20:00
2 [报告]
发表于 2011-05-20 12:23 |只看该作者
回复 1# mengyingchuxian


    就为了个ntfs去编译内核????
你google下ntfs-3g,下一个装上就好了。

论坛徽章:
0
3 [报告]
发表于 2011-05-20 13:10 |只看该作者
回楼上兄弟,ntfs的其他支持方法我知道的。并且都尝试过了。
只是这种方式是最原始普通的方式,现在出了问题,让是实在有点不爽。
还有,万一以后因为别的需求想编译内核呢。

论坛徽章:
0
4 [报告]
发表于 2011-05-20 13:21 |只看该作者
版主,能把这帖子挪到内核版块去么。

论坛徽章:
0
5 [报告]
发表于 2011-05-20 13:28 |只看该作者
没装ncurses开发库
  1. yum install ncurses-devel -y
复制代码

论坛徽章:
0
6 [报告]
发表于 2011-05-20 17:04 |只看该作者
没装ncurses开发库
nibon7 发表于 2011-05-20 13:28



    哇,兄弟你真是高手,谢谢,搞定了。赶快去google下,看看这是个么玩意。

论坛徽章:
0
7 [报告]
发表于 2011-05-20 17:46 |只看该作者
内核里面的NTFS驱动只能读不能写。

论坛徽章:
0
8 [报告]
发表于 2011-05-23 09:58 |只看该作者
内核里面的NTFS驱动只能读不能写。
yanu 发表于 2011-05-20 17:46



    好像有writable支持呢。

论坛徽章:
0
9 [报告]
发表于 2011-05-23 10:12 |只看该作者
哇,兄弟你真是高手,谢谢,搞定了。赶快去google下,看看这是个么玩意。
mengyingchuxian 发表于 2011-05-20 17:04



    我装了这个,然后:
make allnoconfig
make menuconfig ->
选上Loadable module support
把ntfs文件系统打上"M",然后选上NTFS write support
保存,退出。接下来这样:
[root@localhost 2.6.18-238.el5-i686]# make modules
scripts/kconfig/conf -s arch/i386/Kconfig
  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/modpost.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
make[2]: *** No rule to make target `fs/nls/nls_base.c', needed by `fs/nls/nls_base.o'.  Stop.
make[1]: *** [fs/nls] Error 2
make: *** [fs] Error 2
这个又是什么问题呢?为什么内核rpm安装了以后还是会缺一些文件呢。

论坛徽章:
0
10 [报告]
发表于 2011-05-23 12:25 |只看该作者
好像有writable支持呢。
mengyingchuxian 发表于 2011-05-23 09:58



   
只能写已经存在的文件,不能创建新文件。而且还不稳定。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP