After an failed emerge world, my compiler chain is broken.  Even with
the simplest C file test.c:

int main() { return 0; }

`gcc test.c` produces:

/lib64/libc.so.6: file not recognized: File format not recognized
collect2: ld returned 1 exit status

Could anyone tell me how to fix it? I tried re-emerge glibc, gcc and
binutils, and even emerge -e system, but all of them failed. The error
messages followed:

<`emerge glibc | tail`>
x86_64-pc-linux-gnu-gcc -nostdlib -nostartfiles -static -o
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/sln
  
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/crt1.o
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/crti.o
`x86_64-pc-linux-gnu-gcc --print-file-name=crtbegin.o`
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/sln.o
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a
-lgcc    
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a
`x86_64-pc-linux-gnu-gcc --print-file-name=crtend.o`
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/csu/crtn.o
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(iofclose.o):(.eh_frame+0x121):
undefined reference to `__gcc_personality_v0'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(wfileops.o):
In function `_IO_wfile_underflow':
wfileops.c:(.text+0x1215): undefined reference to `_Unwind_Resume'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(wfileops.o):(.eh_frame+0xde):
undefined reference to `__gcc_personality_v0'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(fileops.o):
In function `_IO_file_fopen':
fileops.c:(.text+0x1e1e): undefined reference to `_Unwind_Resume'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(fileops.o):
In function `_IO_file_underflow':
fileops.c:(.text+0x2017): undefined reference to `_Unwind_Resume'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(fileops.o):(.eh_frame+0xde):
undefined reference to `__gcc_personality_v0'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(syslog.o):
In function `__vsyslog_chk':
syslog.c:(.text+0x687): undefined reference to `_Unwind_Resume'
syslog.c:(.text+0x69c): undefined reference to `_Unwind_Resume'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(syslog.o):
In function `openlog':
syslog.c:(.text+0x7a0): undefined reference to `_Unwind_Resume'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(syslog.o):
In function `closelog':
syslog.c:(.text+0x813): undefined reference to `_Unwind_Resume'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(syslog.o):(.eh_frame+0x166):
undefined reference to `__gcc_personality_v0'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(backtrace.o):
In function `backtrace':
backtrace.c:(.text+0x42): undefined reference to `_Unwind_Backtrace'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(backtrace.o):
In function `backtrace_helper':
backtrace.c:(.text+0xfa): undefined reference to `_Unwind_GetIP'
backtrace.c:(.text+0x11d): undefined reference to `_Unwind_GetGR'
backtrace.c:(.text+0x128): undefined reference to `_Unwind_GetCFA'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(iofflush.o):
In function `fflush':
iofflush.c:(.text+0xe9): undefined reference to `_Unwind_Resume'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(iofflush.o):(.eh_frame+0xde):
undefined reference to `__gcc_personality_v0'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(iofwrite.o):
In function `fwrite':
iofwrite.c:(.text+0x12c): undefined reference to `_Unwind_Resume'
/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/libc.a(iofwrite.o):(.eh_frame+0xde):
undefined reference to `__gcc_personality_v0'
collect2: ld returned 1 exit status
make[2]: *** 
[/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/sln]
Error 1
make[2]: *** Waiting for unfinished jobs....
make subdir=posix -C ../posix ..=../
objdir=/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl
-f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-uname.os
rtld-_exit.os rtld-getpid.os rtld-environ.os'
make[4]: Entering directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/nptl'
make[4]: Entering directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/posix'
make[4]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/posix'
make[4]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/nptl'
make[4]: Entering directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/posix'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/posix'
make subdir=setjmp -C ../setjmp ..=../
objdir=/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl
-f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-setjmp.os
rtld-__longjmp.os'
make[4]: Entering directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/setjmp'
make[4]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/setjmp'
make[4]: Entering directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/nptl'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/nptl'
make subdir=signal -C ../signal ..=../
objdir=/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl
-f Makefile -f ../elf/rtld-Rules rtld-all
rtld-modules='rtld-sigaction.os'
make[4]: Entering directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/setjmp'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/setjmp'
make subdir=stdlib -C ../stdlib ..=../
objdir=/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl
-f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-exit.os
rtld-cxa_atexit.os'
make[4]: Entering directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/signal'
make[4]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/signal'
make[4]: Entering directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/stdlib'
make[4]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/stdlib'
make[4]: Entering directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/signal'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/signal'
make subdir=string -C ../string ..=../
objdir=/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl
-f Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-strchr.os
rtld-strcmp.os rtld-strlen.os rtld-strnlen.os rtld-memchr.os
rtld-memmove.os rtld-memset.os rtld-mempcpy.os rtld-stpcpy.os
rtld-memcpy.os rtld-rawmemchr.os'
make[4]: Entering directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/string'
make[4]: Entering directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/stdlib'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/stdlib'
make subdir=time -C ../time ..=../
objdir=/var/tmp/portage/sys-libs/glibc-2.5/work/build-x86-x86_64-pc-linux-gnu-nptl
-f Makefile -f ../elf/rtld-Rules rtld-all
rtld-modules='rtld-setitimer.os'
make[4]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/string'
make[4]: Entering directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/time'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/time'
make[4]: Entering directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/string'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/string'
make[3]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/elf'
make[2]: Leaving directory
`/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5/elf'
make[1]: *** [elf/others] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-libs/glibc-2.5/work/glibc-2.5'
make: *** [all] Error 2

