错误
1.执行make menuconfig报如下错误
liangbo@liangbo-virtual-machine:~/linux/linux-2.6.0$ make menuconfig
HOSTCC scripts/fixdep
HOSTCC scripts/kconfig/conf.o
scripts/kconfig/conf.c: In function ‘conf_string’:
scripts/kconfig/conf.c:164:20: warning: variable ‘help’ set but not used [-Wunused-but-set-variable]
const char *def, *help;
^~~~
scripts/kconfig/conf.c: In function ‘conf_sym’:
scripts/kconfig/conf.c:198:6: warning: variable ‘type’ set but not used [-Wunused-but-set-variable]
int type;
^~~~
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:273:6: warning: variable ‘type’ set but not used [-Wunused-but-set-variable]
int type;
^~~~
scripts/kconfig/conf.c: In function ‘conf_askvalue’:
scripts/kconfig/conf.c:94:3: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(line, 128, stdin);
^~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:350:4: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(line, 128, stdin);
^~~~~~~~~~~~~~~~~~~~~~~
HOSTCC scripts/kconfig/mconf.o
scripts/kconfig/mconf.c:91:21: error: static declaration of ‘current_menu’ follows non-static declaration
static struct menu *current_menu;
^~~~~~~~~~~~
In file included from scripts/kconfig/mconf.c:23:0:
scripts/kconfig/lkc.h:63:21: note: previous declaration of ‘current_menu’ was here
extern struct menu *current_menu;
^~~~~~~~~~~~
scripts/kconfig/mconf.c: In function ‘show_textbox’:
scripts/kconfig/mconf.c:553:2: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(fd, text, strlen(text));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/mconf.c: In function ‘exec_conf’:
scripts/kconfig/mconf.c:225:2: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Wunused-result]
pipe(pipefd);
^~~~~~~~~~~~
scripts/Makefile.build:328: recipe for target 'scripts/kconfig/mconf.o' failed
make[1]: *** [scripts/kconfig/mconf.o] Error 1
Makefile:361: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2
2.没看仔细看错误在网上找的方法如下:
安装ncurses包
sudo apt-get install libncurses5-dev
结果还是不行!
仔细查看错误,是cuurent_menu这里有错误,看了别人的博客将这里注释掉!
3.进入修改报错行如下:
vi scripts/kconfig/mconf.c
再次执行make menuconfig可以显示界面了:
make menuconfig