Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 189228 - sys-devel/gcc-4.2.0 compile fails 32bit multilib on amd64 due to brlcad corruption
Summary: sys-devel/gcc-4.2.0 compile fails 32bit multilib on amd64 due to brlcad corru...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-17 13:27 UTC by JTRiley
Modified: 2008-03-10 15:25 UTC (History)
1 user (show)

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


Attachments
build.log for gcc-4.2.0 (build.log.tar.gz,326.63 KB, application/octet-stream)
2007-08-17 22:13 UTC, JTRiley
Details
output of last libtool command before failure with --debug option (debug-libtool.log,503.92 KB, text/plain)
2007-08-17 23:06 UTC, JTRiley
Details

Note You need to log in before you can comment on or make changes to this bug.
Description JTRiley 2007-08-17 13:27:29 UTC
I'm on ~amd64 using glibc 2.6.1 and trying to emerge gcc 4.2.0.  After the third repeated fail, I still get an error about librt.so having the wrong file format.  Haven't seen many posts in the forums or bugs about this so I figured I'd post it for others.  Sorry if this is a repeated bug, I've searched the best I could for the amount of time I've had this morning.  

I've attached my build.log as well as well as my emerge --info

Thanks and God Bless Gentoo



Steps to reproduce: 

emerge -va gcc (using glibc 2.6.1 and ~amd64 system w/ 2007.0 profile)

Top Level Build Error:

/usr/lib64/librt.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[8]: *** [libgomp.la] Error 1
make[8]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/x86_64-pc-linux-gnu/32/libgomp'
make[7]: *** [all-recursive] Error 1
make[7]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/x86_64-pc-linux-gnu/32/libgomp'
make[6]: *** [all] Error 2
make[6]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/x86_64-pc-linux-gnu/32/libgomp'
make[5]: *** [multi-do] Error 1
make[5]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/x86_64-pc-linux-gnu/libgomp'
make[4]: *** [all-multi] Error 2
make[4]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/x86_64-pc-linux-gnu/libgomp'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/x86_64-pc-linux-gnu/libgomp'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/x86_64-pc-linux-gnu/libgomp'
make[1]: *** [all-target-libgomp] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.0/work/build'
make: *** [profiledbootstrap] Error 2
Comment 1 JTRiley 2007-08-17 13:29:56 UTC
# emerge --info

Portage 2.1.3.6 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.21-gentoo-r3 x86_64)
=================================================================
System uname: 2.6.21-gentoo-r3 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System release 1.12.10
Timestamp of tree: Fri, 17 Aug 2007 12:50:01 +0000
ccache version 2.4 [disabled]
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61-r1
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-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/red5/conf /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/lib/red5-webapps"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/php/apache2-php4/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php4/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php4/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ ftp://ftp.gtlib.gatech.edu/pub/gentoo http://www.gtlib.gatech.edu/pub/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo/ ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ http://gentoo.chem.wisc.edu/gentoo/ ftp://gentoo.chem.wisc.edu/gentoo/ http://cudlug.cudenver.edu/gentoo/ http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/ http://gentoo.mirrors.tds.net/gentoo ftp://gentoo.mirrors.tds.net/gentoo http://gentoo.netnitco.net ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ http://mirror.espri.arizona.edu/gentoo/ http://mirrors.acm.cs.rpi.edu/gentoo/ ftp://ftp.ndlug.nd.edu/pub/gentoo/ http://open-systems.ufl.edu/mirrors/gentoo http://gentoo.llarian.net/ ftp://gentoo.llarian.net/pub/gentoo http://gentoo.binarycompass.org http://mirror.datapipe.net/gentoo ftp://mirror.datapipe.net/gentoo http://gentoo.cs.lewisu.edu/gentoo/ http://prometheus.cs.wmich.edu/gentoo http://modzer0.cs.uaf.edu/public/gentoo/ http://mirror.usu.edu/mirrors/gentoo/ ftp://mirror.usu.edu/mirrors/gentoo/ ftp://lug.mtu.edu/gentoo http://mirror.phy.olemiss.edu/mirror/gentoo ftp://mirror.mcs.anl.gov/pub/gentoo/ http://gentoo.mirrors.easynews.com/linux/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://ftp.wwc.edu/pub/mirrors/ftp.gentoo.org"
LANG="en_US"
LC_ALL="en_US"
LINGUAS="en"
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/portage/local/layman/sunrise /usr/portage/local/layman/enlightenment /usr/local/portage"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="X aac aalib acl alsa amd64 apache2 asf bash-completion berkdb bitmap-fonts blas bzip2 cdr clamav cli cracklib crypt ctype cups curl cvs dbus directfb dri dssi dvd dvdr dvdread encode exif fbcon fbdev fglrx firefox flac fontconfig foomaticdb fortran gd gdbm gif gnome gpm gstreamer gtk hal iconv imagemagick imlib ipv6 isdnlog jack java java5 joystick jpeg jpeg2k kde keyboard lapack lirc mad midi mmx mmxext mouse mozilla mp3 mpeg mplayer mudflap mysql mysqli ncurses net network nls nptl nptlonly nsplugin nvidia offensive ogg opengl openmp pam pcre pdf perl php png pppd python qt qt3 qt4 quicktime readline reflection ruby samba sdl session spell spl sql sse sse2 ssl subversion svg tcpd tiff tk truetype truetype-fonts type1-fonts unicode urandom usb utempter vcd vim-with-x visualization vorbis wmf xanim xcomposite xine xinerama xml xorg xpm xscreensaver xv xvid zeroconf zip zlib" ALSA_CARDS="emu10k1 usb-audio usb-usx2y" 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 evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" LIRC_DEVICES="livedrive_midi" USERLAND="GNU" VIDEO_CARDS="vesa fbcon nv nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 SpanKY gentoo-dev 2007-08-17 17:37:26 UTC
post the output of `qlop -l binutils`
Comment 3 JTRiley 2007-08-17 21:40:13 UTC
Sure thing:

