主题 : ubuntu 9.10下 执行make menuconfig命令失败,请高手指点!! 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 10344
精华: 0
发帖: 9
金钱: 75 两
威望: 33 点
综合积分: 18 分
注册时间: 2009-11-01
最后登录: 2017-09-13
楼主  发表于: 2009-11-01 23:45

 ubuntu 9.10下 执行make menuconfig命令失败,请高手指点!!

root@fantansy-desktop:/opt/FriendlyARM/mini2440/linux-2.6.29# make menuconfig
HOSTCC scripts/kconfig/mconf.o
scripts/kconfig/mconf.c:274:2: error: invalid preprocessing directive #static
scripts/kconfig/mconf.c: In function ‘build_conf’:
scripts/kconfig/mconf.c:431: error: ‘current_menu’ undeclared (first use in this function)
scripts/kconfig/mconf.c:431: error: (Each undeclared identifier is reported only once
scripts/kconfig/mconf.c:431: error: for each function it appears in.)
scripts/kconfig/mconf.c: In function ‘conf’:
scripts/kconfig/mconf.c:597: error: ‘current_menu’ undeclared (first use in this function)
scripts/kconfig/mconf.c: In function ‘conf_choice’:
scripts/kconfig/mconf.c:731: error: ‘current_menu’ undeclared (first use in this function)
make[1]: *** [scripts/kconfig/mconf.o] 错误 1
make: *** [menuconfig] 错误 2



本人菜鸟,,问题已经困扰2天了,我是按照mini2440的教程走的,执行make menuconfig时候出现错误,,还望高手指点,,感激不尽!!!
级别: 新手上路
UID: 10344
精华: 0
发帖: 9
金钱: 75 两
威望: 33 点
综合积分: 18 分
注册时间: 2009-11-01
最后登录: 2017-09-13
1楼  发表于: 2009-11-01 23:47
记得刚开始提示缺少ncurses库,,我装了新立得libncurses5-dev后,依然出错,不知道什么原因。。
级别: 新手上路
UID: 10344
精华: 0
发帖: 9
金钱: 75 两
威望: 33 点
综合积分: 18 分
注册时间: 2009-11-01
最后登录: 2017-09-13
2楼  发表于: 2009-11-02 19:08
有没有哪位高手可以指点一二的?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2009-11-02 19:47
scripts/kconfig/mconf.c:274:2: error: invalid preprocessing directive #static

把内核源代码根目录下的scripts/kconfig/mconf.c附上来看看吧.
另外,用make V=1 menuconfig在终端上把完整的编译命令行打印出来, 也贴出来.
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 10344
精华: 0
发帖: 9
金钱: 75 两
威望: 33 点
综合积分: 18 分
注册时间: 2009-11-01
最后登录: 2017-09-13
4楼  发表于: 2009-11-02 21:48

 回 3楼(kasim) 的帖子

多谢版主!!!
执行make V=1 menuconfig后, 终端结果 : root@fantansy-desktop:/opt/FriendlyARM/mini2440/linux-2.6.29/scripts/kconfig# make V=1 menuconfig
make: *** 没有规则可以创建“menuconfig”需要的目标“/mconf”。 停止。

scripts/kconfig/mconf.c见附件:
级别: 新手上路
UID: 10344
精华: 0
发帖: 9
金钱: 75 两
威望: 33 点
综合积分: 18 分
注册时间: 2009-11-01
最后登录: 2017-09-13
5楼  发表于: 2009-11-02 21:49

 回 3楼(kasim) 的帖子

mconf.rar (8 K) 下载次数:1

解压后即为mconf.c,,我在ubuntu下用gedit编辑器打开的,在windows下用记事本打开好像很乱,
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2009-11-03 09:54

 回 5楼(fantansy) 的帖子

你的mconf.c似乎被修改过,
274行,
复制代码
  1. #static struct menu *current_menu;

原本应该是
复制代码
  1. static struct menu *current_menu;


208行,
复制代码
  1. etoad_config_help[] = N_(

原本应该是
复制代码
  1. load_config_help[] = N_(


另外,不要在scripts/kconfig目录下执行make menuconfig, 应该在内核源代码的根目录下。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 10344
精华: 0
发帖: 9
金钱: 75 两
威望: 33 点
综合积分: 18 分
注册时间: 2009-11-01
最后登录: 2017-09-13
7楼  发表于: 2009-11-03 13:11

 回 6楼(kasim) 的帖子

问题果然如kasim所说的,已经成功解决!多谢版主!!!泪流满面。。。   
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
8楼  发表于: 2009-11-03 14:05
scripts/kconfig/mconf.c:274:2: error: invalid preprocessing directive #static

其实这里编译器已经告诉了你问题,只是你没加以分析
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."