• «
  • 1
  • 2
  • »
  • Pages: 1/2     Go
主题 : make menuconfig 出错,求助~~ 谢谢 复制链接 | 浏览器收藏 | 打印
级别: 侠客
UID: 8129
精华: 0
发帖: 78
金钱: 490 两
威望: 213 点
综合积分: 156 分
注册时间: 2009-08-11
最后登录: 2017-09-13
楼主  发表于: 2010-03-06 14:11

 make menuconfig 出错,求助~~ 谢谢

前段时间移植一些杂七杂八的东西,,
把系统给弄乱了。。。 现在想重新编译一个内核,结果运行 make menuconfig 命令出错。。。
请DX们帮忙看看。。。谢谢  


[root@localhost linux-2.6.29]# make menuconfig
  HOSTLD  scripts/kconfig/mconf
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: scripts/kconfig/mconf.o: Relocations in generic ELF (EM: 3)
/usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: scripts/kconfig/mconf.o: Relocations in generic ELF (EM: 3)
scripts/kconfig/mconf.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[1]: *** [scripts/kconfig/mconf] 错误 1
make: *** [menuconfig] 错误 2

级别: 侠客
UID: 8129
精华: 0
发帖: 78
金钱: 490 两
威望: 213 点
综合积分: 156 分
注册时间: 2009-08-11
最后登录: 2017-09-13
1楼  发表于: 2010-03-06 15:41
我的电脑中,,没有mconf.o  这个文件。。。 不知道是怎么回事
自由,自强,共享,共创。
级别: 论坛版主
UID: 12573
精华: 27
发帖: 8838
金钱: 46490 两
威望: 9298 点
综合积分: 18216 分
注册时间: 2010-01-09
最后登录: 2019-07-16
2楼  发表于: 2010-03-06 15:52
要先使用缺省配置文件:
cp config_mini2440_t35 .config

仔细看下用户手册
新手如何向我们反馈有效的信息,以便解决问题,见此贴:
http://www.arm9home.net/read.php?tid-14431.html

[注]: 此处签名链接仅为指引方向,而非解答问题本身.
级别: 侠客
UID: 8129
精华: 0
发帖: 78
金钱: 490 两
威望: 213 点
综合积分: 156 分
注册时间: 2009-08-11
最后登录: 2017-09-13
3楼  发表于: 2010-03-06 16:21

 回 2楼(mindee) 的帖子

谢谢,,, 我复制过缺省配置文件的。。。
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
4楼  发表于: 2010-03-06 17:08
HOSTLD  scripts/kconfig/mconf

说明这应该是用PC上的ld
usr/local/arm/4.3.2/bin/../lib/gcc/arm-none-linux-gnueabi/4.3.2/../../../../arm-none-linux-gnueabi/bin/ld: scripts/kconfig/mconf.o: Relocations in generic ELF (EM: 3)

说明你实际用的是交叉编译器里的arm-none-linux-gnueabi-ld
我想这的确是你PC的编译环境出了问题...
"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: 8129
精华: 0
发帖: 78
金钱: 490 两
威望: 213 点
综合积分: 156 分
注册时间: 2009-08-11
最后登录: 2017-09-13
5楼  发表于: 2010-03-06 18:02
我改了一下 LD,, 之前我将 /USR/BIN 目录下的 gcc  连接到 arm-linux-gcc 上去了,,,现在出现这种状况
[root@localhost linux-2.6.29]# make menuconfig
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/kxgettext.o
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] 错误 1
make: *** [menuconfig] 错误 2


但是我安装 ncurses-devel 后,,还是这种状况

[root@localhost linux-2.6.29]# yum install ncurses-devel
Configuration file /etc/yum/pluginconf.d/fastestmirror.conf not found
Unable to find configuration file for plugin fastestmirror
Loaded plugins: refresh-packagekit
fedora                                                   | 2.4 kB     00:00    
updates                                                  | 2.6 kB     00:00    
Setting up Install Process
Parsing package install arguments
Package ncurses-devel-5.6-16.20080301.fc9.i386 already installed and latest version
Nothing to do

