LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 8975|回复: 121

第一次编译binutils-2.17出现的错误,求救

[复制链接]
发表于 2008-1-1 13:48:55 | 显示全部楼层 |阅读模式
第一次编译binutils-2.17出现的错误,求救
hi ~ all
i am tring to compile binutils2.17 for my lfs
env: vmware5.5
liveCD:lfslivecd-x86-6.3-r2160.iso
i do like this:
我参考的文档
http://www.linuxfromscratch.org/ ... binutils-pass1.html

tar xvf /lfs-sources/binutils-2.17.tar.bz2
cd binutils-2.17
mkdir -v ../binutils-build
cd ../binutils-build
CC="gcc -B/usr/bin/" ../binutils-2.17/configure \
--prefix=/tools --disable-nls --disable-werror

then
vi config.log
**************************************************

  1. configure:2317: checking for correct version of gmp.h
  2. configure:2330: gcc -B/usr/bin/ -c -g -O2   conftest.c 1>&5
  3. configure:2320:17: error: gmp.h: No such file or directory
  4. configure: In function 'main':
  5. configure:2324: error: 'choke' undeclared (first use in this function)
  6. configure:2324: error: (Each undeclared identifier is reported only once
  7. configure:2324: error: for each function it appears in.)
  8. configure:2324: error: expected ';' before 'me'
  9. configure: failed program was:
  10. #line 2319 "configure"
  11. #include "confdefs.h"
  12. #include "gmp.h"
  13. int main() {

  14. #if __GNU_MP_VERSION < 3
  15. choke me
  16. #endif

  17. ; return 0; }
复制代码

****************************************************
and what i have to do this??
Where do I get gmp.h? Do I need it? What else can be wrong?
thank you.
发表于 2008-1-1 14:07:49 | 显示全部楼层
我曾经遇到过,换了一个2.16的就好了
回复 支持 反对

使用道具 举报

发表于 2008-1-1 14:15:41 | 显示全部楼层
把configure的过程发出来看一下
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-1-1 14:15:46 | 显示全部楼层
2.16的我下完了怎么拷到liveCD里面的呢
我做天用软件写到iso里面,结果liveCD坏掉了

