Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63333 - "cannot find -lgcc_s" errors after upgrading to gcc 3.4.2
Summary: "cannot find -lgcc_s" errors after upgrading to gcc 3.4.2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High critical
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 63442 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-08 11:02 UTC by Chris Smith
Modified: 2004-09-09 12:33 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 Chris Smith 2004-09-08 11:02:11 UTC
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
Comment 1 Hiel Van Campen 2004-09-08 13:30:00 UTC
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.
Comment 2 Travis Tilley (RETIRED) gentoo-dev 2004-09-08 14:37:02 UTC
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*
Comment 3 Chris Smith 2004-09-08 14:52:56 UTC
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
Comment 4 Chris Smith 2004-09-08 14:53:52 UTC
# 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"
Comment 5 Chris Smith 2004-09-08 14:57:25 UTC
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.
Comment 6 Chris Smith 2004-09-08 15:04:21 UTC
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.
Comment 7 Travis Tilley (RETIRED) gentoo-dev 2004-09-08 15:29:29 UTC
can anyone snagging this bug list for me some apps that fail to build?
Comment 8 Travis Tilley (RETIRED) gentoo-dev 2004-09-08 15:35:23 UTC
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?
Comment 9 Chris Smith 2004-09-08 15:38:26 UTC
There's report in the GCC 3.4 thread on the forum about qt failing. For me both gtkmm and libsigc++ failed.
Comment 10 Chris Smith 2004-09-08 15:47:20 UTC
"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/ ? 
Comment 11 Travis Tilley (RETIRED) gentoo-dev 2004-09-08 16:03:47 UTC
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.
Comment 12 Chris Smith 2004-09-08 16:12:03 UTC
"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
Comment 13 Travis Tilley (RETIRED) gentoo-dev 2004-09-08 16:21:02 UTC
rock on :)
fixed in cvs, give it a little bit to reach rsync.
Comment 14 Joshua Kinard gentoo-dev 2004-09-08 18:40:52 UTC
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?
Comment 15 Travis Tilley (RETIRED) gentoo-dev 2004-09-08 18:52:06 UTC
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.
Comment 16 Jean-François Gagnon Laporte 2004-09-09 12:33:52 UTC
*** Bug 63442 has been marked as a duplicate of this bug. ***