Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 184801 - libgcc_s.so: file not recognized after downgrade to sys-devel/binutils-2.17
Summary: libgcc_s.so: file not recognized after downgrade to sys-devel/binutils-2.17
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://sourceware.org/ml/binutils/200...
Whiteboard:
Keywords:
: 188133 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-10 02:28 UTC by Ed Tomlinson
Modified: 2007-08-14 13:04 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Tomlinson 2007-07-10 02:28:48 UTC
emerge.log shows:

1183721630:  >>> emerge (4 of 10) sys-devel/binutils-2.17 to /
1183721630:  === (4 of 10) Cleaning (sys-devel/binutils-2.17::/usr/portage/sys-devel/binutils/binutils-2.17.ebuild)
1183721631:  === (4 of 10) Compiling/Merging (sys-devel/binutils-2.17::/usr/portage/sys-devel/binutils/binutils-2.17.ebuild)
1183721994:  >>> AUTOCLEAN: sys-devel/binutils
1183721994: === Unmerging... (sys-devel/binutils-2.17.50.0.16)
1183722019:  >>> unmerge success: sys-devel/binutils-2.17.50.0.16
1183722019:  === (4 of 10) Post-Build Cleaning (sys-devel/binutils-2.17::/usr/portage/sys-devel/binutils/binutils-2.17.ebuild)
1183722019:  ::: completed emerge (4 of 10) sys-devel/binutils-2.17 to /
1183722019:  >>> emerge (5 of 10) app-arch/gzip-1.3.12 to /
1183722020:  === (5 of 10) Cleaning (app-arch/gzip-1.3.12::/usr/portage/app-arch/gzip/gzip-1.3.12.ebuild)
1183722020:  === (5 of 10) Compiling/Merging (app-arch/gzip-1.3.12::/usr/portage/app-arch/gzip/gzip-1.3.12.ebuild)
1183722026:  *** terminating.

All subsequent builds die and a simple compiles give:

ed@grover ~ $ gcc setbatch.c -o setbatch
/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/libgcc_s.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status

What has happened?  What other info can help diagnose this problem?

How can I fix the install? (is there a binary binutils I can emerge...)



Reproducible: Always



Expected Results:  
I should be able to compile/emerge after a binutils update...

cat make.conf
# These settings were set by the catalyst build script that automatically built this stage
# Please consult /etc/make.conf.example for a more detailed example
 consult /etc/make.conf.example for a more detailed example
CFLAGS="-march=k8 -O -pipe"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"

GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://adelie.polymtl.ca/ ftp://cs.ubishops.ca/pub/gentoo ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://www.gtlib.gatech.edu/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo/ "

#SYNC="rsync://rsync.gentoo.org/gentoo-portage"
SYNC="rsync://rsync.ca.gentoo.org/gentoo-portage"

# oss for wine
USE="gtk gnome qt kde dvd alsa cdr fam unicode nptl nptlonly divx4linux real matroska theora win32codecs asf xvid mad dts dvd dvdread X aac opengl sdl xv xvmc mmx mmxext sse sse2 3dnow 3dnowext quicktime smb samba enable-jingle pdf firefox arts ogg vorbis wavpack wma xcb xinerama ffmpeg artswrappersuid fat ntfs reiserfs reiser4 xfs truetype ruby -fortran bluetooth threads"

VIDEO_CARDS="ati radeon vesa fbdev"
INPUT_DEVICES="keyboard mouse"
ALSA_CARDS="intel8x0"

# flash
PORTDIR_OVERLAY="/usr/local/portage/flash"

# layman overlays
source /usr/portage/local/layman/make.conf

and gcc is:
gcc --version
gcc (GCC) 4.1.2 (Gentoo 4.1.2)
Comment 1 Ed Tomlinson 2007-07-10 02:40:30 UTC
strace of the sample compile yields:

access("/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../x86_64-pc-linux-gnu/4.1.2/crtn.o", R_OK) = -1 ENOENT (No such file or directory)
access("/usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../lib64/crtn.o", R_OK) = 0
stat("/usr/libexec/gcc/x86_64-pc-linux-gnu/4.1.2/collect2", {st_mode=S_IFREG|0755, st_size=110136, ...}) = 0
access("/usr/libexec/gcc/x86_64-pc-linux-gnu/4.1.2/collect2", X_OK) = 0
vfork()                                 = 23591
wait4(23591, /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/libgcc_s.so: file not recognized: File format not recognized
collect2: ld returned 1 exit status
[{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 23591
--- SIGCHLD (Child exited) @ 0 (0) ---
stat("/tmp/ccezBhru.o", {st_mode=S_IFREG|0600, st_size=2024, ...}) = 0
unlink("/tmp/ccezBhru.o")               = 0
stat("/tmp/cc13ZVxM.s", {st_mode=S_IFREG|0600, st_size=1601, ...}) = 0
unlink("/tmp/cc13ZVxM.s")               = 0
exit_group(1)

The libgcc_s.so file is from May 29 when gcc was last built.  It looks like what ever is trying to process this file broke with the binutils update.
Comment 2 Ed Tomlinson 2007-07-10 02:49:32 UTC
grover 4.1.2 # emerge --info
Portage 2.1.2.9 (default-linux/amd64/2006.0, gcc-4.1.2, glibc-2.5-r3, 2.6.21-gentoo-r3-crc x86_64)
=================================================================
System uname: 2.6.21-gentoo-r3-crc x86_64 AMD Athlon(tm) 64 Processor 2800+
Gentoo Base System release 1.12.9
Timestamp of tree: Tue, 10 Jul 2007 01:20:01 +0000
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
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.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O -pipe"
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/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=k8 -O -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://adelie.polymtl.ca/ ftp://cs.ubishops.ca/pub/gentoo ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://www.gtlib.gatech.edu/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo/ "
LC_ALL="en_CA.utf8"
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-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/flash /usr/portage/local/layman/sunrise"
SYNC="rsync://rsync.ca.gentoo.org/gentoo-portage"
USE="X aac alsa amd64 arts artswrappersuid asf berkdb bitmap-fonts bluetooth cdr cli cracklib crypt cups divx4linux dri dts dvd dvdread eds emboss enable-jingle encode fam fat ffmpeg firefox foomaticdb gif gnome gpm gstreamer gtk gtk2 iconv imlib ipv6 isdnlog jpeg kde lzw lzw-tiff mad matroska midi mp3 mpeg mudflap ncurses nls nptl nptlonly ntfs ogg opengl openmp pam pcre pdf perl png pppd python qt qt3 qt4 quicktime readline reflection reiser4 reiserfs ruby samba sdl session smb spell spl ssl tcpd theora threads tiff truetype truetype-fonts type1-fonts unicode usb vorbis wavpack wma xcb xfs xinerama xorg xpm xv xvid xvmc 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" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="ati radeon vesa fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-07-10 06:20:12 UTC
> I should be able to compile/emerge after a binutils update...

I wasn't update but downgrade, read the output :)
Comment 4 SpanKY gentoo-dev 2007-07-10 06:34:00 UTC
downgrading binutils after gcc has been built against it is not supported as you'll run into things like this

gcc will configure optional features according to the version of binutils it detects at build time ... if such critical features later become unavailable (because you switched to an older binutils), then things can easily fall apart
Comment 5 Ed Tomlinson 2007-07-10 11:06:25 UTC
You are VERY fast to close bugs.
Ok so it downgraded the package - maybe we should ask why?  
Please take a look at the log below.  I use(d) the commands:
emerge --sync; emerge --update --deep --newuse world
Looks to me like portage made a bad call and broke my system...    We probably should change to be a portage bug that can break systems.  I was NOT asked if I wanted to downgrade...

What broke in portage?  How can my system be fixed?

1183720697: Started emerge on: Jul 06, 2007 07:18:17
1183720697:  *** emerge  sync
1183720697:  === sync
1183720697: >>> Starting rsync with rsync://206.75.218.53/gentoo-portage
1183720895: === Sync completed with rsync://206.75.218.53/gentoo-portage
1183721213:  *** terminating.
1183721535: Started emerge on: Jul 06, 2007 07:32:15
1183721535:  *** emerge --newuse --deep --update world
1183721545:  >>> emerge (1 of 11) sys-apps/portage-2.1.2.9 to /
1183721545:  === (1 of 11) Cleaning (sys-apps/portage-2.1.2.9::/usr/portage/sys-apps/portage/portage-2.1.2.9.ebuild)
1183721546:  === (1 of 11) Compiling/Merging (sys-apps/portage-2.1.2.9::/usr/portage/sys-apps/portage/portage-2.1.2.9.ebuild)
1183721561:  >>> AUTOCLEAN: sys-apps/portage
1183721561: === Unmerging... (sys-apps/portage-2.1.2.7)
1183721563:  >>> unmerge success: sys-apps/portage-2.1.2.7
1183721563:  ::: completed emerge (1 of 11) sys-apps/portage-2.1.2.9 to /
1183721563:  *** RESTARTING emerge via exec() after change of portage version.
1183721563:  *** terminating.
1183721564: Started emerge on: Jul 06, 2007 07:32:44
1183721564:  *** emerge --newuse --deep --resume --ignore-default-opts --update
1183721568:  *** Resuming merge...
1183721568:  >>> emerge (1 of 10) sys-libs/timezone-data-2007f to /
1183721568:  === (1 of 10) Cleaning (sys-libs/timezone-data-2007f::/usr/portage/sys-libs/timezone-data/timezone-data-2007f.ebuild)
1183721568:  === (1 of 10) Compiling/Merging (sys-libs/timezone-data-2007f::/usr/portage/sys-libs/timezone-data/timezone-data-2007f.ebuild)
1183721585:  >>> AUTOCLEAN: sys-libs/timezone-data
1183721585: === Unmerging... (sys-libs/timezone-data-2007e)
1183721587:  >>> unmerge success: sys-libs/timezone-data-2007e
1183721587:  === (1 of 10) Post-Build Cleaning (sys-libs/timezone-data-2007f::/usr/portage/sys-libs/timezone-data/timezone-data-2007f.ebuild)
1183721587:  ::: completed emerge (1 of 10) sys-libs/timezone-data-2007f to /
1183721587:  >>> emerge (2 of 10) sys-process/atop-1.19 to /
1183721587:  === (2 of 10) Cleaning (sys-process/atop-1.19::/usr/portage/sys-process/atop/atop-1.19.ebuild)
1183721587:  === (2 of 10) Compiling/Merging (sys-process/atop-1.19::/usr/portage/sys-process/atop/atop-1.19.ebuild)
1183721596:  >>> AUTOCLEAN: sys-process/atop
1183721596: === Unmerging... (sys-process/atop-1.17)
1183721597:  >>> unmerge success: sys-process/atop-1.17
1183721597:  === (2 of 10) Post-Build Cleaning (sys-process/atop-1.19::/usr/portage/sys-process/atop/atop-1.19.ebuild)
1183721597:  ::: completed emerge (2 of 10) sys-process/atop-1.19 to /
1183721597:  >>> emerge (3 of 10) dev-util/dialog-1.1.20070514 to /
1183721597:  === (3 of 10) Cleaning (dev-util/dialog-1.1.20070514::/usr/portage/dev-util/dialog/dialog-1.1.20070514.ebuild)
1183721598:  === (3 of 10) Compiling/Merging (dev-util/dialog-1.1.20070514::/usr/portage/dev-util/dialog/dialog-1.1.20070514.ebuild)
1183721628:  >>> AUTOCLEAN: dev-util/dialog
1183721628: === Unmerging... (dev-util/dialog-1.1.20070227)
1183721630:  >>> unmerge success: dev-util/dialog-1.1.20070227
1183721630:  === (3 of 10) Post-Build Cleaning (dev-util/dialog-1.1.20070514::/usr/portage/dev-util/dialog/dialog-1.1.20070514.ebuild)
1183721630:  ::: completed emerge (3 of 10) dev-util/dialog-1.1.20070514 to /
1183721630:  >>> emerge (4 of 10) sys-devel/binutils-2.17 to /
1183721630:  === (4 of 10) Cleaning (sys-devel/binutils-2.17::/usr/portage/sys-devel/binutils/binutils-2.17.ebuild)
1183721631:  === (4 of 10) Compiling/Merging (sys-devel/binutils-2.17::/usr/portage/sys-devel/binutils/binutils-2.17.ebuild)
1183721994:  >>> AUTOCLEAN: sys-devel/binutils
1183721994: === Unmerging... (sys-devel/binutils-2.17.50.0.16)
1183722019:  >>> unmerge success: sys-devel/binutils-2.17.50.0.16
1183722019:  === (4 of 10) Post-Build Cleaning (sys-devel/binutils-2.17::/usr/portage/sys-devel/binutils/binutils-2.17.ebuild)

Comment 6 SpanKY gentoo-dev 2007-07-10 11:16:19 UTC
i'd assume user error

nothing newer than 2.17 has seen amd64 KEYWORDS which means if you had 2.17.50.0.16 on your system, you put it on there
Comment 7 Ed Tomlinson 2007-07-10 11:26:08 UTC
There is a:
package.keywords:sys-devel/binutils ~*
which has been on my box for a long time.  I really do wonder why portage decided to unilaterally downgrade my binutils?  Notice that portage was updated from the same sync as the binutils...

If some could generate the x86_64 binaries for binutils-2.17.50.0.16 with the
same gcc I can fix this at my end:

grover 2.17 # pwd
/usr/x86_64-pc-linux-gnu/binutils-bin/2.17
grover 2.17 # ls -l
total 2452
-rwxr-xr-x 1 root root  81488 2007-07-06 11:39 addr2line
-rwxr-xr-x 1 root root  52688 2007-07-06 11:39 ar
-rwxr-xr-x 1 root root 316520 2007-07-06 11:39 as
-rwxr-xr-x 1 root root  81024 2007-07-06 11:39 c++filt
-rwxr-xr-x 1 root root 144736 2007-07-06 11:39 gprof
-rwxr-xr-x 1 root root 477120 2007-07-06 11:39 ld
-rwxr-xr-x 1 root root  94480 2007-07-06 11:39 nm
-rwxr-xr-x 1 root root 257080 2007-07-06 11:39 objcopy
-rwxr-xr-x 1 root root 305048 2007-07-06 11:39 objdump
-rwxr-xr-x 1 root root  52688 2007-07-06 11:39 ranlib
-rwxr-xr-x 1 root root 264440 2007-07-06 11:39 readelf
-rwxr-xr-x 1 root root  27896 2007-07-06 11:39 size
-rwxr-xr-x 1 root root  27928 2007-07-06 11:39 strings
-rwxr-xr-x 1 root root 257088 2007-07-06 11:39 strip

Thanks in advance.
Comment 8 Ed Tomlinson 2007-07-10 11:32:50 UTC
Alternately a gcc and friends built at 2.17 would also get me out of the water...
Comment 9 SpanKY gentoo-dev 2007-07-10 11:37:22 UTC
as i said, user error: your package.keywords entry is designed for failure

2.17.50.0.16 had ~alpha but was moved to alpha

~* means "match any ~arch" and since 2.17.50.0.16 lacks any ~arch, portage downgraded you to only available version which matches your keyword profile: 2.17

if you need binaries, you could check out http://tinderbox.dev.gentoo.org/
Comment 10 Jakub Moc (RETIRED) gentoo-dev 2007-08-08 18:15:19 UTC
*** Bug 188133 has been marked as a duplicate of this bug. ***
Comment 11 Volker Hemmann 2007-08-08 18:23:29 UTC
I never had binutils 2.17.50.0.16 in package.keywords. But it got installed - and then downgraded.

So I suspect someone else error.

And I would like to know how to get a working system back.
Comment 12 SpanKY gentoo-dev 2007-08-08 22:23:40 UTC
if you review the portage tree in cvs you'll find that they've never had x86/amd64 KEYWORDS, so the only way it could have been installed is if you did it

in order to recover your system, the easiest thing is to find someone with a bin package of binutils 2.17.50.0.16 or newer and install it ... the .16/.17/.18 versions seem to be relatively stable
Comment 13 Volker Hemmann 2007-08-09 08:40:10 UTC
I am still puzzled, but I nuked my package.keywords some days ago...

II asked a friend to built binutils 2.17.50.0.6 with -builppkgonly, installed it and reinstalled it after that, just to make sure. Still, if downgrading binutils is so dangerous a block like in glibc would be nice.
Comment 14 SpanKY gentoo-dev 2007-08-09 18:31:39 UTC
this requires only a few (like 2) packages in order to cause problems while downgrading glibc can cause a problem with just about any package ...

i could add a warning, but i'd question the actual use it'd get as it'd require people to see and read the message before binutils finishes installing ...