LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
楼主: kimux

gcc4.3.2编不过去... 谁帮我看一下

[复制链接]
 楼主| 发表于 2009-1-20 18:21:33 | 显示全部楼层
Post by newper;1940094
看来是我错了,或许不能用这个手册。不好意思问一下你现在做到第5.8节还是6.4节


额。。我看错了,还没到6。4节  :D
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-1-20 18:39:35 | 显示全部楼层
glibc 编不过去了 ..

  1. clfs:/mnt/clfs/sources/glibc-build$ BUILD_CC="gcc" CC="${CLFS_TARGET}-gcc" AR="${CLFS_TARGET}-ar" RANLIB="${CLFS_TARGET}-ranlib" CFLAGS="-march=$(cut -d- -f1 <<< $CLFS_TARGET) -mtune=generic -g -O2" ../glibc-2.9-20090119/configure --prefix=/tools --host=${CLFS_TARGET} --build=${CLFS_HOST} --disable-profile --enable-add-ons --with-tls --enable-kernel=2.6.0 --with-__thread --with-binutils=/cross-tools/bin --with-headers=/tools/include --cache-file=config.cache
  2. configure: loading cache config.cache
  3. checking build system type... x86_64-cross-linux-gnu
  4. checking host system type... x86_64-unknown-linux-gnu
  5. configure: running configure fragment for add-on libidn
  6. configure: running configure fragment for add-on nptl
  7. checking sysdep dirs... sysdeps/x86_64/elf nptl/sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/wordsize-64 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet nptl/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/x86_64 nptl/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/x86_64/fpu nptl/sysdeps/x86_64 sysdeps/x86_64 sysdeps/wordsize-64 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
  8. checking for a BSD-compatible install... /bin/install -c
  9. checking whether ln -s works... yes
  10. checking for x86_64-unknown-linux-gnu-gcc... x86_64-unknown-linux-gnu-gcc
  11. checking for suffix of object files... configure: error: cannot compute suffix of object files: cannot compile
  12. See `config.log' for more details.
  13. clfs:/mnt/clfs/sources/glibc-build$
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-1-20 18:49:42 | 显示全部楼层
config.log
  1. clfs:/mnt/clfs/sources/glibc-build$ cat config.log  
  2. This file contains any messages produced by compilers while
  3. running configure, to aid debugging if configure makes a mistake.
  4. It was created by GNU C Library configure (see version.h), which was
  5. generated by GNU Autoconf 2.61.  Invocation command line was
  6.   $ ../glibc-2.9-20090119/configure --prefix=/tools --host=x86_64-unknown-linux-gnu --build=x86_64-cross-linux-gnu --disable-profile --enable-add-ons --with-tls --enable-kernel=2.6.0 --with-__thread --with-binutils=/cross-tools/bin --with-headers=/tools/include --cache-file=config.cache
  7. ## --------- ##
  8. ## Platform. ##
  9. ## --------- ##
  10. hostname = Boxer
  11. uname -m = x86_64
  12. uname -r = 2.6.28-ARCH
  13. uname -s = Linux
  14. uname -v = #1 SMP PREEMPT Tue Jan 6 09:25:48 UTC 2009
  15. /usr/bin/uname -p = unknown
  16. /bin/uname -X     = unknown
  17. /bin/arch              = x86_64
  18. /usr/bin/arch -k       = unknown
  19. /usr/convex/getsysinfo = unknown
  20. /usr/bin/hostinfo      = unknown
  21. /bin/machine           = unknown
  22. /usr/bin/oslevel       = unknown
  23. /bin/universe          = unknown
  24. PATH: /cross-tools/bin
  25. PATH: /bin
  26. PATH: /usr/bin
  27. ## ----------- ##
  28. ## Core tests. ##
  29. ## ----------- ##
  30. configure:1753: loading cache config.cache
  31. configure:2183: checking build system type
  32. configure:2201: result: x86_64-cross-linux-gnu
  33. configure:2223: checking host system type
  34. configure:2238: result: x86_64-unknown-linux-gnu
  35. configure:2418: running configure fragment for add-on libidn
  36. configure:2418: running configure fragment for add-on nptl
  37. configure:2555: checking sysdep dirs
  38. configure:2791: result: sysdeps/generic/elf sysdeps/generic
  39. configure:2869: checking for a BSD-compatible install
  40. configure:2925: result: /bin/install -c
  41. configure:2940: checking whether ln -s works
  42. configure:2944: result: yes
  43. configure:2960: checking for x86_64-unknown-linux-gnu-gcc
  44. configure:2987: result: x86_64-unknown-linux-gnu-gcc
  45. configure:3265: checking for C compiler version
  46. configure:3272: x86_64-unknown-linux-gnu-gcc --version >&5
  47. x86_64-unknown-linux-gnu-gcc (GCC) 4.3.2
  48. Copyright (C) 2008 Free Software Foundation, Inc.
  49. This is free software; see the source for copying conditions.  There is NO
  50. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  51. configure:3275: $? = 0
  52. configure:3282: x86_64-unknown-linux-gnu-gcc -v >&5
  53. Using built-in specs.
  54. Target: x86_64-unknown-linux-gnu
  55. Configured with: ../gcc-4.3.2/configure --prefix=/cross-tools --build=x86_64-cross-linux-gnu --host=x86_64-cross-linux-gnu --target=x86_64-unknown-linux-gnu --with-sysroot=/mnt/clfs --with-local-prefix=/tools --disable-nls --disable-shared --with-mpfr=/cross-tools --with-gmp=/cross-tools --without-headers --with-newlib --disable-decimal-float --disable-libgomp --disable-libmudflap --disable-libssp --disable-threads --enable-languages=c --disable-multilib
  56. Thread model: single
  57. gcc version 4.3.2 (GCC)
  58. configure:3285: $? = 0
  59. configure:3292: x86_64-unknown-linux-gnu-gcc -V >&5
  60. x86_64-unknown-linux-gnu-gcc: '-V' option must have argument
  61. configure:3295: $? = 1
  62. configure:3299: checking for suffix of object files
  63. configure:3325: x86_64-unknown-linux-gnu-gcc -c -march=x86_64 -mtune=generic -g -O2  conftest.c >&5
  64. conftest.c:1: error: bad value (x86_64) for -march= switch
  65. configure:3328: $? = 1
  66. configure: failed program was:
  67. | /* confdefs.h.  */
  68. | #define PACKAGE_NAME "GNU C Library"
  69. | #define PACKAGE_TARNAME "c-library"
  70. | #define PACKAGE_VERSION "(see version.h)"
  71. | #define PACKAGE_STRING "GNU C Library (see version.h)"
  72. | #define PACKAGE_BUGREPORT "glibc"
  73. | #define HAVE_LIBIDN 1
  74. | /* end confdefs.h.  */
  75. |
  76. | int
  77. | main ()
  78. | {
  79. |
  80. |   ;
  81. |   return 0;
  82. | }
  83. configure:3343: error: cannot compute suffix of object files: cannot compile
  84. See `config.log' for more details.
  85. ## ---------------- ##
  86. ## Cache variables. ##
  87. ## ---------------- ##
  88. ac_cv_build=x86_64-cross-linux-gnu
  89. ac_cv_env_CCC_set=
  90. ac_cv_env_CCC_value=
  91. ac_cv_env_CC_set=set
  92. ac_cv_env_CC_value=x86_64-unknown-linux-gnu-gcc
  93. ac_cv_env_CFLAGS_set=set
  94. ac_cv_env_CFLAGS_value='-march=x86_64 -mtune=generic -g -O2'
  95. ac_cv_env_CPPFLAGS_set=
  96. ac_cv_env_CPPFLAGS_value=
  97. ac_cv_env_CPP_set=
  98. ac_cv_env_CPP_value=
  99. ac_cv_env_CXXFLAGS_set=
  100. ac_cv_env_CXXFLAGS_value=
  101. ac_cv_env_CXX_set=
  102. ac_cv_env_CXX_value=
  103. ac_cv_env_LDFLAGS_set=
  104. ac_cv_env_LDFLAGS_value=
  105. ac_cv_env_LIBS_set=
  106. ac_cv_env_LIBS_value=
  107. ac_cv_env_build_alias_set=set
  108. ac_cv_env_build_alias_value=x86_64-cross-linux-gnu
  109. ac_cv_env_host_alias_set=set
  110. ac_cv_env_host_alias_value=x86_64-unknown-linux-gnu
  111. ac_cv_env_target_alias_set=
  112. ac_cv_env_target_alias_value=
  113. ac_cv_host=x86_64-unknown-linux-gnu
  114. ac_cv_path_install='/bin/install -c'
  115. ac_cv_prog_CC=x86_64-unknown-linux-gnu-gcc
  116. libc_cv_c_cleanup=yes
  117. libc_cv_forced_unwind=yes
  118. libc_cv_gnu99_inline=yes
  119. ## ----------------- ##
  120. ## Output variables. ##
  121. ## ----------------- ##
  122. AR='x86_64-unknown-linux-gnu-ar'
  123. AS=''
  124. ASFLAGS_config=''
  125. AUTOCONF=''
  126. AWK=''
  127. BASH_SHELL=''
  128. BISON=''
  129. BUILD_CC='gcc'
  130. CC='x86_64-unknown-linux-gnu-gcc'
  131. CFLAGS='-march=x86_64 -mtune=generic -g -O2'
  132. CPP=''
  133. CPPFLAGS=''
  134. CXX=''
  135. CXXFLAGS=''
  136. CXX_SYSINCLUDES=''
  137. DEFINES=''
  138. DEFS=''
  139. ECHO_C=''
  140. ECHO_N='-n'
  141. ECHO_T=''
  142. EGREP=''
  143. GREP=''
  144. INSTALL_DATA='${INSTALL} -m 644'
  145. INSTALL_INFO=''
  146. INSTALL_PROGRAM='${INSTALL}'
  147. INSTALL_SCRIPT='${INSTALL}'
  148. KSH=''
  149. LD=''
  150. LDFLAGS=''
  151. LIBGD=''
  152. LIBOBJS=''
  153. LIBS=''
  154. LN_S='ln -s'
  155. LTLIBOBJS=''
  156. MAKE=''
  157. MAKEINFO=''
  158. MIG=''
  159. MSGFMT=''
  160. OBJDUMP=''
  161. OBJEXT=''
  162. PACKAGE_BUGREPORT='glibc'
  163. PACKAGE_NAME='GNU C Library'
  164. PACKAGE_STRING='GNU C Library (see version.h)'
  165. PACKAGE_TARNAME='c-library'
  166. PACKAGE_VERSION='(see version.h)'
  167. PATH_SEPARATOR=':'
  168. PERL=''
  169. PWD_P=''
  170. RANLIB='x86_64-unknown-linux-gnu-ranlib'
  171. RELEASE=''
  172. SED=''
  173. SHELL='/bin/sh'
  174. SYSINCLUDES=''
  175. VERSION=''
  176. VERSIONING=''
  177. ac_ct_CC=''
  178. ac_ct_CXX=''
  179. add_on_subdirs=' libidn'
  180. add_ons='libidn nptl'
  181. all_warnings=''
  182. base_machine='x86_64'
  183. bindir='${exec_prefix}/bin'
  184. bindnow='no'
  185. bounded='no'
  186. build='x86_64-cross-linux-gnu'
  187. build_alias='x86_64-cross-linux-gnu'
  188. build_cpu='x86_64'
  189. build_os='linux-gnu'
  190. build_vendor='cross'
  191. cross_compiling='yes'
  192. datadir='${datarootdir}'
  193. datarootdir='${prefix}/share'
  194. docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
  195. dvidir='${docdir}'
  196. elf='yes'
  197. enable_check_abi='no'
  198. exceptions=''
  199. exec_prefix='NONE'
  200. fno_unit_at_a_time=''
  201. force_install='yes'
  202. have_libaudit=''
  203. have_libcap=''
  204. have_selinux=''
  205. host='x86_64-unknown-linux-gnu'
  206. host_alias='x86_64-unknown-linux-gnu'
  207. host_cpu='x86_64'
  208. host_os='linux-gnu'
  209. host_vendor='unknown'
  210. htmldir='${docdir}'
  211. includedir='${prefix}/include'
  212. infodir='${datarootdir}/info'
  213. ldd_rewrite_script=''
  214. libc_cv_Bgroup=''
  215. libc_cv_as_needed=''
  216. libc_cv_cc_submachine=''
  217. libc_cv_cc_with_libgcc_eh=''
  218. libc_cv_cc_with_libunwind=''
  219. libc_cv_cpp_asm_debuginfo=''
  220. libc_cv_forced_unwind='yes'
  221. libc_cv_fpie=''
  222. libc_cv_gcc_static_libgcc=''
  223. libc_cv_gcc_unwind_find_fde=''
  224. libc_cv_gnu89_inline=''
  225. libc_cv_hashstyle=''
  226. libc_cv_have_bash2=''
  227. libc_cv_have_initfini=''
  228. libc_cv_have_ksh=''
  229. libc_cv_libgcc_s_suffix=''
  230. libc_cv_localedir=''
  231. libc_cv_rootsbindir=''
  232. libc_cv_slibdir=''
  233. libc_cv_ssp=''
  234. libc_cv_sysconfdir=''
  235. libc_cv_z_combreloc=''
  236. libc_cv_z_execstack=''
  237. libdir='${exec_prefix}/lib'
  238. libexecdir='${exec_prefix}/libexec'
  239. localedir='${datarootdir}/locale'
  240. localstatedir='${prefix}/var'
  241. mach_interface_list=''
  242. mandir='${datarootdir}/man'
  243. no_whole_archive=''
  244. nopic_initfini=''
  245. old_glibc_headers=''
  246. oldest_abi='default'
  247. oldincludedir='/usr/include'
  248. omitfp='no'
  249. pdfdir='${docdir}'
  250. pic_default=''
  251. prefix='/tools'
  252. profile='no'
  253. program_transform_name='s,x,x,'
  254. psdir='${docdir}'
  255. sbindir='${exec_prefix}/sbin'
  256. shared='default'
  257. sharedstatedir='${prefix}/com'
  258. sizeof_long_double=''
  259. static='yes'
  260. static_nss='no'
  261. subdirs=' '
  262. submachine=''
  263. sysconfdir='${prefix}/etc'
  264. sysdeps_add_ons=' nptl'
  265. sysnames=' sysdeps/x86_64/elf nptl/sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/x86_64 sysdeps/unix/sysv/linux/wordsize-64 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet nptl/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/x86_64 nptl/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/x86_64/fpu nptl/sysdeps/x86_64 sysdeps/x86_64 sysdeps/wordsize-64 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic'
  266. target_alias=''
  267. uname_release=''
  268. uname_sysname=''
  269. uname_version=''
  270. use_ldconfig=''
  271. with_cvs='no'
  272. with_fp='yes'
  273. xcoff='no'
  274. ## ----------- ##
  275. ## confdefs.h. ##
  276. ## ----------- ##
  277. #define PACKAGE_NAME "GNU C Library"
  278. #define PACKAGE_TARNAME "c-library"
  279. #define PACKAGE_VERSION "(see version.h)"
  280. #define PACKAGE_STRING "GNU C Library (see version.h)"
  281. #define PACKAGE_BUGREPORT "glibc"
  282. #define HAVE_LIBIDN 1
  283. configure: exit 1
