linux内核编译_make menuconfig报错(current_menu error)

错误

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

在这里插入图片描述

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

RambOoO_l

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值