LinuxSir.cn,穿越时空的Linuxsir!

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

做CLFS第10章,编译sed出错,为什么我老是出错?

[复制链接]
发表于 2007-9-17 10:29:27 | 显示全部楼层 |阅读模式
刚装好了gcc,GCC的测试也通过了。
怎么sed连.configurg都过不了?难道我的GCC安装的不对?

  1. root:/sources/sed-4.1.5#  CC="gcc ${BUILD64}" ./configure --prefix=/usr \
  2. >     --bindir=/bin --enable-html
  3. checking for a BSD-compatible install... /tools/bin/install -c
  4. checking whether build environment is sane... yes
  5. checking for gawk... gawk
  6. checking whether make sets $(MAKE)... yes
  7. checking for gcc... gcc -m64
  8. checking for C compiler default output file name... configure: error: C compiler cannot create executables
  9. See `config.log' for more details.
复制代码


以下是config.log的内容
  1. This file contains any messages produced by compilers while
  2. running configure, to aid debugging if configure makes a mistake.

  3. It was created by sed configure 4.1.5, which was
  4. generated by GNU Autoconf 2.59.  Invocation command line was

  5.   $ ./configure --prefix=/usr --bindir=/bin --enable-html

  6. ## --------- ##
  7. ## Platform. ##
  8. ## --------- ##

  9. hostname = lfs
  10. uname -m = x86_64
  11. uname -r = 2.6.22.5
  12. uname -s = Linux
  13. uname -v = #5 SMP Sat Sep 1 12:59:09 GMT 2007

  14. /usr/bin/uname -p = unknown
  15. /bin/uname -X     = unknown

  16. /bin/arch              = unknown
  17. /usr/bin/arch -k       = unknown
  18. /usr/convex/getsysinfo = unknown
  19. hostinfo               = unknown
  20. /bin/machine           = unknown
  21. /usr/bin/oslevel       = unknown
  22. /bin/universe          = unknown

  23. PATH: /bin
  24. PATH: /usr/bin
  25. PATH: /sbin
  26. PATH: /usr/sbin
  27. PATH: /tools/bin


  28. ## ----------- ##
  29. ## Core tests. ##
  30. ## ----------- ##

  31. configure:1376: checking for a BSD-compatible install
  32. configure:1431: result: /tools/bin/install -c
  33. configure:1442: checking whether build environment is sane
  34. configure:1485: result: yes
  35. configure:1550: checking for gawk
  36. configure:1566: found /tools/bin/gawk
  37. configure:1576: result: gawk
  38. configure:1586: checking whether make sets $(MAKE)
  39. configure:1606: result: yes
  40. configure:1829: checking for gcc
  41. configure:1855: result: gcc -m64
  42. configure:2099: checking for C compiler version
  43. configure:2102: gcc -m64 --version </dev/null >&5
  44. gcc (GCC) 4.2.1
  45. Copyright (C) 2007 Free Software Foundation, Inc.
  46. This is free software; see the source for copying conditions.  There is NO
  47. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  48. configure:2105: $? = 0
  49. configure:2107: gcc -m64 -v </dev/null >&5
  50. Using built-in specs.
  51. Target: x86_64-unknown-linux-gnu
  52. Configured with: ../gcc-4.2.1/configure --prefix=/usr --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-c99 --enable-long-long --enable-clocale=gnu --enable-languages=c,c++ --disable-libstdcxx-pch
  53. Thread model: posix
  54. gcc version 4.2.1
  55. configure:2110: $? = 0
  56. configure:2112: gcc -m64 -V </dev/null >&5
  57. gcc: '-V' must come at the start of the command line
  58. configure:2115: $? = 1
  59. configure:2138: checking for C compiler default output file name
  60. configure:2141: gcc -m64   x86_64-unknown-linux-gnu conftest.c  >&5
  61. gcc: x86_64-unknown-linux-gnu: No such file or directory
  62. configure:2144: $? = 1
  63. configure: failed program was:
  64. | /* confdefs.h.  */
  65. |
  66. | #define PACKAGE_NAME "sed"
  67. | #define PACKAGE_TARNAME "sed"
  68. | #define PACKAGE_VERSION "4.1.5"
  69. | #define PACKAGE_STRING "sed 4.1.5"
  70. | #define PACKAGE_BUGREPORT "bonzini@gnu.org"
  71. | #define PACKAGE "sed"
  72. | #define VERSION "4.1.5"
  73. | #define SED_FEATURE_VERSION "4.1"
  74. | /* end confdefs.h.  */
  75. |
  76. | int
  77. | main ()
  78. | {
  79. |
  80. |   ;
  81. |   return 0;
  82. | }
  83. configure:2183: error: C compiler cannot create executables
  84. See `config.log' for more details.

  85. ## ---------------- ##
  86. ## Cache variables. ##
  87. ## ---------------- ##

  88. ac_cv_env_CC_set=set
  89. ac_cv_env_CC_value='gcc -m64'
  90. ac_cv_env_CFLAGS_set=
  91. ac_cv_env_CFLAGS_value=
  92. ac_cv_env_CPPFLAGS_set=
  93. ac_cv_env_CPPFLAGS_value=
  94. ac_cv_env_CPP_set=
  95. ac_cv_env_CPP_value=
  96. ac_cv_env_LDFLAGS_set=set
  97. ac_cv_env_LDFLAGS_value=x86_64-unknown-linux-gnu
  98. ac_cv_env_build_alias_set=
  99. ac_cv_env_build_alias_value=
  100. ac_cv_env_host_alias_set=
  101. ac_cv_env_host_alias_value=
  102. ac_cv_env_target_alias_set=
  103. ac_cv_env_target_alias_value=
  104. ac_cv_path_install='/tools/bin/install -c'
  105. ac_cv_prog_AWK=gawk
  106. ac_cv_prog_ac_ct_CC='gcc -m64'
  107. ac_cv_prog_make_make_set=yes

  108. ## ----------------- ##
  109. ## Output variables. ##
  110. ## ----------------- ##

  111. ACLOCAL='${SHELL} /sources/sed-4.1.5/config/missing --run aclocal-1.9'
  112. ALLOCA=''
  113. AMDEPBACKSLASH=''
  114. AMDEP_FALSE=''
  115. AMDEP_TRUE=''
  116. AMTAR='${SHELL} /sources/sed-4.1.5/config/missing --run tar'
  117. AUTOCONF='${SHELL} /sources/sed-4.1.5/config/missing --run autoconf'
  118. AUTOHEADER='${SHELL} /sources/sed-4.1.5/config/missing --run autoheader'
  119. AUTOMAKE='${SHELL} /sources/sed-4.1.5/config/missing --run automake-1.9'
  120. AWK='gawk'
  121. BUILD_HTML_FALSE=''
  122. BUILD_HTML_TRUE=''
  123. BUILD_INCLUDED_LIBINTL=''
  124. CATOBJEXT=''
  125. CC='gcc -m64'
  126. CCDEPMODE=''
  127. CFLAGS=''
  128. CPP=''
  129. CPPFLAGS=''
  130. CYGPATH_W='echo'
  131. DATADIRNAME=''
  132. DEFS=''
  133. DEPDIR=''
  134. ECHO_C=''
  135. ECHO_N='-n'
  136. ECHO_T=''
  137. EGREP=''
  138. EXEEXT=''
  139. GENCAT=''
  140. GLIBC21=''
  141. GMSGFMT=''
  142. HAVE__BOOL=''
  143. INSTALL_DATA='${INSTALL} -m 644'
  144. INSTALL_PROGRAM='${INSTALL}'
  145. INSTALL_SCRIPT='${INSTALL}'
  146. INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
  147. INSTOBJEXT=''
  148. INTLBISON=''
  149. INTLLIBS=''
  150. INTLOBJS=''
  151. INTL_LIBTOOL_SUFFIX_PREFIX=''
  152. LDFLAGS='x86_64-unknown-linux-gnu'
  153. LIBICONV=''
  154. LIBINTL=''
  155. LIBOBJS=''
  156. LIBS=''
  157. LTLIBICONV=''
  158. LTLIBINTL=''
  159. LTLIBOBJS=''
  160. MAKEINFO='${SHELL} /sources/sed-4.1.5/config/missing --run makeinfo'
  161. MAKEINFO_HTML_FALSE=''
  162. MAKEINFO_HTML_TRUE=''
  163. MKINSTALLDIRS=''
  164. MSGFMT=''
  165. MSGMERGE=''
  166. OBJEXT=''
  167. PACKAGE='sed'
  168. PACKAGE_BUGREPORT='bonzini@gnu.org'
  169. PACKAGE_NAME='sed'
  170. PACKAGE_STRING='sed 4.1.5'
  171. PACKAGE_TARNAME='sed'
  172. PACKAGE_VERSION='4.1.5'
  173. PATH_SEPARATOR=':'
  174. POSUB=''
  175. RANLIB=''
  176. SED_FEATURE_VERSION='4.1'
  177. SET_MAKE=''
  178. SHELL='/bin/sh'
  179. STRIP=''
  180. TEST_REGEX_FALSE=''
  181. TEST_REGEX_TRUE=''
  182. TEXI2HTML=''
  183. TEXI2HTML_HTML_FALSE=''
  184. TEXI2HTML_HTML_TRUE=''
  185. USE_INCLUDED_LIBINTL=''
  186. USE_NLS=''
  187. VERSION='4.1.5'
  188. XGETTEXT=''
  189. ac_ct_CC='gcc -m64'
  190. ac_ct_RANLIB=''
  191. ac_ct_STRIP=''
  192. am__fastdepCC_FALSE=''
  193. am__fastdepCC_TRUE=''
  194. am__include=''
  195. am__leading_dot='.'
  196. am__quote=''
  197. am__tar='${AMTAR} chof - "$$tardir"'
  198. am__untar='${AMTAR} xf -'
  199. bindir='/bin'
  200. build=''
  201. build_alias=''
  202. build_cpu=''
  203. build_os=''
  204. build_vendor=''
  205. datadir='${prefix}/share'
  206. exec_prefix='NONE'
  207. host=''
  208. host_alias=''
  209. host_cpu=''
  210. host_os=''
  211. host_vendor=''
  212. includedir='${prefix}/include'
  213. infodir='${prefix}/info'
  214. install_sh='/sources/sed-4.1.5/config/install-sh'
  215. libdir='${exec_prefix}/lib'
  216. libexecdir='${exec_prefix}/libexec'
  217. localstatedir='${prefix}/var'
  218. mandir='${prefix}/man'
  219. mkdir_p='mkdir -p --'
  220. oldincludedir='/usr/include'
  221. prefix='/usr'
  222. program_transform_name='s,x,x,'
  223. sbindir='${exec_prefix}/sbin'
  224. sharedstatedir='${prefix}/com'
  225. sysconfdir='${prefix}/etc'
  226. target_alias=''

  227. ## ----------- ##
  228. ## confdefs.h. ##
  229. ## ----------- ##

  230. #define PACKAGE "sed"
  231. #define PACKAGE_BUGREPORT "bonzini@gnu.org"
  232. #define PACKAGE_NAME "sed"
  233. #define PACKAGE_STRING "sed 4.1.5"
  234. #define PACKAGE_TARNAME "sed"
  235. #define PACKAGE_VERSION "4.1.5"
  236. #define SED_FEATURE_VERSION "4.1"
  237. #define VERSION "4.1.5"

  238. configure: exit 77
复制代码
发表于 2007-9-17 12:07:05 | 显示全部楼层
如果前面都是对的,这里应该不会出错。
回复 支持 反对

使用道具 举报

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

本版积分规则

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