The gcc-3.3.3-r3 ebuild fails on this machine apparently trying to link to libc6 (!!). The build output follows: make[4]: Entering directory `/var/tmp/portage/gcc-3.3.3-r3/work/build/gcc' ./xgcc -B./ -B/usr/x86_64-pc-linux-gnu/bin/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -I. -I32 -I/var/tmp/portage/gcc-3.3.3-r3/work/gcc-3.3.3/gcc -I/var/tmp/portage/gcc-3.3.3-r3/work/gcc-3.3.3/gcc/32 -I/var/tmp/portage/gcc-3.3.3-r3/work/gcc-3.3.3/gcc/config -I/var/tmp/portage/gcc-3.3.3-r3/work/gcc-3.3.3/gcc/../include -m32 -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-omit-frame-pointer -fno-asynchronous-unwind-tables \ -c /var/tmp/portage/gcc-3.3.3-r3/work/gcc-3.3.3/gcc/crtstuff.c -DCRT_BEGIN -DCRTSTUFFT_O \ -o 32/crtbeginT.o /var/tmp/portage/gcc-3.3.3-r3/work/gcc-3.3.3/gcc/crtstuff.c: In function `__do_global_dtors_aux': /var/tmp/portage/gcc-3.3.3-r3/work/gcc-3.3.3/gcc/crtstuff.c:280: warning: passing arg 1 of `__deregister_frame_info' discards qualifiers from pointer target type /var/tmp/portage/gcc-3.3.3-r3/work/gcc-3.3.3/gcc/crtstuff.c: In function `frame_dummy': /var/tmp/portage/gcc-3.3.3-r3/work/gcc-3.3.3/gcc/crtstuff.c:316: warning: passing arg 1 of `__register_frame_info' discards qualifiers from pointer target type make[4]: Leaving directory `/var/tmp/portage/gcc-3.3.3-r3/work/build/gcc' ./xgcc -B./ -B/usr/x86_64-pc-linux-gnu/bin/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -DHAVE_SYSLOG -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -D_LIBC_PROVIDES_SSP_ -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/32/libgcc.map -o 32/libgcc_s.so.1 -m32 libgcc/32/_muldi3.o libgcc/32/_negdi2.o libgcc/32/_lshrdi3.o libgcc/32/_ashldi3.o libgcc/32/_ashrdi3.o libgcc/32/_cmpdi2.o libgcc/32/_ucmpdi2.o libgcc/32/_floatdidf.o libgcc/32/_floatdisf.o libgcc/32/_fixunsdfsi.o libgcc/32/_fixunssfsi.o libgcc/32/_fixunsdfdi.o libgcc/32/_fixdfdi.o libgcc/32/_fixunssfdi.o libgcc/32/_fixsfdi.o libgcc/32/_fixxfdi.o libgcc/32/_fixunsxfdi.o libgcc/32/_floatdixf.o libgcc/32/_fixunsxfsi.o libgcc/32/_fixtfdi.o libgcc/32/_fixunstfdi.o libgcc/32/_floatditf.o libgcc/32/_clear_cache.o libgcc/32/_trampoline.o libgcc/32/__main.o libgcc/32/_exit.o libgcc/32/_absvsi2.o libgcc/32/_absvdi2.o libgcc/32/_addvsi3.o libgcc/32/_addvdi3.o libgcc/32/_subvsi3.o libgcc/32/_subvdi3.o libgcc/32/_mulvsi3.o libgcc/32/_mulvdi3.o libgcc/32/_negvsi2.o libgcc/32/_negvdi2.o libgcc/32/_ctors.o libgcc/32/_stack_smash_handler.o libgcc/32/_ffssi2.o libgcc/32/_ffsdi2.o libgcc/32/_clz.o libgcc/32/_clzsi2.o libgcc/32/_clzdi2.o libgcc/32/_ctzsi2.o libgcc/32/_ctzdi2.o libgcc/32/_popcount_tab.o libgcc/32/_popcountsi2.o libgcc/32/_popcountdi2.o libgcc/32/_paritysi2.o libgcc/32/_paritydi2.o libgcc/32/_divdi3.o libgcc/32/_moddi3.o libgcc/32/_udivdi3.o libgcc/32/_umoddi3.o libgcc/32/_udiv_w_sdiv.o libgcc/32/_udivmoddi4.o libgcc/32/unwind-dw2.o libgcc/32/unwind-dw2-fde-glibc.o libgcc/32/unwind-sjlj.o libgcc/32/unwind-c.o -lc && rm -f libgcc_s_32.so && ln -s 32/libgcc_s.so.1 libgcc_s_32.so /usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6 /usr/x86_64-pc-linux-gnu/bin/ld: cannot find /lib/libc.so.6 collect2: ld returned 1 exit status make[3]: *** [32/libgcc_s_32.so] Error 1 make[3]: Leaving directory `/var/tmp/portage/gcc-3.3.3-r3/work/build/gcc' make[2]: *** [stmp-multilib] Error 2 make[2]: Leaving directory `/var/tmp/portage/gcc-3.3.3-r3/work/build/gcc' make[1]: *** [stage1_build] Error 2 make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.3-r3/work/build/gcc' make: *** [bootstrap-lean] Error 2 !!! ERROR: sys-devel/gcc-3.3.3-r3 failed. !!! Function src_compile, Line 503, Exitcode 2 !!! (no error message) ======================================================== ... the relevant line in the output seems to be : "/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /lib/libc.so.6 when searching for /lib/libc.so.6" I'm not sure what else to include in this report. the system is following ~amd64, and is kept pretty current. Let me know if I can provide you with any more information. Reproducible: Always Steps to Reproduce: 1.emerge gcc (OR) 2.emerge -u world 3. Actual Results: build fails, world update fails. Expected Results: produced a gnu compiler system. Computer is a shuttle SN85G4 with an amd64 3200+/1G ram/SiL sata drive. It is tracking ~amd64. build fails every time.
Are we sure /lib/libc.so.6 is 64bit? I am not too familiar with amd64 setup ...
nothing needs to be ported... this is a toolchain bug, not a gcc-porting one. gcc 3.3.3-r3 seems to be pretty buggy on amd64 in general, in my experience... however, i have been working on gcc 3.4.0 so i havent looked into this much. azarah - our glibc doesnt compile 32bit anything, even with multilib enabled. it's patched specifically not to do this. all 32bit libs are provided by the emul packages.
Please sync and remerge emul-linux-x86-baselibs.
Brian: ping? Please let us know if emerge "=app-emulation/emul-linux-x86-baselibs-1.1" after a sync helps.
Sorry, I replied to the email update I got (I come from a mostly debian environment. =). Here's my update: I synced the box, and remerged emul-linux-x86-baselibs. Same thing. I then did 'emerge -e emul-linux-x86-baselibs', and the gcc build is still broken... other options? -Brian
Sure try gcc-3.3.3-r2 if that fails then try gcc-3.3.3. Also could you please provide output from 'ld -v' and 'emerge info'. 'emerge info' should be included with nearly every single bug you submit to bugzilla (saves us from playing guessing games).
Sorry. I was somewhat ignorant of the relevant gentooisms that aid bugreporting. Here's the output you requested: ========================================= infiltrator root # emerge info Portage 2.0.50-r6 (default-amd64-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040420-r0, 2.6.5-gentoo) ================================================================= System uname: 2.6.5-gentoo x86_64 4 Gentoo Base System version 1.4.9 Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-O2" CHOST="x86_64-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/init.d /etc/terminfo /etc/env.d" CXXFLAGS="-O2" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://www.gtlib.cc.gatech.edu/pub/gentoo http://212.219.247.12/sites/www.ibiblio.org/gentoo/ http://212.219.247.15/sites/www.ibiblio.org/gentoo/ http://212.219.247.18/sites/www.ibiblio.org/gentoo/" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X aalib alsa amd64 apm arts avi berkdb bonobo cdr crypt cups dvd encode foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml imlib jpeg kde libg++ libwww mikmod motif mozilla mpeg multilib ncurses nls nogcj oggvorbis opengl oss pam pdflib perl png python qt quicktime readline ruby sdl slang spell ssl tcltk tcpd truetype xml2 xmms xv zlib" =================================== infiltrator root # ld -v GNU ld version 2.15.90.0.1.1 20040303
I've also experienced this bug. usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.3/../../../libc.so when searching for -lc /usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.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[3]: *** [32/libgcc_s_32.so] Error 1 make[3]: *** Waiting for unfinished jobs.... make[3]: Leaving directory `/var/tmp/portage/gcc-3.3.3-r3/work/build/gcc' make[2]: *** [stmp-multilib] Error 2 make[2]: Leaving directory `/var/tmp/portage/gcc-3.3.3-r3/work/build/gcc' make[1]: *** [stage1_build] Error 2 make[1]: Leaving directory `/var/tmp/portage/gcc-3.3.3-r3/work/build/gcc' make: *** [bootstrap-lean] Error 2 Portage 2.0.50-r6 (default-amd64-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040420-r0, 2.6.3-gentoo-r2) ================================================================= System uname: 2.6.3-gentoo-r2 x86_64 5 Gentoo Base System version 1.4.12 Autoconf: sys-devel/autoconf-2.59-r3 Automake: sys-devel/automake-1.8.3 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-O2 -pipe" CHOST="x86_64-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://gentoo.mirrors.pair.com/ ftp://gentoo.mirrors.pair.com/ ftp://ibiblio.org/pub/Linux/distributions/gentoo/" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X amd64 apm arts avi berkdb cdr crypt encode esd foomaticdb gdbm gif gnome gnome2 gpm gtk gtk2 imlib jpeg kde libg++ libwww mikmod motif mozilla mpeg multilib mysql ncurses nls nogcj nptl oggvorbis opengl oss pam pdflib perl png python qt quicktime readline sdl slang spell ssl tcltk tcpd tetex truetype xml2 xmms xv zlib"
You both try to build gcc with multilib and when trying to link the 32bit binaries, ld only tries to use the 64bit libc. This _should_ be prohibited by /etc/env.d/75emul-linux-x86-baselibs. The content of that env.d file should be: LDPATH=/lib32:/usr/lib32:/usr/lib32/gcc-lib/i686-pc-linux-gnu/3.3.2 Please check if it's exactly that line, as you both have "/etc/env.d" in the list of protected config directorys. You most certainly have to do etc-update and after that env-update to load the environmental variables.
does this bug still occur with the current emul libs and gcc?
Reopen if you still got problems. WORKSFORME
*** Bug 86279 has been marked as a duplicate of this bug. ***