LinuxSir.cn,穿越时空的Linuxsir!

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

gcc错误--有兄弟们遇过吗?

[复制链接]
发表于 2005-5-24 09:00:57 | 显示全部楼层 |阅读模式
一台测试机--用的是"x86 ~x86" 某天突然emerge -u system出错,以为是gcc问题--从别的机器上quickpkg了一个稳定版3.3.5过来也不行。信息见下面:
Portage 2.0.51.21-r1 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.5-r0, 2.6.11-gentoo-r7 i686)
=================================================================
System uname: 2.6.11-gentoo-r7 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.11
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.8
sys-devel/autoconf:  2.59-r6
sys-devel/automake:  1.9.5
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=i686 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=i686 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://linux.ntcu.net/dists/gentoo/ http://gentoo.seren.com/gentoo http://mirror.gentoo.gr.jp http://gentoo.ccccom.com"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa apm arts avi berkdb bitmap-fonts crypt cups emboss encode foomaticdb fortran gdbm gif gnome gpm gtk gtk2 imlib ipv6 jpeg kde libg++ libwww mad mikmod motif mp3 mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline ruby sdl spell ssl svga tcpd truetype truetype-fonts type1-fonts xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

emerge -u system错误信息如下:/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/../../../../i686-pc-linux-gnu/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000008048600
i686-pc-linux-gnu-gcc -O3 -march=i686 -fomit-frame-pointer -pipe -Wall -Winline -D_FILE_OFFSET_BITS=64  -o bzip2 bzip2.o -L. -lbz2
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/../../../../i686-pc-linux-gnu/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000008048c20

Doing 6 tests (3 compress, 3 uncompress) ...
If there's a problem, things might stop at this point.

./bzip2 -1  < sample1.ref > sample1.rb2
/bin/sh: line 1: 19055 Illegal instruction     ./bzip2 -1 <sample1.ref >sample1.rb2
make: *** [test] Error 132

!!! ERROR: app-arch/bzip2-1.0.3-r3 failed.
!!! Function src_compile, Line 52, Exitcode 2
!!! Make failed
!!! If you need support, post the topmost build error, NOT this status message.

emerge -u world错误信息如下 * econf: updating wget-1.9.1/config.guess with /usr/share/gnuconfig/config.guess
* econf: updating wget-1.9.1/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=i686-pc-linux-gnu --sysconfdir=/etc/wget --with-ssl --enable-opie --enable-digest --enable-ipv6 --enable-nls --disable-debug --without-socks
configuring for GNU Wget 1.9.1
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /bin/install -c
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/wget-1.9.1-r5/work/wget-1.9.1/config.log

!!! ERROR: net-misc/wget-1.9.1-r5 failed.
!!! Function econf, Line 485, Exitcode 0
!!! econf failed
!!! If you need support, post the topmost build error, NOT this status message.

emerge gcc错误如下: * Compiling gcc ...
/var/tmp/portage/gcc-3.4.3.20050110-r2/work/build /var/tmp/portage/gcc-3.4.3.20050110-r2/work/build /var/tmp/portage/gcc-3.4.3.20050110-r2/work/gcc-3.4.3
* Running make LDFLAGS="" STAGE1_CFLAGS="-O" LIBPATH="/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110" BOOT_CFLAGS=" -O2 -march=i686 -pipe" profiledbootstrap
Configuring in libiberty
configure: creating cache ./config.cache
checking whether to enable maintainer-specific portions of Makefiles... no
checking for makeinfo... makeinfo
checking for perl... perl
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for i686-pc-linux-gnu-ar... i686-pc-linux-gnu-ar
checking for i686-pc-linux-gnu-ranlib... i686-pc-linux-gnu-ranlib
checking for i686-pc-linux-gnu-gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make: *** [configure-libiberty] Error 1

!!! ERROR: sys-devel/gcc-3.4.3.20050110-r2 failed.
!!! Function gcc_do_make, Line 1149, Exitcode 2
!!! emake failed with profiledbootstrap
!!! If you need support, post the topmost build error, NOT this status message.

哪位兄弟有经验?
发表于 2005-5-24 10:08:40 | 显示全部楼层
Post by fei
一台测试机--用的是"x86 ~x86" 某天突然emerge -u system出错,以为是gcc问题--从别的机器上quickpkg了一个稳定版3.3.5过来也不行。信息见下面:
Portage 2.0.51.21-r1 (default-linux/x86/2005.0, gcc-3.4.3-20050110, glibc-2.3.5-r0, 2.6.11-gentoo-r7 i686)
=================================================================
System uname: 2.6.11-gentoo-r7 i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.11
ccache version 2.4 [enabled]
dev-lang/python:     2.3.5
sys-apps/sandbox:    1.2.8
sys-devel/autoconf:  2.59-r6
sys-devel/automake:  1.9.5
sys-devel/binutils:  2.15.92.0.2-r8
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.11
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=i686 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=i686 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://linux.ntcu.net/dists/gentoo/ http://gentoo.seren.com/gentoo http://mirror.gentoo.gr.jp http://gentoo.ccccom.com"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X alsa apm arts avi berkdb bitmap-fonts crypt cups emboss encode foomaticdb fortran gdbm gif gnome gpm gtk gtk2 imlib ipv6 jpeg kde libg++ libwww mad mikmod motif mp3 mpeg mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime readline ruby sdl spell ssl svga tcpd truetype truetype-fonts type1-fonts xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY

emerge -u system错误信息如下:/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/../../../../i686-pc-linux-gnu/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000008048600
i686-pc-linux-gnu-gcc -O3 -march=i686 -fomit-frame-pointer -pipe -Wall -Winline -D_FILE_OFFSET_BITS=64  -o bzip2 bzip2.o -L. -lbz2
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/../../../../i686-pc-linux-gnu/bin/ld: warning: cannot find entry symbol _start; defaulting to 0000000008048c20

Doing 6 tests (3 compress, 3 uncompress) ...
If there's a problem, things might stop at this point.

./bzip2 -1  < sample1.ref > sample1.rb2
/bin/sh: line 1: 19055 Illegal instruction     ./bzip2 -1 <sample1.ref >sample1.rb2
make: *** [test] Error 132

!!! ERROR: app-arch/bzip2-1.0.3-r3 failed.
!!! Function src_compile, Line 52, Exitcode 2
!!! Make failed
!!! If you need support, post the topmost build error, NOT this status message.

emerge -u world错误信息如下 * econf: updating wget-1.9.1/config.guess with /usr/share/gnuconfig/config.guess
* econf: updating wget-1.9.1/config.sub with /usr/share/gnuconfig/config.sub
./configure --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --build=i686-pc-linux-gnu --sysconfdir=/etc/wget --with-ssl --enable-opie --enable-digest --enable-ipv6 --enable-nls --disable-debug --without-socks
configuring for GNU Wget 1.9.1
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /bin/install -c
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

!!! Please attach the config.log to your bug report:
!!! /var/tmp/portage/wget-1.9.1-r5/work/wget-1.9.1/config.log

!!! ERROR: net-misc/wget-1.9.1-r5 failed.
!!! Function econf, Line 485, Exitcode 0
!!! econf failed
!!! If you need support, post the topmost build error, NOT this status message.

emerge gcc错误如下: * Compiling gcc ...
/var/tmp/portage/gcc-3.4.3.20050110-r2/work/build /var/tmp/portage/gcc-3.4.3.20050110-r2/work/build /var/tmp/portage/gcc-3.4.3.20050110-r2/work/gcc-3.4.3
* Running make LDFLAGS="" STAGE1_CFLAGS="-O" LIBPATH="/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110" BOOT_CFLAGS=" -O2 -march=i686 -pipe" profiledbootstrap
Configuring in libiberty
configure: creating cache ./config.cache
checking whether to enable maintainer-specific portions of Makefiles... no
checking for makeinfo... makeinfo
checking for perl... perl
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for i686-pc-linux-gnu-ar... i686-pc-linux-gnu-ar
checking for i686-pc-linux-gnu-ranlib... i686-pc-linux-gnu-ranlib
checking for i686-pc-linux-gnu-gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make: *** [configure-libiberty] Error 1

!!! ERROR: sys-devel/gcc-3.4.3.20050110-r2 failed.
!!! Function gcc_do_make, Line 1149, Exitcode 2
!!! emake failed with profiledbootstrap
!!! If you need support, post the topmost build error, NOT this status message.

哪位兄弟有经验?

你用
  gcc-config -l
看一看你现在用的是哪个glibc(带星号的)?

  gcc-config <profile名称>
可以修改所用的glibc版本。
另外要注意每次升级时的提示,特别是portage升级后的提示。
升级后不要忘了
  etc-update
  env-update
  . /etc/profile
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-5-24 12:34:03 | 显示全部楼层
谢了---gcc-config -l
[1] i686-pc-linux-gnu-3.3.5-20050130
[2] i686-pc-linux-gnu-3.3.5-20050130-hardened
[3] i686-pc-linux-gnu-3.3.5-20050130-hardenednopie
[4] i686-pc-linux-gnu-3.3.5-20050130-hardenednossp
[5] i686-pc-linux-gnu-3.4.3-20050110 *
[6] i686-pc-linux-gnu-3.4.3-20050110-hardened
[7] i686-pc-linux-gnu-3.4.3-20050110-hardenednopie
[8] i686-pc-linux-gnu-3.4.3-20050110-hardenednossp
其中3.3.5是我从其他可用的稳定版quickpkg过来的。指定这个也不行。错误提示依旧。
回复 支持 反对

使用道具 举报

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

本版积分规则

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