复制代码
回复 支持 反对

使用道具 举报

发表于 2009-1-20 18:50:28 | 显示全部楼层
把CC="${CLFS_TARGET}-gcc" 改成 CC="${CLFS_TARGET}-gcc -m64"
可是这样一改以后每个包都要改,就成了Pure64了,还不如直接去看Pure64手册
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-1-20 18:52:36 | 显示全部楼层
conftest.c:1: error: bad value (x86_64) for -march= switch
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-1-20 18:53:52 | 显示全部楼层
Post by newper;1940107
把CC="${CLFS_TARGET}-gcc" 改成 CC="${CLFS_TARGET}-gcc -m64"
可是这样一改以后每个包都要改,就成了Pure64了,还不如直接去看Pure64手册




看来也没必要继续下去了。。。
回复 支持 反对

使用道具 举报

发表于 2009-1-20 18:56:07 | 显示全部楼层
Sorry 去看Pure64手册吧,还好只要接下去就可以了,不要重来
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-1-20 18:58:24 | 显示全部楼层
我打算重来

反正我很闲。。

这次要好好准备准备。。。一次成功最好

话说我刚才第一遍GCC  make的时候加了 -j3 只用了不到3分钟。。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-1-20 19:04:58 | 显示全部楼层
Post by 聚焦深空;1940063
http://cross-lfs.org/view/svn/native64/
这个是针对 x86_64 的。

个人不建议您使用 "native" 系列的两个手册,太新没有足够验证,如果您不介意,可以继续。

建议您使用稳定版,CLFS-1.1.0。
http://cross-lfs.org/view/1.1.0/

如果您激进些,可参考 CLFS-Sysroot,官方无x86_64手册,但您可以参考偶、地球发动机 的精华贴。
http://cross-lfs.org/view/clfs-sysroot/
http://www.linuxsir.cn/bbs/thread331921.html 帖子里东西有些老,等过些时间更新。pure64
http://www.linuxsir.cn/bbs/thread326858.html 帖子里东西也有些老。mulitlib


多谢指教
http://cross-lfs.org/view/svn/x86_64-64/  或者

http://cross-lfs.org/view/svn/x86_64/

如何呢?
回复 支持 反对

使用道具 举报

发表于 2009-1-20 20:05:49 | 显示全部楼层
Post by kimux;1940113
多谢指教
http://cross-lfs.org/view/svn/x86_64-64/  或者

http://cross-lfs.org/view/svn/x86_64/

如何呢?

还好,不过它们也是开发版本。
偶有点怀疑用其进行"伪交叉编译"(x86_64-cross-linux-gnu -> x86_64-unknown-linux-gnu)的临时系统的纯度,这个要实际做才能验证。
如果您使用这两个手册进行真正的交叉编译成功,也可以从侧面验证偶的猜测错误。(如使用 i686 的宿主系统: i686-cross-linux-gnu -> x86_64-unknown-linux-gnu)
回复 支持 反对

使用道具 举报

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

本版积分规则

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