Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 123831 - system is broken after changing CHOST
Summary: system is broken after changing CHOST
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-23 09:20 UTC by Adam Carheden
Modified: 2006-02-23 20:37 UTC (History)
0 users

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 Adam Carheden 2006-02-23 09:20:01 UTC
I just hosed my system with an `emerge --update --deep world` and I think binutils is the culprit. env-update misconfigures /etc/ld.so.conf, which breaks portage and has to be manually repaired. While attempting to reinstall gcc, I noticed that the series of links from /usr/bin/ld and /usr/bin/as were broken at the last link:
 
# ls -l /usr/i686-pc-linux-gnu/binutils-bin/2.15.92.0.2/ld
ls: /usr/i686-pc-linux-gnu/binutils-bin/2.15.92.0.2/ld: No such file or directory

I messed with binutils as follows and I don't think it's doing what it should be doing:

# binutils-config -c
i686-pc-linux-gnu-2.15.92.0.2
# binutils-config -l
 [1] i386-pc-linux-gnu-2.16.1 *
# binutils-config i386-pc-linux-gnu-2.16.1
 * Switching to i386-pc-linux-gnu-2.16.1 ...                              [ ok ]
# binutils-config -c
i686-pc-linux-gnu-2.15.92.0.2

It said [ok], but it lied.

Here's my /etc/ld.so.conf. Note that I've manually added the last two lines and run ldconfig. env-update put in the rest, which breaks portage.

# ld.so.conf autogenerated by env-update; make all changes to
# contents of /etc/env.d directory
/usr/local/lib
/usr/lib/opengl/xorg-x11/lib
/usr/i686-pc-linux-gnu/lib
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.5-20050130
/usr/lib
/usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.6
/usr/lib/gcc/i386-pc-linux-gnu/3.4.4

And `emerge --info`

Portage 2.0.54 (default-linux/x86/2005.1, gcc-3.3.5-20050130, glibc-2.3.5-r2, 2.6.16-rc3-xen20060222a i686)
=================================================================
System uname: 2.6.16-rc3-xen20060222a i686 Intel(R) Pentium(R) 4 CPU 2.60GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.3.5-r2, 2.4.2
sys-apps/sandbox:    1.2.12
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-Os -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://linux-util1/gentoo-portage"
USE="x86 X alsa apm arts avi berkdb bitmap-fonts bzip2 crypt cups curl eds emboss encode expat foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 jpeg kde ldap libg++ libwww mad mikmod motif mp3 mpeg ncurses nls ogg oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl spell ssl tcpd truetype truetype-fonts type1-fonts udev usb vorbis xml2 xmms xv zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Comment 1 SpanKY gentoo-dev 2006-02-23 17:22:14 UTC
has nothing to do with binutils

looks like you've been screwing around with your CHOST and rebuilt some critical applications with the new value

what does this show:
ls /etc/env.d/{binutils,gcc}/
Comment 2 Adam Carheden 2006-02-23 20:22:08 UTC
(In reply to comment #1)
> has nothing to do with binutils
> 
> looks like you've been screwing around with your CHOST and rebuilt some
> critical applications with the new value
> 
> what does this show:
> ls /etc/env.d/{binutils,gcc}/
> 
I get the following, but I fixed it (see below), so I think this is what it SHOULD look like:
/etc/env.d/binutils/:
config-i386-pc-linux-gnu  config-i686-pc-linux-gnu  i686-pc-linux-gnu-2.16.1

/etc/env.d/gcc/:
config
config-i386-pc-linux-gnu
config-i686-pc-linux-gnu
i686-pc-linux-gnu-3.3.6
i686-pc-linux-gnu-3.3.6-hardened
i686-pc-linux-gnu-3.3.6-hardenednopie
i686-pc-linux-gnu-3.3.6-hardenednopiessp
i686-pc-linux-gnu-3.3.6-hardenednossp
i686-pc-linux-gnu-3.4.4
i686-pc-linux-gnu-3.4.4-hardened
i686-pc-linux-gnu-3.4.4-hardenednopie
i686-pc-linux-gnu-3.4.4-hardenednopiessp
i686-pc-linux-gnu-3.4.4-hardenednossp

The problem occured on two identically configured fresh installs from the P4 stage3 of 2005.1 after running `emerge --update --deep world -k` using binary packages compiled on another machine of the same arch/stage. Since I started with fresh isntalls and it happened on two machines, I suspected a bug but maybe it's just a SNAFU with the binary packages. I'm still not sure what caused it (maybe the binary packages don't update correctly), but for the google record, I fixed it by manually fixing ld.so.conf, running ldconfig and reemerging binutils, gcc, and portage. I had to fix ld.so.conf after emerging each package. Finally, I had to run `fix_libtool_files.sh. 3.3.4`.
Comment 3 SpanKY gentoo-dev 2006-02-23 20:37:10 UTC
you should delete the /etc/env.d/gcc/config-* and /etc/env.d/binutils/config-i386-pc-linux-gnu files and then re-run gcc-config/binutils-config