!!! ERROR: sys-libs/glibc-2.5 failed.
Call stack:
 ebuild.sh, line 1614:   Called dyn_compile
 ebuild.sh, line 971:   Called qa_call 'src_compile'
 environment, line 4166:   Called src_compile
 glibc-2.5.ebuild, line 1119:   Called src_compile
 glibc-2.5.ebuild, line 1130:   Called toolchain-glibc_src_compile
 glibc-2.5.ebuild, line 242:   Called die

!!! make for x86 failed
!!! If you need support, post the topmost build error, and the call
stack if relevant.
!!! A complete build log is located at
'/var/log/portage/sys-libs:glibc-2.5:20070308-002005.log'.
</`emerge glibc | tail`>

<`emerge gcc | tail`>
checking whether the C compiler (gcc -march=athlon64 -O2 -pipe ) works... no
configure: error: installation or configuration problem: C compiler
cannot create executables.

!!! ERROR: sys-devel/gcc-4.1.2 failed.
Call stack:
 ebuild.sh, line 1614:   Called dyn_compile
 ebuild.sh, line 971:   Called qa_call 'src_compile'
 environment, line 5384:   Called src_compile
 ebuild.sh, line 1304:   Called toolchain_src_compile
 toolchain.eclass, line 26:   Called gcc_src_compile
 toolchain.eclass, line 1541:   Called gcc_do_configure
 toolchain.eclass, line 1341:   Called die

!!! failed to run configure
!!! If you need support, post the topmost build error, and the call
stack if relevant.
!!! A complete build log is located at
'/var/log/portage/sys-devel:gcc-4.1.2:20070308-004801.log'.
</`emerge gcc | tail`>

<`emerge binutils | tail`>
checking whether the C compiler (gcc  -march=athlon64 -O2 -pipe ) works... no
configure: error: installation or configuration problem: C compiler
cannot create executables.

!!! ERROR: sys-devel/binutils-2.17 failed.
Call stack:
 ebuild.sh, line 1614:   Called dyn_compile
 ebuild.sh, line 971:   Called qa_call 'src_compile'
 environment, line 3690:   Called src_compile
 ebuild.sh, line 1304:   Called toolchain-binutils_src_compile
 toolchain-binutils.eclass, line 199:   Called die

!!! configure failed
!!! If you need support, post the topmost build error, and the call
stack if relevant.
!!! A complete build log is located at
'/var/log/portage/sys-devel:binutils-2.17:20070308-005151.log'.
</`emerge binutils | tail`>

<`emerge -e system | tail`>
Compiling source in
/var/tmp/portage/sys-apps/portage-2.1.2.1-r1/work/portage-2.1.2 ...
/lib64/libc.so.6: file not recognized: File format not recognized
collect2: ld returned 1 exit status

!!! ERROR: sys-apps/portage-2.1.2.1-r1 failed.
Call stack:
 ebuild.sh, line 1614:   Called dyn_compile
 ebuild.sh, line 971:   Called qa_call 'src_compile'
 environment, line 3365:   Called src_compile
 portage-2.1.2.1-r1.ebuild, line 84:   Called die

!!! Failed to build tbz2tool
!!! If you need support, post the topmost build error, and the call
stack if relevant.
!!! A complete build log is located at
'/var/log/portage/sys-apps:portage-2.1.2.1-r1:20070308-000119.log'.
</`emerge -e system | tail`>

The output of emerge --info followed:

[EMAIL PROTECTED] ~/tmp $ emerge --info
Portage 2.1.2-r12 (default-linux/amd64/2006.1/desktop, gcc-4.1.1,
glibc-2.5-r0, 2.6.19-suspend2-r1 x86_64)
=================================================================
System uname: 2.6.19-suspend2-r1 x86_64 AMD Turion(tm) 64 Mobile
Technology MT-30
Gentoo Base System version 1.12.9
Timestamp of tree: Wed, 07 Mar 2007 06:50:01 +0000
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port
3632) [disabled]
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.31-r3
dev-lang/python:     2.4.4, 2.5-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.20-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-march=athlon64 -O2 -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks fixpackages metadata-transfer
parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.twaren.net/Linux/Gentoo/
http://mirror.datapipe.net/gentoo
ftp://mirror.pacific.net.au/linux/Gentoo";
LC_ALL="en_US.UTF-8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times
--compress --force --whole-file --delete --delete-after --stats
--timeout=180 --exclude=/distfiles --exclude=/local
--exclude=/packages --filter=H_**/files/digest-* --prune-empty-dirs"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage /usr/portage/local/layman/sunrise"
SYNC="rsync://rsync.asia.gentoo.org/gentoo-portage"
USE="X a52 aac acpi alsa amd64 ao aoss audiofile automount
bash-completion bitmap-fonts bzip2 cairo caps ccache cdr chardet cjk
cli cracklib dbus divx dri dv dvd dvdr emboss encode exo fam fbsplash
firefox freetype gif glut gmedia gstreamer gtk gtk2 hal hashstyle
iconv imagemagick innodb isdnlog ithreads jpeg kqemu libg++ libnotify
libsamplerate logrotate lzo macmenu mad matroska mikmod mjpeg mmap
mozbranding mp3 mpeg ncurses nls no-old-linux nptl nptlonly nsplugin
nvidia offensive ogg opengl oss pam panel-plugin pcre png ppds pppd
quicktime rar readline realmedia reflection restrict-javascript sdl
session spell spl ssl startup-notification svg tcpd threads thunar
thunar-vfs truetype truetype-fonts type1-fonts unicode vim vorbis wmp
x264 xcb xcomposite xforms xml xorg xv xvid zlib"
ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix
dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat
linear meter mulaw multi null plug rate route share shm softvol"
ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux"
LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb
ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS,
LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
--
[email protected] mailing list

Reply via email to