Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
gcc broke, env-update looking for libstdc++.so.5
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
asmie
n00b
n00b


Joined: 11 May 2004
Posts: 33

PostPosted: Tue Dec 27, 2005 11:10 am    Post subject: gcc broke, env-update looking for libstdc++.so.5 Reply with quote

My gentoo machine give me problems. I just upgrade it to gcc 3.4.4. I've looking around the same problem in this forum but still could not solve mine.

% env-update
/usr/bin/python: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

% find /usr/lib -name libstdc++.so.*""
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6.0.3
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6

I have tried every single possible solution I found but most of them are about libstdc++ version 5 while mine as you can see above has version 6. I have put the line
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/
into file /etc/ld.so.conf but that does not help much.

Help and thanks in advance.
Back to top
View user's profile Send private message
krigav
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2005
Posts: 121

PostPosted: Tue Dec 27, 2005 11:29 am    Post subject: Reply with quote

maybe you should try:
Code:
emerge --oneshot sys-libs/libstdc++-v3


You should read this when you upgrade your gcc:

http://www.gentoo.org/doc/en/gcc-upgrading.xml
_________________
There are no dumb questions, just dumb answers. So please help users that are new to linux/gentoo by answering unanswered questions.
Back to top
View user's profile Send private message
asmie
n00b
n00b


Joined: 11 May 2004
Posts: 33

PostPosted: Wed Dec 28, 2005 12:40 am    Post subject: Reply with quote

Thanks but that does not helped to my machine.

% emerge --oneshot sys-libs/libstdc++-v3
/usr/bin/python: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
Back to top
View user's profile Send private message
Halcy0n
Developer
Developer


Joined: 17 Sep 2003
Posts: 1682
Location: Freehold, NJ

PostPosted: Wed Dec 28, 2005 12:46 am    Post subject: Reply with quote

Did you uninstall gcc-3.3? Try running `ldconfig`.
_________________
Mark Loeser
http://www.halcy0n.com
Back to top
View user's profile Send private message
asmie
n00b
n00b


Joined: 11 May 2004
Posts: 33

PostPosted: Wed Dec 28, 2005 1:19 am    Post subject: Reply with quote

Unfortunately I think that is the main reason. I did house cleaning to the machine using command

% emerge -P world

and I think that purposely uninstall gcc-3.3 since there is already latest gcc-3.4 installed. Any ideas? Thanks.
Back to top
View user's profile Send private message
krigav
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2005
Posts: 121

PostPosted: Wed Dec 28, 2005 3:09 am    Post subject: Reply with quote

The problem is that you have removed your gcc 3.3 installation to early. You forgot to recompile your world (including python) with the _new_ gcc 3.4 system libraries.
Now after you pruned your old gcc (means gcc 3.3) your python is still compiled against the old gcc package, and of course doesn't work anymore, because this isn't there anymore :twisted:

Upgrading the toolchain might be a quite sensitive task, because you have to make sure to compile _all_ your packages against the new system libraries. I would suggest that you start to build your gentoo system again. And this time you can avoid the failure.
_________________
There are no dumb questions, just dumb answers. So please help users that are new to linux/gentoo by answering unanswered questions.
Back to top
View user's profile Send private message
Bad Penguin
Guru
Guru


Joined: 18 Aug 2004
Posts: 507

PostPosted: Wed Dec 28, 2005 3:17 am    Post subject: Re: gcc broke, env-update looking for libstdc++.so.5 Reply with quote

asmie wrote:
My gentoo machine give me problems. I just upgrade it to gcc 3.4.4. I've looking around the same problem in this forum but still could not solve mine.

% env-update
/usr/bin/python: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

% find /usr/lib -name libstdc++.so.*""
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6.0.3
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/libstdc++.so.6

I have tried every single possible solution I found but most of them are about libstdc++ version 5 while mine as you can see above has version 6. I have put the line
/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/
into file /etc/ld.so.conf but that does not help much.

Help and thanks in advance.

You are screwed.

