Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
After upgrading gcc, libstdc++.so.5 no longer exists
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Wed Mar 16, 2005 4:10 pm    Post subject: After upgrading gcc, libstdc++.so.5 no longer exists Reply with quote

Hi all,

I just updated from glibc-2.3.4.20040808-r1 to glibc-2.3.4.20041102-r1. I emerged it with a script that rebuilds the toolkit.

After the whole process was through, most of my applications stopped working. The common error is as follows:

Code:

$mplayer
mplayer: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory


I looked in /usr/lib for the library in question, but it wasn't there.

If I run a revdep-rebuild it bitches about all the broken files and, again, the culprit is libstdc++.so.5.

I am running gcc-3.3.5-r1.

How do I get things running correctly again?

Alex

Mod edit: Changed the title to be slightly less misleading. Was "After upgrading glibc...". --Maedhros
Back to top
View user's profile Send private message
paladin-zero
Guru
Guru


Joined: 19 May 2004
Posts: 322

PostPosted: Wed Mar 16, 2005 4:27 pm    Post subject: Reply with quote

Thats interesting. After updating glibc this morning, I also do not have libstdc++.so.5 in /usr/lib, but revdep-rebuild didnt find a package that complained about it. Maybe I didnt have that library before the update. I am able to run my programs, such as mplayer.

Maybe your problem was exacerbated by running the emrg-wrapper.sh script? (mentioned in a related thread)
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Wed Mar 16, 2005 4:31 pm    Post subject: Reply with quote

Hi again,

paladin-zero wrote:
Thats interesting. After updating glibc this morning, I also do not have libstdc++.so.5 in /usr/lib, but revdep-rebuild didnt find a package that complained about it. Maybe I didnt have that library before the update. I am able to run my programs, such as mplayer.

Maybe your problem was exacerbated by running the emrg-wrapper.sh script? (mentioned in a related thread)


I'm really doubtful that it had something to with emrg_wrapper.sh, though I don't know for sure. What version of gcc are you running as, I believe, it's gcc that provides the libstdc++ stuff?

Best,

Alex
Back to top
View user's profile Send private message
paladin-zero
Guru
Guru


Joined: 19 May 2004
Posts: 322

PostPosted: Wed Mar 16, 2005 4:36 pm    Post subject: Reply with quote

I have 3.3.5-r1
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Wed Mar 16, 2005 4:37 pm    Post subject: Reply with quote

paladin-zero wrote:
I have 3.3.5-r1


Ok, no difference there. Perhaps there's something I don't know about, i.e., whether they've moved to differently named libraries and you started out at 3.3.5-r1 whereas I did not. This is puzzling.

Best,

Alex
Back to top
View user's profile Send private message
NiLuJe
Guru
Guru


Joined: 06 Nov 2004
Posts: 303
Location: Paris, France

PostPosted: Wed Mar 16, 2005 5:04 pm    Post subject: Reply with quote

I think the problem comes from a change in the toolchain eclass (wich seems to have been updated today ^^) ... I only recompiled gcc, and had the same problem .. I found out that for some reason (is_cxx test failing? Another thing?) Emerge/Portage wasn't adding ',c++' to the --enabled-languages option of gcc's configure .. (I ended up hardcoding the var GCC_LANG to 'c,c++' instead of 'c' in the toolchain eclass .. Ugly 'workaround' :/ )

(btw, I'm using gcc-3.4.3-20050110)


Last edited by NiLuJe on Wed Mar 16, 2005 5:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Wed Mar 16, 2005 5:10 pm    Post subject: Reply with quote

Hi,

NiLuJe wrote:
I think the problem comes from a change in the toolchain eclass (wich seems to have been updated today ^^) ... I only recompiled gcc, and had the same problem .. I found out that for some reason (is_cxx test failing? Another thing?) Emerge/Portage wasn't adding ',c++' to the --enabled-languages option of gcc's configure .. (I ended up hardcoding the var GCC_LANG to 'c,c++' in the toolchain eclass .. Ugly 'workaround' :/ )


Yes, I am getting some fails for the cpp sanity checks when I try to emerge some pacakges, so it sounds like the same problem you were having.

Is this the sort of problem that is likely to be fixed soon by the maintainers of portage? I tend to avoid workarounds. Could you post the steps you took to get around the problem?

Best,

Alex
Back to top
View user's profile Send private message
NiLuJe
Guru
Guru


Joined: 06 Nov 2004
Posts: 303
Location: Paris, France

PostPosted: Wed Mar 16, 2005 5:13 pm    Post subject: Reply with quote

I simply changed

Code:
GCC_LANG="c"

to
Code:
GCC_LANG="c,c++"


line 946 of /usr/portage/eclass/toolchain.eclass

I recompiled gcc, and it was okay ;)

(Note that these changes won't survive after an emerge --sync ;) )
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Wed Mar 16, 2005 5:20 pm    Post subject: Reply with quote

Hi,

NiLuJe wrote:
I simply changed

Code:
GCC_LANG="c"

to
Code:
GCC_LANG="c,c++"


line 946 of /usr/portage/eclass/toolchain.eclass

I recompiled gcc, and it was okay ;)

(Note that these changes won't survive after an emerge --sync ;) )


Ok, seems simple enough and I hope they fix it up properly in the near future. I'm going to make the change, start my toolchain going again, and go to lunch. Hopefully all will be well again afterwards (I'll post on it one way or another).

Oh yeah, if it does work, it'll be the second time in two days that somebody from France has been a help. Some script kiddie from France was barraging my system with some 400+ attempts at logging in illegally. The sysadmin over there was wonderfully prompt in getting back to me and dealing with the problem.

Best,

Alex
Back to top
View user's profile Send private message
jonaswidarsson
Apprentice
Apprentice


Joined: 16 Jan 2004
Posts: 273
Location: Göteborg, Sweden

PostPosted: Wed Mar 16, 2005 5:24 pm    Post subject: Reply with quote

Are/were you as I missing the g++ binary?
I have this post explaining my problem.
I will try the suggestion NiLuJe made above as soon as the current gcc emerge is finished, and I discover it didn't work...
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Wed Mar 16, 2005 5:27 pm    Post subject: Reply with quote

Hi,

I was wondering, have you posted this problem to the gentoo bugtracker yet? If not, perhaps it'd be worth doing.

Best,

Alex
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Wed Mar 16, 2005 5:38 pm    Post subject: Reply with quote

Ok... I really fscked things up during the re-emerge of a lower version of glibc, bad things happened (can't log into the system remotely and right before it happened, doing something as simple as ls led to a segault).

I have a copy of the livecd. I imagine that the main thing I need to do is to boot from it, chroot, and then re-emerge the correct version of the offending package. Is that right?

Best,

Alex
Back to top
View user's profile Send private message
NiLuJe
Guru
Guru


Joined: 06 Nov 2004
Posts: 303
Location: Paris, France

PostPosted: Wed Mar 16, 2005 5:47 pm    Post subject: Reply with quote

jonaswidarsson > Yes, since it was skipping all c++ support, it wasn't building g++ ;)

evoweiss > Awww :/ Good Luck!
Back to top
View user's profile Send private message
jonaswidarsson
Apprentice
Apprentice


Joined: 16 Jan 2004
Posts: 273
Location: Göteborg, Sweden

PostPosted: Wed Mar 16, 2005 5:51 pm    Post subject: Reply with quote

NiLuJe wrote:
jonaswidarsson > Yes, since it was skipping all c++ support, it wasn't building g++ ;)
I am sitting like an idiot looking at the output right now and lots and lots of things fly by mentioning c++, so it oughtta go well this time.
Thank you so much!
Did you file a bug?

NiLuJe wrote:

evoweiss > Awww :/ Good Luck!
Seconded... Awww!
evoweiss, please tell us if you managed to get it up again. It is nice to know just how bad errors one can recover from.
Back to top
View user's profile Send private message
roymaster
n00b
n00b


Joined: 05 Jan 2003
Posts: 64
Location: Europe

PostPosted: Wed Mar 16, 2005 5:54 pm    Post subject: Reply with quote

NiLuJe wrote:
I simply changed

Code:
GCC_LANG="c"

to
Code:
GCC_LANG="c,c++"


line 946 of /usr/portage/eclass/toolchain.eclass

I recompiled gcc, and it was okay ;)

