LinuxSir.cn,穿越时空的Linuxsir!

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

lfs最后一步了,编译grub出错

[复制链接]
发表于 2007-8-24 10:25:03 | 显示全部楼层 |阅读模式
我已经编译完了lfs,只差grub,现在进入到了lfs系统中了,打算在lfs中编译grub,但是不成功能

checking for C compiler default output file name... configure: error: C compiler cannot create executables
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 GRUB configure 0.97, which was
  4. generated by GNU Autoconf 2.59.  Invocation command line was

  5.   $ ./configure

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

  9. hostname = lfs
  10. uname -m = x86_64
  11. uname -r = 2.6.21.5
  12. uname -s = Linux
  13. uname -v = #4 SMP PREEMPT Fri Jul 27 07:02:17 CST 2007

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

  16. /bin/arch              = x86_64
  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: /sbin
  24. PATH: /bin
  25. PATH: /usr/sbin
  26. PATH: /usr/bin


  27. ## ----------- ##
  28. ## Core tests. ##
  29. ## ----------- ##

  30. configure:1434: checking for a BSD-compatible install
  31. configure:1489: result: /usr/bin/install -c
  32. configure:1500: checking whether build environment is sane
  33. configure:1543: result: yes
  34. configure:1608: checking for gawk
  35. configure:1624: found /usr/bin/gawk
  36. configure:1634: result: gawk
  37. configure:1644: checking whether make sets $(MAKE)
  38. configure:1664: result: yes
  39. configure:1839: checking build system type
  40. configure:1857: result: x86_64-unknown-linux-gnu
  41. configure:1865: checking host system type
  42. configure:1879: result: x86_64-unknown-linux-gnu
  43. configure:1903: checking whether to enable maintainer-specific portions of Makefiles
  44. configure:1912: result: no
  45. configure:2028: checking for gcc
  46. configure:2044: found /usr/bin/gcc
  47. configure:2054: result: gcc
  48. configure:2112: checking for gcc
  49. configure:2138: result: gcc
  50. configure:2382: checking for C compiler version
  51. configure:2385: gcc --version </dev/null >&5
  52. gcc (GCC) 4.1.2
  53. Copyright (C) 2006 Free Software Foundation, Inc.
  54. This is free software; see the source for copying conditions.  There is NO
  55. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  56. configure:2388: $? = 0
  57. configure:2390: gcc -v </dev/null >&5
  58. Using built-in specs.
  59. Target: x86_64-unknown-linux-gnu
  60. Configured with: ../gcc-4.1.2/configure --prefix=/usr --libexecdir=/usr/lib --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++ --disable-multilib
  61. Thread model: posix
  62. gcc version 4.1.2
  63. configure:2393: $? = 0
  64. configure:2395: gcc -V </dev/null >&5
  65. gcc: '-V' option must have argument
  66. configure:2398: $? = 1
  67. configure:2421: checking for C compiler default output file name
  68. configure:2424: gcc -m32    conftest.c  >&5
  69. /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.1.2/./libgcc.a when searching for -lgcc
  70. /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-unknown-linux-gnu/4.1.2/./libgcc.a when searching for -lgcc
  71. /usr/bin/ld: cannot find -lgcc
  72. collect2: ld returned 1 exit status
  73. configure:2427: $? = 1
  74. configure: failed program was:
  75. | /* confdefs.h.  */
  76. |
  77. | #define PACKAGE_NAME "GRUB"
  78. | #define PACKAGE_TARNAME "grub"
  79. | #define PACKAGE_VERSION "0.97"
  80. | #define PACKAGE_STRING "GRUB 0.97"
  81. | #define PACKAGE_BUGREPORT "bug-grub@gnu.org"
  82. | #define PACKAGE "grub"
  83. | #define VERSION "0.97"
  84. | /* end confdefs.h.  */
  85. |
  86. | int
  87. | main ()
  88. | {
  89. |
  90. |   ;
  91. |   return 0;
  92. | }
  93. configure:2466: error: C compiler cannot create executables
  94. See `config.log' for more details.

  95. ## ---------------- ##
  96. ## Cache variables. ##
  97. ## ---------------- ##

  98. ac_cv_build=x86_64-unknown-linux-gnu
  99. ac_cv_build_alias=x86_64-unknown-linux-gnu
  100. ac_cv_env_CC_set=
  101. ac_cv_env_CC_value=
  102. ac_cv_env_CFLAGS_set=
  103. ac_cv_env_CFLAGS_value=
  104. ac_cv_env_CPPFLAGS_set=
  105. ac_cv_env_CPPFLAGS_value=
  106. ac_cv_env_CPP_set=
  107. ac_cv_env_CPP_value=
  108. ac_cv_env_LDFLAGS_set=
  109. ac_cv_env_LDFLAGS_value=
  110. ac_cv_env_build_alias_set=
  111. ac_cv_env_build_alias_value=
  112. ac_cv_env_host_alias_set=
  113. ac_cv_env_host_alias_value=
  114. ac_cv_env_target_alias_set=
  115. ac_cv_env_target_alias_value=
  116. ac_cv_host=x86_64-unknown-linux-gnu
  117. ac_cv_host_alias=x86_64-unknown-linux-gnu
  118. ac_cv_path_install='/usr/bin/install -c'
  119. ac_cv_prog_AWK=gawk
  120. ac_cv_prog_ac_ct_CC=gcc
  121. ac_cv_prog_make_make_set=yes

  122. ## ----------------- ##
  123. ## Output variables. ##
  124. ## ----------------- ##

  125. ACLOCAL='${SHELL} /sources/grub-0.97/missing --run aclocal-1.9'
  126. AMDEPBACKSLASH=''
  127. AMDEP_FALSE=''
  128. AMDEP_TRUE=''
  129. AMTAR='${SHELL} /sources/grub-0.97/missing --run tar'
  130. AUTOCONF='${SHELL} /sources/grub-0.97/missing --run autoconf'
  131. AUTOHEADER='${SHELL} /sources/grub-0.97/missing --run autoheader'
  132. AUTOMAKE='${SHELL} /sources/grub-0.97/missing --run automake-1.9'
  133. AWK='gawk'
  134. BUILD_EXAMPLE_KERNEL_FALSE=''
  135. BUILD_EXAMPLE_KERNEL_TRUE=''
  136. CC='gcc'
  137. CCAS=''
  138. CCASFLAGS=''
  139. CCDEPMODE=''
  140. CFLAGS='-m32 '
  141. CPP=''
  142. CPPFLAGS=''
  143. CYGPATH_W='echo'
  144. DEFS=''
  145. DEPDIR=''
  146. DISKLESS_SUPPORT_FALSE=''
  147. DISKLESS_SUPPORT_TRUE=''
  148. ECHO_C=''
  149. ECHO_N='-n'
  150. ECHO_T=''
  151. EGREP=''
  152. EXEEXT=''
  153. FSYS_CFLAGS=''
  154. GRUB_CFLAGS=''
  155. GRUB_LIBS=''
  156. HERCULES_SUPPORT_FALSE=''
  157. HERCULES_SUPPORT_TRUE=''
  158. INSTALL_DATA='${INSTALL} -m 644'
  159. INSTALL_PROGRAM='${INSTALL}'
  160. INSTALL_SCRIPT='${INSTALL}'
  161. INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
  162. LDFLAGS=''
  163. LIBOBJS=''
  164. LIBS=''
  165. LTLIBOBJS=''
  166. MAINT='#'
  167. MAINTAINER_MODE_FALSE=''
  168. MAINTAINER_MODE_TRUE='#'
  169. MAKEINFO='${SHELL} /sources/grub-0.97/missing --run makeinfo'
  170. NETBOOT_DRIVERS=''
  171. NETBOOT_SUPPORT_FALSE=''
  172. NETBOOT_SUPPORT_TRUE=''
  173. NET_CFLAGS=''
  174. NET_EXTRAFLAGS=''
  175. OBJCOPY=''
  176. OBJEXT=''
  177. PACKAGE='grub'
  178. PACKAGE_BUGREPORT='bug-grub@gnu.org'
  179. PACKAGE_NAME='GRUB'
  180. PACKAGE_STRING='GRUB 0.97'
  181. PACKAGE_TARNAME='grub'
  182. PACKAGE_VERSION='0.97'
  183. PATH_SEPARATOR=':'
  184. PERL=''
  185. RANLIB=''
  186. SERIAL_SPEED_SIMULATION_FALSE=''
  187. SERIAL_SPEED_SIMULATION_TRUE=''
  188. SERIAL_SUPPORT_FALSE=''
  189. SERIAL_SUPPORT_TRUE=''
  190. SET_MAKE=''
  191. SHELL='/bin/sh'
  192. STAGE1_CFLAGS=''
  193. STAGE2_CFLAGS=''
  194. STRIP=''
  195. VERSION='0.97'
  196. ac_ct_CC='gcc'
  197. ac_ct_OBJCOPY=''
  198. ac_ct_RANLIB=''
  199. ac_ct_STRIP=''
  200. am__fastdepCC_FALSE=''
  201. am__fastdepCC_TRUE=''
  202. am__include=''
  203. am__leading_dot='.'
  204. am__quote=''
  205. am__tar='${AMTAR} chof - "$$tardir"'
  206. am__untar='${AMTAR} xf -'
  207. bindir='${exec_prefix}/bin'
  208. build='x86_64-unknown-linux-gnu'
  209. build_alias=''
  210. build_cpu='x86_64'
  211. build_os='linux-gnu'
  212. build_vendor='unknown'
  213. datadir='${prefix}/share'
  214. exec_prefix='NONE'
  215. host='x86_64-unknown-linux-gnu'
  216. host_alias=''
  217. host_cpu='x86_64'
  218. host_os='linux-gnu'
  219. host_vendor='unknown'
  220. includedir='${prefix}/include'
  221. infodir='${prefix}/info'
  222. install_sh='/sources/grub-0.97/install-sh'
  223. libdir='${exec_prefix}/lib'
  224. libexecdir='${exec_prefix}/libexec'
  225. localstatedir='${prefix}/var'
  226. mandir='${prefix}/man'
  227. mkdir_p='mkdir -p --'
  228. oldincludedir='/usr/include'
  229. prefix='NONE'
  230. program_transform_name='s,x,x,'
  231. sbindir='${exec_prefix}/sbin'
  232. sharedstatedir='${prefix}/com'
  233. sysconfdir='${prefix}/etc'
  234. target_alias=''

  235. ## ----------- ##
  236. ## confdefs.h. ##
  237. ## ----------- ##

  238. #define PACKAGE "grub"
  239. #define PACKAGE_BUGREPORT "bug-grub@gnu.org"
  240. #define PACKAGE_NAME "GRUB"
  241. #define PACKAGE_STRING "GRUB 0.97"
  242. #define PACKAGE_TARNAME "grub"
  243. #define PACKAGE_VERSION "0.97"
  244. #define VERSION "0.97"

  245. configure: exit 77
复制代码
发表于 2007-8-26 15:21:52 | 显示全部楼层
貌似你这个是 CLFS 64 bit 系统,不是 LFS,好像是 Pure64,不是 mulitilib,发问时应说明清楚

Grub 是不能以 64 bit 来编译的,手册里已有说明,请以 32 bit 方式来编译 http://cross-lfs.org/view/svn/x86_64/final-system/grub.html
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-26 15:57:06 | 显示全部楼层
我做的是x86_64-64没有mulitilib

我还是用lilo吧,我看手册上说可以使用lilo。哎这东西已经很多年没有用了
回复 支持 反对

使用道具 举报

发表于 2007-8-26 16:01:05 | 显示全部楼层
如果没有猜错,你的系统是 CLFS Pure64 了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-8-26 16:05:04 | 显示全部楼层
是的用jhalfs做的一个64位的系统
回复 支持 反对

使用道具 举报

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

本版积分规则

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