A possible hack. Untar the same stage3 you originally used somewhere, copy the usr/lib/gcc-lib to your dorked box, try emerging python, portage, and probably perl again. Then follow the gcc migration guide... Otherwise you are going to have to start over from a fresh stage3 and/or bootstrap...
Back to top
View user's profile Send private message
SignOfZeta
n00b
n00b


Joined: 12 Aug 2005
Posts: 61

PostPosted: Wed Dec 28, 2005 3:38 am    Post subject: Reply with quote

Yeah, I did this too. I didn't know that I needed to perform a migration. Can I just perform a stage3 install over my existing partition, and then remerge everything so that my personal stuff and my configuration is kept intact?

Heh, I should probably take away my sudo privileges. :-P

Oh, and I fixed the "cannot find libstdc++.so.5" error. Just create a symlink of that file in /usr/lib/. I can't remember where it is, but slocate (or an ls and grep combo) may find it. Of course, doing this only caused everything to hang... but emerge worked for about five minutes.
Back to top
View user's profile Send private message
Bad Penguin
Guru
Guru


Joined: 18 Aug 2004
Posts: 507

PostPosted: Wed Dec 28, 2005 3:56 am    Post subject: Reply with quote

SignOfZeta wrote:
Yeah, I did this too. I didn't know that I needed to perform a migration.

You didn't get the memo? You know, the one that tells you to comb through the forums, the gentoo home page, and the various wikis before upgrading?

SignOfZeta wrote:
Can I just perform a stage3 install over my existing partition, and then remerge everything so that my personal stuff and my configuration is kept intact?

That depends on which configurations you will end up overwriting when you untar a fresh stage3 onto your existing install.

Personally I would try untarring a quickpkg of my old gcc from a stage3, then resuming with the migration guide... Binaries that don't use c++ should still work, like tar and chroot :)
Back to top
View user's profile Send private message
hielvc
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2805
Location: Oceanside, Ca

PostPosted: Wed Dec 28, 2005 4:20 am    Post subject: Reply with quote

Yes you can untar a stage3 but before you do backup your /etc. untar and copy /etc back then follow the guide :wink:
_________________
An A-Z Index of the Linux BASH command line
Back to top
View user's profile Send private message
asmie
n00b
n00b


Joined: 11 May 2004
Posts: 33

PostPosted: Wed Dec 28, 2005 4:40 am    Post subject: Reply with quote

I am sure whether this would work or not. I copy the whole folder
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.6

from a working machine to the problem one and put the path in file /etc/ld.so.conf. At that point emerge works. So following the advice, I acts accordingly to the website on how to migrate to 3.4. At this moment, I am running emerge -e system but I have doubt because it some how installed gcc 3.3.4. But what the heck. I will give it a try and see if this would solve the problem once and for all.
Back to top
View user's profile Send private message
Bad Penguin
Guru
Guru


Joined: 18 Aug 2004
Posts: 507

PostPosted: Wed Dec 28, 2005 5:27 am    Post subject: Reply with quote

hielvc wrote:
Yes you can untar a stage3 but before you do backup your /etc. untar and copy /etc back then follow the guide :wink:

It is going to overwrite everything in /var/db/pkg, /var/lib/portage, etc.. also.
Back to top
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Wed Dec 28, 2005 5:33 am    Post subject: Reply with quote

For future reference too, avenj carries some rescue binary tarballs for i586, i686, and amd64 just in case, which you can simply extract to '/':
Code:
# tar xvjf rescue-tarball.tbz2 -C /
Check /usr/portage/sys-apps/portage/files/README.RESCUE for more details.

Hope that helps.
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF
Back to top
View user's profile Send private message
ih8tgentoo
n00b
n00b


Joined: 01 Jan 2003
Posts: 58

PostPosted: Wed Dec 28, 2005 1:03 pm    Post subject: Reply with quote

You can also try copying the /usr/lib/python2.4 directory and /usr/bin/python from a livecd such as RR4 or VLOS or you could copy the gcc back from the livecd.
Back to top
View user's profile Send private message
SignOfZeta
n00b
n00b


Joined: 12 Aug 2005
Posts: 61

PostPosted: Wed Dec 28, 2005 1:43 pm    Post subject: Reply with quote