还请版主DX 帮忙看看。。。谢谢
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
6楼  发表于: 2010-03-06 18:47
这是内核编译过程中检查ncurses的逻辑(:scripts/kconfig/lxdialog/check-lxdialog.sh)
复制代码
  1. # Where is ncurses.h?
  2. ccflags()
  3. {
  4.         if [ -f /usr/include/ncurses/ncurses.h ]; then
  5.                 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"'
  6.         elif [ -f /usr/include/ncurses/curses.h ]; then
  7.                 echo '-I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"'
  8.         elif [ -f /usr/include/ncurses.h ]; then
  9.                 echo '-DCURSES_LOC="<ncurses.h>"'
  10.         else
  11.                 echo '-DCURSES_LOC="<curses.h>"'
  12.         fi
  13. }
  14. # Temp file, try to clean up after us
  15. tmp=.lxdialog.tmp
  16. trap "rm -f $tmp" 0 1 2 3 15
  17. # Check if we can link to ncurses
  18. check() {
  19.         $cc -xc - -o $tmp 2>/dev/null <<'EOF'
  20. #include CURSES_LOC
  21. main() {}
  22. EOF
  23.         if [ $? != 0 ]; then
  24.             echo " *** Unable to find the ncurses libraries or the"       1>&2
  25.             echo " *** required header files."                            1>&2
  26.             echo " *** 'make menuconfig' requires the ncurses libraries." 1>&2
  27.             echo " *** "                                                  1>&2
  28.             echo " *** Install ncurses (ncurses-devel) and try again."    1>&2
  29.             echo " *** "                                                  1>&2
  30.             exit 1
  31.         fi
  32. }

很明显,你得让内核能找得到CURSES_LOC宏所指向的头文件。当然,首先你得保证内核能找得到你PC上的gcc
"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: 8129
精华: 0
发帖: 78
金钱: 490 两
威望: 213 点
综合积分: 156 分
注册时间: 2009-08-11
最后登录: 2017-09-13
7楼  发表于: 2010-03-08 14:26

 回 6楼(kasim) 的帖子

谢谢版主。。。。
我重新装了一下GCC,, 还是不行。。。 请问内核如何才能找到gcc呢。。。
另外,在 /usr/include/ncurses 这个目录下,有相关头文件啊。。。
还真的是不知道该怎么办了。。。
还请版主帮帮忙,,看能不能给个提示。。。谢谢
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
8楼  发表于: 2010-03-08 15:02
把上面源代码里的
复制代码
  1. $cc -xc - -o $tmp 2>/dev/null <<'EOF'

改成
复制代码
  1. $cc -xc - -o $tmp <<'EOF'

然后用make menuconfig V=1试试,希望这样可以看到确切的出错信息
"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: 8129
精华: 0
发帖: 78
金钱: 490 两
威望: 213 点
综合积分: 156 分
注册时间: 2009-08-11
最后登录: 2017-09-13
9楼  发表于: 2010-03-08 15:44

 回 8楼(kasim) 的帖子

kasim,你好,, 这个是用  make menuconfig V=1 的输出信息。。还帮忙看看。。谢谢
我也在自己看到底是啥问题
[root@localhost linux-2.6.29]# make menuconfig V=1
make -f scripts/Makefile.build obj=scripts/basic
mkdir -p include/linux include/config
make -f scripts/Makefile.build obj=scripts/kconfig menuconfig
/bin/sh /opt/friendlyarm/mini2440/linux-2.6.29/scripts/kconfig/lxdialog/check-lxdialog.sh -check gcc -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>" -DLOCALE -DKBUILD_NO_NLS -lncursesw
*** Unable to find the ncurses libraries or the
*** required header files.
*** 'make menuconfig' requires the ncurses libraries.
***
*** Install ncurses (ncurses-devel) and try again.
***
make[1]: *** [scripts/kconfig/dochecklxdialog] 错误 1
make: *** [menuconfig] 错误 2
  • «
  • 1
  • 2
  • »
  • Pages: 1/2     Go