$ qlop -l binutils

Thu Jul 20 02:25:56 2006 >>> sys-devel/binutils-2.17
Thu Jul 20 19:40:54 2006 >>> sys-devel/binutils-config-1.8-r7
Sat Aug 26 14:05:10 2006 >>> sys-devel/binutils-2.16.1-r3
Sat Aug 26 14:29:30 2006 >>> sys-devel/binutils-2.17
Tue Sep 19 17:33:20 2006 >>> sys-devel/binutils-config-1.9-r2
Tue Nov 28 20:56:30 2006 >>> sys-devel/binutils-config-1.9-r3
Wed Feb  7 01:36:51 2007 >>> sys-devel/binutils-config-1.9-r3
Wed Feb  7 01:44:56 2007 >>> sys-devel/binutils-2.17
Mon Feb 12 00:16:38 2007 >>> sys-devel/binutils-config-1.9-r3
Mon Feb 12 00:28:34 2007 >>> sys-devel/binutils-2.17
Sun May  6 19:33:13 2007 >>> sys-devel/binutils-config-1.9-r4
Sun Aug  5 12:42:11 2007 >>> sys-devel/binutils-2.17-r1
Comment 4 SpanKY gentoo-dev 2007-08-17 21:46:15 UTC
post full build output as an attachment:
emerge gcc >& log
Comment 5 JTRiley 2007-08-17 21:56:11 UTC
Vapier: I was going to post my build.log this morning but found that it was ~9mb so I decided not to attach and post the top most build error.  Anyhow, here it is now.  Thanks for responding guys!

Comment 6 SpanKY gentoo-dev 2007-08-17 22:04:16 UTC
*cough* compression *cough*
Comment 7 JTRiley 2007-08-17 22:13:49 UTC
Created attachment 128446 [details]
build.log for gcc-4.2.0

vapier: thanks for stating the obvious, should have done this earlier.  here you go
Comment 8 SpanKY gentoo-dev 2007-08-17 22:23:13 UTC
wonder why it's forcing the full path to the lib ... libtool should have just passed it along as -lrt

/bin/sh ./libtool --mode=link /var/tmp/portage/sys-devel/gcc-4.2.0/work/build/./gcc/xgcc -B/var/tmp/portage/sys-d
evel/gcc-4.2.0/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x8
6_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -Wall -Werror -ftls-model=initial-exec -m
arch=i486 -mtune=i686 -Wc,-pthread -O2 -march=k8 -O2 -pipe   -m32 -Wl,-z,nodlopen  -Wl,-O1  -m32 -o libgomp.la -r
path /usr/lib/../lib32 -version-info 1:0:0 -Wl,--version-script,/var/tmp/portage/sys-devel/gcc-4.2.0/work/gcc-4.2
.0/libgomp/libgomp.map alloc.lo barrier.lo critical.lo env.lo error.lo iter.lo loop.lo ordered.lo parallel.lo sec
tions.lo single.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo bar.lo time.lo fortran.lo  -lrt
/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/./gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.2.0/work/build/./gc
c/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isy
stem /usr/x86_64-pc-linux-gnu/sys-include  -m32 -shared  .libs/alloc.o .libs/barrier.o .libs/critical.o .libs/env
.o .libs/error.o .libs/iter.o .libs/loop.o .libs/ordered.o .libs/parallel.o .libs/sections.o .libs/single.o .libs
/team.o .libs/work.o .libs/lock.o .libs/mutex.o .libs/proc.o .libs/sem.o .libs/bar.o .libs/time.o .libs/fortran.o
  -Wl,--rpath -Wl,/usr/lib64 -Wl,--rpath -Wl,/usr/lib64  /usr/lib64/librt.so -L/usr/local/lib64 -L/usr/local/lib
