Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77924 - gcc-3.4.3-r1 fails to compile
Summary: gcc-3.4.3-r1 fails to compile
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High critical (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-13 19:17 UTC by Lee Trager
Modified: 2005-03-15 19:38 UTC (History)
2 users (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 Lee Trager 2005-01-13 19:17:09 UTC
I tried to reemerge gcc last night and it fails to compile every time.

Reproducible: Always
Steps to Reproduce:
1. emerge gcc

Actual Results:  
 if [ -f 32/libgcc_s.so.1 ]; then mv -f 32/libgcc_s.so.1
32/libgcc_s.so.1.`basename `; else true; fi && mv 32/libgcc_s.so.1.tmp
32/libgcc_s.so.1 && ln -s 32/libgcc_s.so.1 libgcc_s_32.so
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../libc.so when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../libc.a when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.so when
searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libc.a when
searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make[2]: *** [32/libgcc_s_32.so] Error 1
make[2]: Leaving directory `/var/tmp/portage/gcc-3.4.3-r1/work/build/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.3-r1/work/build/gcc'
make: *** [all-gcc] Error 2

Expected Results:  
It compiles

Portage 2.0.51-r12 (gcc34-amd64-2004.1, gcc-3.4.3, glibc-2.3.4.20041102-r0,
2.6.10-ck4 x86_64)
=================================================================
System uname: 2.6.10-ck4 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.6.8
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Sep  4 2004, 11:09:58)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.9.4, 1.8.5-r2, 1.6.3, 1.7.9, 1.4_p6
sys-devel/binutils:  2.15.92.0.2-r2
sys-devel/libtool:   1.5.10-r2
virtual/os-headers:  2.6.8.1-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CFLAGS="-march=k8 -O3 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config
/var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=k8 -O3 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distlocks"
GENTOO_MIRRORS="http://distfiles.gentoo.org
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aalib alsa amd64 apm arts avi berkdb bitmap-fonts bzlib cdb cdr crypt
cups dedicated divx4linux dvb dvd dvdr encode esd ethereal f77 font-server
foomaticdb fortran ftp gdbm gif gimpprint gpm gstreamer gtk gtk2 gtk2gtkhtml
imagemagick imlib ipv6 java jpeg kde libg++ libwww mikmod mmap mng motif mozilla
mpeg multilib ncurses nls nptl oggvorbis openal opengl oss pam pdflib perl png
python qt quicktime readline sdl slang spell ssl tcpd truetype truetype-fonts
type1-fonts videos xine xml2 xmms xpm xv zlib"
Unset:  LDFLAGS, PORTDIR_OVERLAY
Comment 1 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-14 20:57:30 UTC
did you have USE=multitarget when you emerged binutils?  I remember having an issue when building 32/libgcc_s_32.so that was related to multitarget (don't ask me why, I haven't looked into that part yet), but re-emerging binutils with USE=-multitarget is the workaround.
Comment 2 Lee Trager 2005-01-14 23:01:04 UTC
No I do not have multitarget in my USE flags. I tried compiling everything with USE="-multitarget" but I still get the same problem.
Comment 3 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-14 23:09:29 UTC
can you tell me what this outputs:

$ ld --help | grep targets:
Comment 4 Lee Trager 2005-01-14 23:11:07 UTC
Sure

ld --help | grep targets
  --gc-sections               Remove unused sections (on some targets)
  --relax                     Relax branches on certain targets
ld: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux efi-app-ia32 elf64-little elf64-big elf32-little elf32-big srec symbolsrec tekhex binary ihex
Comment 5 Lee Trager 2005-01-14 23:18:00 UTC
I was just looking through ld --help and saw this

ld: supported emulations: elf_x86_64 elf_i386 i386linux

Not sure if it will be of use but I thought I might as well post it.
Comment 6 Jeremy Huddleston (RETIRED) gentoo-dev 2005-01-14 23:29:24 UTC
I just noticed you have a really old profile which doesn't support a multilib toolchain.  Please update to default-linux/amd64/2004.3 using the following instructions:

# emerge -n '>=sys-apps/portage-2.0.51'
# cd /etc/
# rm make.profile
# ln -s ../usr/portage/profiles/default-linux/amd64/2004.3 make.profile
# emerge -upv system
# emerge -uv system

If you have trouble, please email the list (gentoo-amd64@gentoo.org)
Comment 7 Lee Trager 2005-01-15 13:51:06 UTC
Well that didn't fix it. I tried recompile binutils glibc and gcc with the new profile and it did not fix it. The only thing updating the profile changed was 

Portage 2.0.51-r12 (gcc34-amd64-2004.1, gcc-3.4.3, glibc-2.3.4.20041102-r0,
2.6.10-ck4 x86_64)

To

Portage 2.0.51-r12 (default-linux/amd64/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10-ck4 x86_64)

Anyway I guess ill be posting to the list.

Thanks

Lee
Comment 8 Michael Ploujnikov 2005-03-15 19:38:17 UTC
This might or might not fix your problems - I've seen the same error with various setups and possible explanations. It helped me emerge gcc with multilib support in the 2004.3 profile:

re-emerge emul-linux-x86-glibc emul-linux-x86-baselibs
then re-emerge glibc
then emerging gcc doesn't fail with the error in this bug report

fyi I was re-emerging:
emul-linux-x86-baselibs-1.2.2-r2
emul-linux-x86-glibc-1.1
glibc-2.3.4.20041102
gcc-3.4.3-r1