I booted a LiveCD and copied over its gcc folder. Apparently, things seem to be working fine now under the chroot; I'm rebuilding everything from bootstrap.
Back to top
View user's profile Send private message
krigav
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2005
Posts: 121

PostPosted: Wed Dec 28, 2005 1:45 pm    Post subject: Reply with quote

Or if you just started to build up a new gentoo system:

Format your partition, install a fresh stage3 tarball on it, upgrade to the new gcc 3.4 according to the above mentioned upgrade guide, and then after a lot of recompiling you have a nice stable system as foundation for your further work. :P
_________________
There are no dumb questions, just dumb answers. So please help users that are new to linux/gentoo by answering unanswered questions.
Back to top
View user's profile Send private message
sluggard
n00b
n00b


Joined: 30 Jan 2003
Posts: 3

PostPosted: Wed Dec 28, 2005 8:29 pm    Post subject: Reply with quote

actually, i followed more or less the gcc upgrading doc and had the same problem. what i did, was to make a symlink from the new libstdc++.so.6 to .5 , run emerge python and then remove the link.
don't ask me how it worked, but it did.
Back to top
View user's profile Send private message
galtsavenger
n00b
n00b


Joined: 19 Apr 2004
Posts: 8

PostPosted: Wed Feb 08, 2006 3:02 pm    Post subject: Fyi Reply with quote

I had this same problem on a brand new install - after I bootstrapped using the 2005.1 stages, I have the same issue. I'll investigate a little further tonight, but I guess this is a gcc related issue?
Back to top
View user's profile Send private message
lefteye
Tux's lil' helper
Tux's lil' helper


Joined: 07 Nov 2003
Posts: 102

PostPosted: Thu Feb 09, 2006 4:30 pm    Post subject: Reply with quote

Also a weird but interesting problem could be kernel configuration issues. I recently ran into the xsame problem on an amd64 machine. I had to set a parameter that used -0s for the kernel. Go figure.
Back to top
View user's profile Send private message
Nifty
n00b
n00b


Joined: 20 Aug 2004
Posts: 14

PostPosted: Sat Feb 11, 2006 10:23 am    Post subject: Reply with quote

codergeek42 wrote:
For future reference too, avenj carries some rescue binary tarballs for i586, i686, and amd64 just in case, which you can simply extract to '/':
Code:
# tar xvjf rescue-tarball.tbz2 -C /
Check /usr/portage/sys-apps/portage/files/README.RESCUE for more details.

Hope that helps.

Finally, that saved my day.
After emerge -P i got the
/usr/bin/python: error while loading shared libraries: libstdc++.so.
message.
I copy'd the library for gcc-3.3.3 to my system, changed /etc/ld.co.conf & lconfig. Then followed the upgrade path for gcc 3.4.
Back to top
View user's profile Send private message
AtroposFate
n00b
n00b


Joined: 18 Jan 2005
Posts: 29
Location: Second star to the right -- straight on till morn

PostPosted: Sun Feb 26, 2006 10:16 pm    Post subject: Reply with quote

I just wanna say, praise the rescue files as well... I ran emerge prune and it got rid of gcc before I changed over... downloaded the gcc3.3.3 again and the important stuff is usable again... upgrading to gcc3.4.4 now hopefully the rebuild will fix all the stuff that isn't quite usable now.

So far the rescue files are a quick fix... with only a minimal headache. *knock on wood*
Back to top
View user's profile Send private message
soigres
l33t
l33t


Joined: 09 Dec 2004
Posts: 648
Location: Milano, Italy

PostPosted: Tue Feb 28, 2006 11:25 am    Post subject: Reply with quote

sluggard wrote:
actually, i followed more or less the gcc upgrading doc and had the same problem. what i did, was to make a symlink from the new libstdc++.so.6 to .5 , run emerge python and then remove the link.
don't ask me how it worked, but it did.
where do you put the link?
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


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

PostPosted: Tue Feb 28, 2006 11:11 pm    Post subject: Reply with quote

Moved from Portage & Programming to Duplicate Threads in favour of this FAQ: Error while loading shared libraries: libstdc++.so.5.
_________________
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 Duplicate Threads All times are GMT
Page 1 of 1

 
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