-L/usr/lib64  -pthread -Wl,-z -Wl,nodlopen -Wl,-O1 -Wl,--version-script -Wl,/var/tmp/portage/sys-devel/gcc-4.2.0/
work/gcc-4.2.0/libgomp/libgomp.map -Wl,-soname -Wl,libgomp.so.1 -o .libs/libgomp.so.1.0.0
Comment 9 SpanKY gentoo-dev 2007-08-17 22:24:35 UTC
go into /var/tmp/portage/sys-devel/gcc-4.2.0/work/build/x86_64-pc-linux-gnu/32/libgomp and run make ... assuming it fails, take the last libtool command and insert '--debug' as the first option and post the output as an attachment
Comment 10 JTRiley 2007-08-17 23:06:14 UTC
Created attachment 128448 [details]
output of last libtool command before failure with --debug option

vapier: running libtool produced the same error. Here is the result of the libtool --debug. I put the exact command used to produce the output at the top of the file in case of any errors
Comment 11 JTRiley 2007-10-17 14:05:37 UTC
Hmmmm..... gcc 4.2.1 and 4.2.2 both give me the same error about /usr/lib64/librt.so having the same file format.  

So just to point out the obvious here...in /var/tmp/portage/sys-devel/gcc-4.2.0/work/build/x86_64-pc-linux-gnu/32 all the objects are 32bit (go figure).  

Since I'm on amd64 I have a 64bit librt.so which is trying to be linked with these 32bit objects.  At least that's my guess to why this is happening.  

I noticed I'm not using the multilib use flag for gcc.  Not sure that adding this will make any difference since it's GCC i'm compiling but might be worth a shot.  I've been having this issue through several versions now.

Thanks for any feedback.

~jtriley

(In reply to comment #10)
> Created an attachment (id=128448) [edit]
> output of last libtool command before failure with --debug option
> 
> vapier: running libtool produced the same error. Here is the result of the
> libtool --debug. I put the exact command used to produce the output at the top
> of the file in case of any errors
> 

Comment 12 Anders Persson 2008-03-02 21:05:34 UTC
It is still the same for me with gcc-4.2.3. So far none of gcc-4.2.x has worked.

...
/usr/lib64/librt.so: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[8]: *** [libgomp.la] Error 1
make[8]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.3/work/build/x86_64-pc-linux-gnu/32/libgomp'
make[7]: *** [all-recursive] Error 1
make[7]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.3/work/build/x86_64-pc-linux-gnu/32/libgomp'
make[6]: *** [all] Error 2
make[6]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.3/work/build/x86_64-pc-linux-gnu/32/libgomp'
make[5]: *** [multi-do] Error 1
make[5]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.3/work/build/x86_64-pc-linux-gnu/libgomp'
make[4]: *** [all-multi] Error 2
make[4]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.3/work/build/x86_64-pc-linux-gnu/libgomp'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.3/work/build/x86_64-pc-linux-gnu/libgomp'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.3/work/build/x86_64-pc-linux-gnu/libgomp'
make[1]: *** [all-target-libgomp] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.2.3/work/build'
make: *** [profiledbootstrap] Error 2
 * 
 * ERROR: sys-devel/gcc-4.2.3 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 4609:  Called toolchain_src_compile
 *             environment, line 5078:  Called gcc_src_compile
 *             environment, line 2934:  Called gcc_do_make
 *             environment, line 2764:  Called die
 * The specific snippet of code:
 *       emake LDFLAGS="${LDFLAGS}" STAGE1_CFLAGS="${STAGE1_CFLAGS}" LIBPATH="${LIBPATH}" BOOT_CFLAGS="${BOOT_CFLAGS}" ${GCC_MAKE_TARGET} || die "emake failed with ${GCC_MAKE_TARGET}";
 *  The die message:
 *   emake failed with profiledbootstrap
...


# gcc-config -l
 [1] x86_64-pc-linux-gnu-3.4.6
 [2] x86_64-pc-linux-gnu-3.4.6-hardened
 [3] x86_64-pc-linux-gnu-3.4.6-hardenednopie
 [4] x86_64-pc-linux-gnu-3.4.6-hardenednopiessp
 [5] x86_64-pc-linux-gnu-3.4.6-hardenednossp
 [6] x86_64-pc-linux-gnu-4.1.2 *


# emerge --info
Portage 2.1.4.4 (default-linux/amd64/2006.1, gcc-4.1.2, glibc-2.7-r1, 2.6.24-gentoo x86_64)
=================================================================
System uname: 2.6.24-gentoo x86_64 Intel(R) Pentium(R) Dual CPU E2140 @ 1.60GHz
Timestamp of tree: Sun, 02 Mar 2008 08:46:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.5
dev-lang/python:     2.3.6-r2, 2.4.4-r4, 2.5.1-r5
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
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.1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.24
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -march=nocona -msse3 -O2"
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/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-pipe -march=nocona -msse3 -O2"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://ftp.tu-clausthal.de/pub/linux/gentoo/ ftp://ftp.linux.ee/pub/gentoo/distfiles/ http://ftp.linux.ee/pub/gentoo/distfiles/ ftp://trumpetti.atm.tut.fi/gentoo/"
LINGUAS="sv sv_SE"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/xeffects/trunk /usr/local/portage /usr/local/overlays/gentoo-science-overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X aac aalib acpi alsa amd64 amrnb amrwb apache2 arts authdaemond berkdb bitmap-fonts bonobo browserplugin bzip2 cairo cdparanoia cdr cgi cli cracklib crypt ctype cups curl dba dbus dri dts dvd dvdr dvdread emerald encode esd firefox flash fortran freetype ftp gd gdbm gimp glitz gpm gtk gtk2 hal iconv ipv6 isdnlog ivtv java javascript jpeg libcaca lm_sensors mad midi mp3 msn mudflap musepack mysql mysqli ncurses nls nptl nptlonly nvidia opengl openmp pam panel-plugin pango pcre pear perl plugins png ppds pppd python qt3 quicktime rc5 readline reflection rtc sasl sdl session smp sockets spl sse3 sse4 ssl svg tcpd tiff trash-panel-plugin truetype truetype-fonts type1 type1-fonts unicode usb vhosts wmf xanim xml xorg xv xvid xvmc" ALSA_CARDS="hda-intel" 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" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="sv sv_SE" USERLAND="GNU" VIDEO_CARDS="nv nvidia%"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 13 JTRiley 2008-03-05 17:10:11 UTC
(In reply to comment #12)
> It is still the same for me with gcc-4.2.3. So far none of gcc-4.2.x has
> worked.
> 

Well guys, I've fixed the problem for myself but it was a rather horrendous process and took a lot of hacking.  The first thing I did after revisiting this bug was to see which package owned /usr/lib64/librt.so: 

$ equery belongs /usr/lib64/librt.so

Interestingly enough it turned out that librt.so belonged to BOTH glibc and this third party ebuild I installed for brlcad.....BIG BIG no no (this should never happen...two packages should never own the same file)

SO, it turns out for me the culprit in all this mess was the combination of a faulty brlcad ebuild I pulled off the web and the lack of collision-protect in my portage FEATURES (DOH!!!!!!!!!!!!!!!!!!!!!!!!!!!). 

After figuring out brlcad also "owned" /usr/lib64/librt.so I decided to see what else it had overwritten in /usr/lib64 and to my suprise it was quite a bit. Worse yet, my libtool archives (ie *.la files in /usr/lib64) had references to these files along with brlcad specific libraries that should not have been referenced. Vapier, this explains why -lrt was not passed by libtool...the brlcad build screwed my libtool archives.

So, to begin with I first quickpkg'd brlcad and then unmerged it. (NOTE: It was very important to quickpkg, otherwise tons of stuff would have been broken...the biggest one for me that broke was VI.  Quickpkg'ing lets you untar the package and export LD_LIBRARY_PATH to get back crucial apps such as vi.  Had I just removed the package, I would've been in even more trouble. )  I then re-emerged the packages which owned any files overwritten by brlcad.  Unfortunately there were libraries that did exclusively belong to brlcad that were being linked to (by LOTS of packages) so there was nothing left to do but a revdep-rebuild. 

This brought up about 420 packages to recompile.  Worse yet, since my libtool files were corrupted by brlcad I couldn't even recompile a lot of packages.  

So to make a long story short, since this is not a gentoo or gcc bug, I ended up writing a python script to fix my libtool archives, and then running revdep-rebuild.  Some might say i should have just done an emerge -e world but I didn't wanna go through all that and besides I learned quite a bit about libtool and got some python practice in the end.  

From searching around on the forums it looks like others have experienced this problem as well:

http://forums.gentoo.org/viewtopic-t-370913-highlight-brlcad.html?sid=6b1a53b5dad2e9b430913a65d9a22fe6

For anyone who is interested I will be blogging in more detail about this disaster at http://www.gentoojedi.com/blog/jtriley since it took me quite a bit of time to resolve. 

Thanks,

~jtriley
  
Comment 14 SpanKY gentoo-dev 2008-03-10 15:25:08 UTC
thanks for the info