(Note that these changes won't survive after an emerge --sync ;) )


It helped me with apache compilation!! THANKS A MILLION TIME! clients are really angry ;-)
Back to top
View user's profile Send private message
NiLuJe
Guru
Guru


Joined: 06 Nov 2004
Posts: 303
Location: Paris, France

PostPosted: Wed Mar 16, 2005 5:57 pm    Post subject: Reply with quote

No bug filed, I'm not registered at gentoo's bugzilla, if someone around here could do it, i'd like that, saves me some time ^^ ;)
Back to top
View user's profile Send private message
jonaswidarsson
Apprentice
Apprentice


Joined: 16 Jan 2004
Posts: 273
Location: Göteborg, Sweden

PostPosted: Wed Mar 16, 2005 6:13 pm    Post subject: Reply with quote

Well, I can tell it worked. :)
Just one more little special tricky thing.
python needs libstdc++.so.5. So to get emerge going I need that one, and I didn't have it.
So I made a symlink (earlier today) :
Code:
jonas@jw jonas $ ll /usr/lib/libstdc++.so.5
lrwxrwxrwx    1 root     root           18 Mar 16 18:26 /usr/lib/libstdc++.so.5 -> libstdc++.so.2.8.0
jonas@jw jonas $
Tricky I say, because although I am 100% sure last emerge gcc created it, it didn't overwrite my symlink, so here I am still "stuck" with the old libstdc++.

*Emerging gcc again*

About an hour ago, I emerged gcc and as soon as the process was going I deleted the symlink, so that the real libstdc++.so.5 could come in, but then the emerge process broke before getting finished.

So now I try to see when the end of the emerge comes and quickly mv the libstdc++.so.5 symlink so it moves out of the way before the real one is to be written in its place... eh ???

NiLuJe, You didn't do it like this, did you?
Back to top
View user's profile Send private message
jonaswidarsson
Apprentice
Apprentice


Joined: 16 Jan 2004
Posts: 273
Location: Göteborg, Sweden

PostPosted: Wed Mar 16, 2005 6:28 pm    Post subject: Reply with quote

Well, my theory was a little wrong.
libstdc++.so.5 shouldn't be in /usr/lib at all.
it should be here:
/usr/lib/gcc-lib/i586-pc-linux-gnu/3.3.5/libstdc++.so.5

and it probably already was, but since I had a symlink in the way when checking for libraries kopete failed to start complaining about it couldn't get version info, due to my crazy link.

But indeed I needed it to make portage run.
And my trick was actually successful.
Now all is fine over here.

I suggest someone with a little experience of the inner workings of portage file the bug report. I am not well enough experienced.
Back to top
View user's profile Send private message
evoweiss
Veteran
Veteran


Joined: 07 Sep 2003
Posts: 1678
Location: Edinburgh, UK

PostPosted: Wed Mar 16, 2005 6:48 pm    Post subject: Reply with quote

Hi all,

Looks like a bug has been posted and a patch is out. Follow this link.

I'm in the midst of a painful process, thanks for your good wishes!

Best,

Alex
Back to top
View user's profile Send private message
NiLuJe
Guru
Guru


Joined: 06 Nov 2004
Posts: 303
Location: Paris, France

PostPosted: Wed Mar 16, 2005 6:51 pm    Post subject: Reply with quote

Yeah, i had the same kind of problem .. ^^

Except that I use gcc-3.4.3, so it was libstdc++.so.6 ^^

I had to google (with a browser wich didn't got killed, hopefully ^^ But I guess it should work with something like links or lynx ...) 'gcc-<myversion>.tbz2' to get a binary version of gcc (Beacause I had just deleted mine .. -_- Silly me ^^), extracted it, and copied the libstdc++.la, libstdc++.a (I don't think these static library are really needed in this case, but, why not? ^^) & libstdc++.so.x.y.z (6.0.3 for me) from the package in the right place on my / [/usr/lib/gcc-lib/i686-pc-linux-gnu/<my-gcc-version>/], and made the symlinks (lstdc++.so , lstdc++.so.x, and finally launched ldconfig :)

EDIT : Thanks for the link to the bug ;) Seems that there is a cleaner fix for this issue ;)
Back to top
View user's profile Send private message
HiTech69
n00b
n00b


Joined: 11 Jul 2003
Posts: 12
Location: Wilmington, NC

PostPosted: Wed Mar 16, 2005 8:01 pm    Post subject: Reply with quote

NiLuJe wrote:
Yeah, i had the same kind of problem .. ^^

Except that I use gcc-3.4.3, so it was libstdc++.so.6 ^^


I'm in the same boat with the missing libstdc++.so.6, so my python doesn't run anymore, so I'm not quite sure how to implement this fix and manually emerge, without the utilities, gcc? Any hints or help would be appreciated. :( :(
Back to top
View user's profile Send private message
HiTech69
n00b
n00b


Joined: 11 Jul 2003
Posts: 12
Location: Wilmington, NC

PostPosted: Wed Mar 16, 2005 8:20 pm    Post subject: libstdc++.so.6 missing after 3.4.3-20050110 Reply with quote

I posted this issue as a reply to someone having a similar problem, but in hopes of expediting a fix on my paralyzed box, here's a post by itself.

Was doing an emerge -uDv system this morning, and surprised to see gcc and glibc complie so cleany without errors, however, about 6 packages later python croaked and gave this error:

Code:
python: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory


So, my system is fairly stuck waiting for me to fix it. :-)
Code:

gcc -v
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/specs
Configured with: /var/tmp/portage/gcc-3.4.3.20050110/work/gcc-3.4.3/configure --enable-version-specific-runtime-libs --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/3.4.3-20050110 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.3-20050110 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.3-20050110/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/3.4.3-20050110/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/3.4.3-20050110/include/g++-v3 --host=i686-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libgcj --enable-languages=c,f77 --enable-shared --enable-threads=posix
Thread model: posix
gcc version 3.4.3-20050110 (Gentoo Linux 3.4.3.20050110, ssp-3.4.3.20050110-0, pie-8.7.7)


No I saw the fix with the GCC_LANG="c,c++", but since I can't emerge or reemerge gcc for this fact, I'm a bit concerned about the possibility of hand compiling it when it has all these patches as well that need to be applied to the source. Kinda scary looking. Any help would be appreciated greatly!
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Wed Mar 16, 2005 8:23 pm    Post subject: Re: libstdc++.so.6 missing after 3.4.3-20050110 Reply with quote

HiTech69 wrote:
I posted this issue as a reply to someone having a similar problem, but in hopes of expediting a fix on my paralyzed box, here's a post by itself.

Please don't do that. In the interests of keeping all the relevant information in the same place, I've merged it back to the original thread.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
HiTech69
n00b
n00b


Joined: 11 Jul 2003
Posts: 12
Location: Wilmington, NC

PostPosted: Wed Mar 16, 2005 8:25 pm    Post subject: Re: libstdc++.so.6 missing after 3.4.3-20050110 Reply with quote

Maedhros wrote:
HiTech69 wrote:
I posted this issue as a reply to someone having a similar problem, but in hopes of expediting a fix on my paralyzed box, here's a post by itself.

Please don't do that. In the interests of keeping all the relevant information in the same place, I've merged it back to the original thread.


That makes ma a sad panda. :cry: Hopefully someone will find me in this thread.
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Wed Mar 16, 2005 8:33 pm    Post subject: Re: libstdc++.so.6 missing after 3.4.3-20050110 Reply with quote

HiTech69 wrote:
That makes ma a sad panda. :cry: Hopefully someone will find me in this thread.

Well, there's already a fix (which doesn't involve hand-compiling). See the bug-report, and the post above your first one. :wink:
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum