LinuxSir.cn,穿越时空的Linuxsir!

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

建构交叉编译环境不成功!!!???

[复制链接]
发表于 2006-3-23 22:46:33 | 显示全部楼层 |阅读模式
  1. mazarine lzj # crossdev -t i686-pc-linux-gnu
  2. -------------------------------------------------------------------------------- * Host Portage ARCH:     amd64
  3. * Target Portage ARCH:   x86
  4. * Target System:         i686-pc-linux-gnu
  5. * Stage:                 4 (C/C++ compiler)

  6. * binutils:              binutils-[latest]
  7. * gcc:                   gcc-[latest]
  8. * headers:               linux-headers-[latest]
  9. * libc:                  glibc-[latest]

  10. * PORTDIR_OVERLAY:       /usr/local/portage
  11. * PORT_LOGDIR:           /var/log/portage
  12. * PKGDIR:                /usr/portage/packages/cross/i686-pc-linux-gnu
  13. * PORTAGE_TMPDIR:        /var/tmp/cross/i686-pc-linux-gnu
  14.   _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -
  15. * Forcing the latest versions of binutils-config/gcc-config ...          [ ok ] * Log: /var/log/portage/cross-i686-pc-linux-gnu-binutils.log
  16. * Emerging cross-binutils ...                                            [ ok ] * Log: /var/log/portage/cross-i686-pc-linux-gnu-gcc-stage1.log
  17. * Emerging cross-gcc-stage1 ...                                          [ ok ] * Log: /var/log/portage/cross-i686-pc-linux-gnu-linux-headers.log
  18. * Emerging cross-linux-headers ...                                       [ ok ] * Log: /var/log/portage/cross-i686-pc-linux-gnu-glibc.log
  19. * Emerging cross-glibc ...                                               [ ok ] * Log: /var/log/portage/cross-i686-pc-linux-gnu-gcc-stage2.log
  20. * Emerging cross-gcc-stage2 ...

  21. * gcc failed :(
  22. * If you file a bug, please attach the following logfiles:
  23. * /var/log/portage/cross-i686-pc-linux-gnu-info.log
  24. * /var/log/portage/cross-i686-pc-linux-gnu-gcc-stage2.log
复制代码
 楼主| 发表于 2006-3-23 22:57:43 | 显示全部楼层
查看 /var/log/portage/cross-i686-pc-linux-gnu-gcc-stage2.log:

  1. collect2: ld 返回 1
  2. make[3]: *** [libgcc_s.so] 错误 1
  3. make[3]: Leaving directory `/var/tmp/cross/i686-pc-linux-gnu/portage/gcc-4.1.0/work/build/gcc'
  4. make[2]: *** [libgcc.a] 错误 2
  5. make[2]: Leaving directory `/var/tmp/cross/i686-pc-linux-gnu/portage/gcc-4.1.0/work/build/gcc'
  6. make[1]: *** [all-gcc] 错误 2
  7. make[1]: Leaving directory `/var/tmp/cross/i686-pc-linux-gnu/portage/gcc-4.1.0/work/build'
  8. make: *** [all] 错误 2

  9. !!! ERROR: cross-i686-pc-linux-gnu/gcc-4.1.0 failed.
  10. Call stack:
  11.   ebuild.sh, line 1557:   Called dyn_compile
  12.   ebuild.sh, line 966:   Called src_compile
  13.   ebuild.sh, line 1272:   Called toolchain_src_compile
  14.   toolchain.eclass, line 24:   Called gcc_src_compile
  15.   toolchain.eclass, line 1487:   Called gcc_do_make

  16. !!! emake failed with all
  17. !!! If you need support, post the topmost build error, and the call stack if relevant.
复制代码


查看/var/log/portage/cross-i686-pc-linux-gnu-info.log:
  1. * Host Portage ARCH:     amd64
  2. * Target Portage ARCH:   x86
  3. * Target System:         i686-pc-linux-gnu
  4. * Stage:                 4 (C/C++ compiler)

  5. * binutils:              binutils-[latest]
  6. * gcc:                   gcc-[latest]
  7. * headers:               linux-headers-[latest]
  8. * libc:                  glibc-[latest]

  9. * PORTDIR_OVERLAY:       /usr/local/portage
  10. * PORT_LOGDIR:           /var/log/portage
  11. * PKGDIR:                /usr/portage/packages/cross/i686-pc-linux-gnu
  12. * PORTAGE_TMPDIR:        /var/tmp/cross/i686-pc-linux-gnu
  13.   _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  ~  -  _  -  
  14. Gentoo Base System version 1.12.0_pre16
  15. Portage 2.1_pre6-r3 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.15-gentoo-r7 x86_64)
  16. =================================================================
  17. System uname: 2.6.15-gentoo-r7 x86_64 AMD Athlon(tm) 64 Processor 3000+
  18. distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
  19. dev-lang/python:     2.4.2-r1
  20. sys-apps/sandbox:    1.2.17
  21. sys-devel/autoconf:  2.13, 2.59-r7
  22. sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
  23. sys-devel/binutils:  2.16.1-r2
  24. sys-devel/libtool:   1.5.22
  25. virtual/os-headers:  2.6.11-r3
  26. ACCEPT_KEYWORDS="amd64 ~amd64"
  27. AUTOCLEAN="yes"
  28. CBUILD="x86_64-pc-linux-gnu"
  29. CFLAGS="-march=k8 -O3 -pipe -fomit-frame-pointer"
  30. CHOST="x86_64-pc-linux-gnu"
  31. CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib64/mozilla/defaults/pref /usr/share/config /var/qmail/control"
  32. CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
  33. CXXFLAGS="-march=k8 -O3 -pipe -fomit-frame-pointer"
  34. DISTDIR="/usr/portage/distfiles"
  35. FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
  36. GENTOO_MIRRORS="http://dxmirror.vmmatrix.net/Gentoo/ ftp://gg3.net/pub/linux/gentoo/"
  37. LANG="zh_CN.UTF-8"
  38. LC_ALL="zh_CN.UTF-8"
  39. MAKEOPTS="-j2"
  40. PKGDIR="/usr/portage/packages/cross/i686-pc-linux-gnu"
  41. PORTAGE_TMPDIR="/var/tmp/cross/i686-pc-linux-gnu"
  42. PORTDIR="/usr/portage"
  43. PORTDIR_OVERLAY="/usr/local/portage"
  44. SYNC="rsync://rsync.asia.gentoo.org/gentoo-portage"
  45. USE="amd64 X alsa apache2 avi berkdb bitmap-fonts cjk cli crypt ctype cups dba dri emboss encode expat fastbuild foomaticdb force-cgi-redirect fortran ftp gd gif gnome gpm gstreamer gtk gtk2 imlib jpeg lzw lzw-tiff memlimit mp3 mpeg ncurses nls nptl nptlonly nvidia opengl oss pam pcre pdflib perl png posix python quicktime readline sdl session simplexml soap sockets spell spl ssl tcpd tiff tokenizer truetype truetype-fonts type1-fonts usb xml xpm xsl xv zlib elibc_glibc kernel_linux userland_GNU"
  46. Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LDFLAGS, LINGUAS
复制代码


我要怎样不让它安装gcc-4.1.0的版本呢?真是郁闷啊~~;(
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-23 23:09:09 | 显示全部楼层
是不是因为版本的问题呢?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-24 21:11:05 | 显示全部楼层
求助!!!!!
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-3-31 00:05:58 | 显示全部楼层
已解决,经过摸索,只要这样就通过了:
  1. USE="-fortran nossp" crossdev --gcc 3.4.6 -t i686-pc-linux-gnu
复制代码
回复 支持 反对

使用道具 举报

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

本版积分规则

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