你们是如何传文件过去的到liveCD中
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-1-1 14:17:55 | 显示全部楼层
执行
CC="gcc -B/usr/bin/" ../binutils-2.17/configure \
--prefix=/tools --disable-nls --disable-werror
  1. checking host system type...
  2. i686-pc-linux-gnu
  3. checking target system type... i686-pc-linux-gnu
  4. checking build system type... i686-pc-linux-gnu
  5. checking for a BSD compatible install... /usr/bin/install -c
  6. checking whether ln works... yes
  7. checking whether ln -s works... yes
  8. checking for gcc... gcc -B/usr/bin/
  9. checking whether the C compiler (gcc -B/usr/bin/  ) works... yes
  10. checking whether the C compiler (gcc -B/usr/bin/  ) is a cross-compiler... no
  11. checking whether we are using GNU C... yes
  12. checking whether gcc -B/usr/bin/ accepts -g... yes
  13. checking for gnatbind... no
  14. checking whether compiler driver understands Ada... no
  15. checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
  16. checking for correct version of gmp.h... no
  17. checking for bison... bison -y
  18. checking for bison... bison
  19. checking for gm4... no
  20. checking for gnum4... no
  21. checking for m4... m4
  22. checking for flex... flex
  23. checking for flex... flex
  24. checking for makeinfo... makeinfo
  25. checking for expect... no
  26. checking for runtest... no
  27. checking for i686-pc-linux-gnu-ar... no
  28. checking for ar... ar
  29. checking for i686-pc-linux-gnu-as... no
  30. checking for as... as
  31. checking for i686-pc-linux-gnu-dlltool... no
  32. checking for dlltool... no
  33. checking for i686-pc-linux-gnu-ld... /usr/bin/ld
  34. checking for i686-pc-linux-gnu-lipo... no
  35. checking for lipo... no
  36. checking for i686-pc-linux-gnu-nm... no
  37. checking for nm... nm
  38. checking for i686-pc-linux-gnu-ranlib... no
  39. checking for ranlib... ranlib
  40. checking for i686-pc-linux-gnu-strip... no
  41. checking for strip... strip
  42. checking for i686-pc-linux-gnu-windres... no
  43. checking for windres... no
  44. checking for i686-pc-linux-gnu-objcopy... no
  45. checking for objcopy... objcopy
  46. checking for i686-pc-linux-gnu-objdump... no
  47. checking for objdump... objdump
  48. checking for i686-pc-linux-gnu-cc... no
  49. checking for cc... cc
  50. checking for i686-pc-linux-gnu-c++... no
  51. checking for c++... c++
  52. checking for i686-pc-linux-gnu-gcc... no
  53. checking for gcc... gcc
  54. checking for i686-pc-linux-gnu-gcj... no
  55. checking for gcj... no
  56. checking for i686-pc-linux-gnu-gfortran... no
  57. checking for gfortran... no
  58. checking for ar... no
  59. checking for i686-pc-linux-gnu-ar... no
  60. checking for ar... ar
  61. checking for as... no
  62. checking for i686-pc-linux-gnu-as... no
  63. checking for as... as
  64. checking for dlltool... no
  65. checking for i686-pc-linux-gnu-dlltool... no
  66. checking for dlltool... no
  67. checking for ld... no
  68. checking for i686-pc-linux-gnu-ld... no
  69. checking for ld... ld
  70. checking for lipo... no
  71. checking for i686-pc-linux-gnu-lipo... no
  72. checking for lipo... no
  73. checking for nm... no
  74. checking for i686-pc-linux-gnu-nm... no
  75. checking for nm... nm
  76. checking for objdump... no
  77. checking for i686-pc-linux-gnu-objdump... no
  78. checking for objdump... objdump
  79. checking for ranlib... no
  80. checking for i686-pc-linux-gnu-ranlib... no
  81. checking for ranlib... ranlib
  82. checking for strip... no
  83. checking for i686-pc-linux-gnu-strip... no
  84. checking for strip... strip
  85. checking for windres... no
  86. checking for i686-pc-linux-gnu-windres... no
  87. checking for windres... no
  88. checking where to find the target ar... just compiled
  89. checking where to find the target as... just compiled
  90. checking where to find the target cc... host tool
  91. checking where to find the target c++... host tool
  92. checking where to find the target c++ for libstdc++... host tool
  93. checking where to find the target dlltool... just compiled
  94. checking where to find the target gcc... host tool
  95. checking where to find the target gcj... host tool
  96. checking where to find the target gfortran... host tool
  97. checking where to find the target ld... just compiled
  98. checking where to find the target lipo... host tool
  99. checking where to find the target nm... just compiled
  100. checking where to find the target objdump... just compiled
  101. checking where to find the target ranlib... just compiled
  102. checking where to find the target strip... just compiled
  103. checking where to find the target windres... just compiled
  104. checking whether to enable maintainer-specific portions of Makefiles... no
  105. updating cache ./config.cache
  106. creating ./config.status
  107. creating Makefile
复制代码
lfs:/mnt/lfs/sources/binutils-2.17$
lfs:/mnt/lfs/sources/binutils-2.17$
回复 支持 反对

使用道具 举报

发表于 2008-1-1 14:24:44 | 显示全部楼层
看来和预料的一样,configure完成了,不过你这个应该是在binutils-build里,最好别在binutils代码的目录里.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-1-1 14:29:29 | 显示全部楼层
configure是正常的
到binutils-build目录下面看config.log会报错
在binutils-2.17下面放的code
  1. mkdir -v ../binutils-build
  2. cd ../binutils-build
  3. CC="gcc -B/usr/bin/" ../binutils-2.17/configure \
  4. --prefix=/tools --disable-nls --disable-werror
复制代码
就是一开始提的问题了
不清楚怎么解决
要换版本??
又是怎么拷到liveCD中的呢
回复 支持 反对

使用道具 举报

发表于 2008-1-1 14:33:08 | 显示全部楼层
试试继续吧.
回复 支持 反对

使用道具 举报

发表于 2008-5-26 16:49:42 | 显示全部楼层
youbest:
看来和预料的一样,configure完成了,不过你这个应该是在binutils-build里,最好别在binutils代码的目录里.

能否具体说清楚点不?
回复 支持 反对

使用道具 举报

发表于 2008-5-26 16:54:23 | 显示全部楼层
哪位已经解决了这个问题,给我点提示,谢谢~
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表