Attempting to emerge various apps after upgrading to gcc-3.4.2 results in "cannot find -lgcc_s" errors. Reproducible: Always Steps to Reproduce: 1.upgrade to gcc-3.4.2 2.emerge 'apps' (qt, gtkmm, etc) 3. Actual Results: /usr/lib/gcc/i686-pc-linux-gnu/3.4.2/../../../../i686-pc-linux-gnu/bin/ld: cannot find -lgcc_s collect2: ld returned 1 exit status Expected Results: successfull emerge Looks like the /usr/lib/gcc/i686-pc-linux-gnu/3.4.2/libgcc_s.so.1 file is not created, nor it's symbolic link /usr/lib/gcc/i686-pc-linux-gnu/3.4.2/libgcc_s.so
Just confirming the problem. I am assumeing that libgcc_s.so.1 is what gcc-config is complaing about when it says there's no profile set.
can you please give us more info? like the output of "emerge info". also, i'd like the output of: find /lib{,32,64}/ /usr/lib/gcc/ -name libgcc_s*
find /lib{,32,64}/ /usr/lib/gcc/ -name libgcc_s* provides: /lib/libgcc_s.so.1 /lib/libgcc_s-3.4.2.so.1 find: /lib32/: No such file or directory find: /lib64/: No such file or directory /usr/lib/gcc/i686-pc-linux-gnu/3.3.4/libgcc_s.so.1 /usr/lib/gcc/i686-pc-linux-gnu/3.3.4/libgcc_s.so
# emerge info Portage 2.0.50-r10 (gcc34-x86-2004.2, gcc-3.4.2, glibc-2.3.4.20040808-r0, 2.6.8-gentoo-r3) ================================================================= System uname: 2.6.8-gentoo-r3 i686 Intel(R) Pentium(R) 4 CPU 2.53GHz Gentoo Base System version 1.5.3 Autoconf: sys-devel/autoconf-2.59-r4 Automake: sys-devel/automake-1.8.5-r1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe -s" CHOST="i686-pc-linux-gnu" COMPILER="" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/share/config:/usr/kde/3.3/env:/usr/kde/3.3/shutdown /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 -march=pentium4 -fomit-frame-pointer -pipe -s" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://mirrors.tds.net/gentoo http://gentoo.seren.com/gentoo http://open-systems.ufl.edu/mirrors/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 acpi alsa apache2 arts audiofile avi berkdb bonobo cdr crypt cups curl dv dvd dvdrencode esd flac gdbm gif gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile imap imlib jack java jpegkde lcms ldap libg++ libwww mad mikmod mmx motif mozilla mpeg ncurses nls nptl oggvorbis opengloss pam pda pdflib perl png ppds python qt quicktime readline samba sasl scanner sdl slang spell sse ssl svg svga tcltk tcpd tetex theora threads tiff truetype unicode usb wmf x86 xml xml2 xmms xv zlib"
I am able to work around the problem by copying /lib/libgcc_s-3.4.2.so.1 to /usr/lib/gcc/i686-pc-linux-gnu/3.4.2/libgcc_s.so.1 then making the symbolic link /usr/lib/gcc/i686-pc-linux-gnu/3.4.2/libgcc_s.so to the newly copied file.
In case it matters this was an upgrade from gcc-3.4.2_pre20040902 although portage seemed to treat the gcc-3.4.2 as a new emerge and not an upgrade ("N" instead of "U") although it did seem to uninstall gcc-3.4.2_pre20040902.
can anyone snagging this bug list for me some apps that fail to build?
wow. i just noticed that you dont have libgcc_s.so. can you remove your previous symlink, cd /lib, and ln -s libgcc_s.so.1 libgcc_s.so ? does that fix it?
There's report in the GCC 3.4 thread on the forum about qt failing. For me both gtkmm and libsigc++ failed.
"can you remove your previous symlink, cd /lib, and ln -s libgcc_s.so.1 libgcc_s.so ? does that fix it?" Yes, that fixes it as well. When handling it the other way I was using the error plus my /usr/lib/gcc/i686-pc-linux-gnu/3.3.4/ ls as a guide. Should libgcc_s* be in /usr/lib/gcc/i686-pc-linux-gnu/3.4.2/ or just in /lib/ ?
i moved it to /lib{,32,64} for 3.4.2 to fix another set of bugs, so it should only be there. oddly enough, on amd64 you will never snag this bug because the 32bit and 64bit libs are installed to their own directories and libgcc_s.so is properly created... so i didnt notice i had broken anything by making the change. so, just to make -sure- i have this right... you did remove all the symlink stuff from /usr/lib/gcc before making the symlink? silly question, i know, but i'm not going to test 3.4.2 on x86 myself until it's finished and ready to be unmasked. ;) so i want to know for sure before adding a fix to the ebuild.
"so, just to make -sure- i have this right... you did remove all the symlink stuff from /usr/lib/gcc before making the symlink?" Yes. Then I remerged libsigc++ as a test. Your find command now shows: # find /lib{,32,64}/ /usr/lib/gcc/ -name libgcc_s* /lib/libgcc_s.so.1 /lib/libgcc_s.so /lib/libgcc_s-3.4.2.so.1 find: /lib32/: No such file or directory find: /lib64/: No such file or directory /usr/lib/gcc/i686-pc-linux-gnu/3.3.4/libgcc_s.so.1 /usr/lib/gcc/i686-pc-linux-gnu/3.3.4/libgcc_s.so Whereas before (with my fix) it was: # find /lib{,32,64}/ /usr/lib/gcc/ -name libgcc_s* /lib/libgcc_s.so.1 /lib/libgcc_s-3.4.2.so.1 find: /lib32/: No such file or directory find: /lib64/: No such file or directory /usr/lib/gcc/i686-pc-linux-gnu/3.3.4/libgcc_s.so.1 /usr/lib/gcc/i686-pc-linux-gnu/3.3.4/libgcc_s.so /usr/lib/gcc/i686-pc-linux-gnu/3.4.2/libgcc_s.so.1 /usr/lib/gcc/i686-pc-linux-gnu/3.4.2/libgcc_s.so
rock on :) fixed in cvs, give it a little bit to reach rsync.
Just for reference, when a few of us on the mips team were testing n32 userland builds, we ran into this problem as well. libgcc_s.so wasn't missing it looks, just not where it was supposed to be. lv, your fix possibly cover this as well?
kumba: i dont know, i dont have a mips box to test on. if mips doesnt normally install libgcc_s to lib32 and/or lib64, then yes this should fix that too. there are a number of changes to gcc 3.4.2 that could use some testing on mips... i gutted the ABI= stuff since it's pretty unclean looking to me. can you poke me on irc to talk about that more? when i think 3.4.2 is ready to be unmasked it would probably be helpful if i first tested on iluxa's mips box.
*** Bug 63442 has been marked as a duplicate of this bug. ***