现在的位置: 首页 > 综合 > 正文

debian testing内核编译错误及解决

2013年08月08日 ⁄ 综合 ⁄ 共 1152字 ⁄ 字号 评论关闭

系统环境:debian testing

1、编译内核错误
a.make menuconfig时出错如下:

HOSTCC  scripts/kconfig/mconf.o
scripts/kconfig/mconf.c:91: 错误:对 ‘current_menu’ 的静态声明出现在非静态声明之后
scripts/kconfig/lkc.h:63: 错误:‘current_menu’ 的上一个声明在此
make[1]: *** [scripts/kconfig/mconf.o] 错误 1
make: *** [menuconfig] 错误 2

解决办法:使用旧版本的gcc3.3,之前我系统里的gcc是4.1,它对语法要求及其严格,导致该错误。
或者去注释掉出错的那一行,或将该行static修饰符去掉。

b.make xconfig出错如下:
*
* Unable to find the QT installation. Please make sure that the
* QT development package is correctly installed and the QTDIR
* environment variable is set to the correct location.
*
sed < scripts/kconfig/lkc_proto.h > scripts/kconfig/lkc_defs.h 's/P(/([^,]*/),.*/#define /1 (/*/1_p)/'
  HOSTCC  scripts/kconfig/kconfig_load.o
make[1]: *** 没有规则可以创建“scripts/kconfig/qconf.o”需要的目标“scripts/kconfig/.tmp_qtcheck”。 停止。
make: *** [xconfig] 错误 2

解决办法:安装QT开发包,然后设置QTDIR环境变量,如果没有g++则也应安装。

c.make gconfig出错如下:
*
* Unable to find the GTK+ installation. Please make sure that
* the GTK+ 2.0 development package is correctly installed...
* You need gtk+-2.0, glib-2.0 and libglade-2.0.
*
make[1]: *** [scripts/kconfig/.tmp_gtkcheck] ?? 1
make: *** [gconfig] 错误 2

解决办法:gtk+-2.0, glib-2.0 and libglade-2.0安装全即可。
用以下命令查看安装与否
pkg-config gtk+-2.0 --modversion
pkg-config glib-2.0 --modversion
pkg-config libglade-2.0 --modversion

抱歉!评论已关闭.