Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help! How to fix my libc6.so? [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
hongqn
n00b
n00b


Joined: 04 Apr 2005
Posts: 22
Location: Beijing, China

PostPosted: Thu Mar 08, 2007 3:54 am    Post subject: Help! How to fix my libc6.so? [SOLVED] Reply with quote

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

Code:
int main() { return 0; }


`gcc test.c` produces:

Quote:
/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`:
Quote:
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 gcc | tail`:
Quote:
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 binutils | tail`:
Quote:
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 -e system | tail`:
Quote:
>>> 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'.


The output of emerge --info followed:

Quote:
hongqn@a6km ~/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

_________________
God's in his heaven, all's right with the world.
Registered Linux User #396996


Last edited by hongqn on Fri Mar 09, 2007 5:39 am; edited 1 time in total
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4735
Location: Angra do Heroísmo (PT)

PostPosted: Thu Mar 08, 2007 6:19 am    Post subject: Reply with quote

Hi.

Have you taken a look here?
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
hongqn
n00b
n00b


Joined: 04 Apr 2005
Posts: 22
Location: Beijing, China

PostPosted: Thu Mar 08, 2007 8:58 am    Post subject: Reply with quote

Yes, i have looked at it. but it doesn't save me :( Both gcc-config -l and binutils-config -l look good.

I checked again my emerge log and found that the emerge is broken after a downgrade of binutils:

Quote:
Wed Mar 7 01:33:49 2007 <<< sys-devel/binutils-2.17.50.0.3
Wed Mar 7 01:33:49 2007 >>> sys-devel/binutils-2.17


I believe this downgrade is the reason why my compiler toolchain breaks down. Before the downgrade, I had been using
Quote:
LDFLAG="-Wl,-O1 -Wl,--sort-common -Wl,--hash-style=both

in /etc/make.conf for months. I think binutils-2.17 does not like libraries (e.g. libc.6.so) created using the above LDFLAGS before.

The reason is found, but I don't know the solution. I cannot emerge anymore, even after I commented the LDFLAGS line in /etc/make.conf. So I can not upgrade binutils or re-compile libc.6.so. Could you help me fix the toolchain up?
_________________
God's in his heaven, all's right with the world.
Registered Linux User #396996
Back to top
View user's profile Send private message
jmbsvicetto
Moderator
Moderator


Joined: 27 Apr 2005
Posts: 4735
Location: Angra do Heroísmo (PT)

PostPosted: Thu Mar 08, 2007 6:44 pm    Post subject: Reply with quote

Well, you can search in tinderbox for some binary packages for your system. I would try binutils for starters.
_________________
Jorge.

Your twisted, but hopefully friendly daemon.
AMD64 / x86 / Sparc Gentoo
Help answer || emwrap.sh
Back to top
View user's profile Send private message
hongqn
n00b
n00b


Joined: 04 Apr 2005
Posts: 22
Location: Beijing, China

PostPosted: Fri Mar 09, 2007 5:38 am    Post subject: Reply with quote

Thank you! I downloaded glibc-2.5.tbz2 and run emerge -K glibc and everything work again. :D
_________________
God's in his heaven, all's right with the world.
Registered Linux User #396996
Back to top
View user's profile Send private message
ozbird
Apprentice
Apprentice


Joined: 21 Oct 2003
Posts: 187

PostPosted: Wed Aug 15, 2007 12:17 am    Post subject: tinderbox down? Reply with quote

I've struck the same problem, but can't access tinderbox (Connection refused.)

Update: tinderbox is working again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum