GCC - ibstdc++.so.6

Support and queries relating to all previous versions of ZoneMinder
Locked
Rayxen
Posts: 28
Joined: Thu Nov 25, 2004 7:14 am
Contact:

GCC - ibstdc++.so.6

Post by Rayxen »

When going through my Apache logs to work out why I can't get an image to show, I found this error message. Now, it seems zmu won't run, which in itself shoudlnt' be the cause of the problem:
zmu - This is the ZoneMinder Utility. It's basically a handy
command line interface to several useful functions. It's not
really meant to be used by anyone except the web page (there's
only limited 'help' in it so far) but can be if necessary,
especially for debugging video problems.
Because according to that, I don't really require it. But I will move through one error message at a time and fix each problem. The error message is this:
/usr/local/bin/zmu: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
Now from what I've read, this relates to having the wrong version of gcc? Is this correct? Now, my gcc situation is a little unique, because I updated it, but i don't think I did it exactly as I should have. Here's some info that hopefully will help:
[root@localhost dist]# gcc -v
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/specs
Configured with: ./configure
Thread model: posix
gcc version 3.4.3
[root@localhost dist]# locate libstdc++.so.6
/usr/local/lib/libstdc++.so.6.0.3
/usr/local/lib/libstdc++.so.6
[root@localhost dist]# locate gcc
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3
/usr/local/src/gcc-3.4.3
So what I've done is extracted the source for 3.4.3 into /usr/local/src/, then configured and compiled it into /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3 ... and the old gcc is in /usr/lib/gcc-lib/i386-redhat-linux/3.22. If someone can give me an idea of where to go from here... I'm currently at a dead end and not sure what to do. Thanks.

It's pretty clear that gcc is running on version 3.4.3 from the appropriate directory (where I installed it to), but it can't find the libstdc++.so.6 module(?) .... any ideas? cheers.
Rayxen
Posts: 28
Joined: Thu Nov 25, 2004 7:14 am
Contact:

Post by Rayxen »

An interesting bit of information I pulled up from gcc -print-search-dirs
libraries: =
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/
/usr/lib/gcc/i686-pc-linux-gnu/3.4.3/
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/lib/i686-pc-linux-gnu/3.4.3/
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/lib/
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../i686-pc-linux-gnu/3.4.3/
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../
/lib/i686-pc-linux-gnu/3.4.3/
/lib/
/usr/lib/i686-pc-linux-gnu/3.4.3/
/usr/lib/
Which doesn't include just straight out /usr/local/lib/. I wonder if there is a way to add that the libraries path... that would be easier than symlinking the files to one of the above directories. I might try symlinking just libstdc++.so.6 to start off.
Rayxen
Posts: 28
Joined: Thu Nov 25, 2004 7:14 am
Contact:

Post by Rayxen »

Ok, well that didn't work - apache logs show:
BEGIN failed--compilation aborted at /usr/local/bin/zmdc.pl line 61.
/usr/local/bin/zmu: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

BEGIN failed--compilation aborted at /usr/local/bin/zmdc.pl line 61.
[Sat Nov 27 00:24:16 2004] [error] [client 127.0.0.1] /opt/lampp/cgi-bin/zms: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory, referer: h**p://localhost/zm/index.php?view=watchfeed&mode=&mid=3&scale=100
[Sat Nov 27 00:24:16 2004] [error] [client 127.0.0.1] Premature end of script headers: zms, referer: h**p://localhost/zm/index.php?view=watchfeed&mode=&mid=3&scale=100
This time it seems that it's zms and zmu have the the problem, which could possibly explain some of my problems. Any ideas please?

(http replaced with h**p to prevent auto-hyperlinking from phpBB)
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Have you tried rerunning ldconfig to update the location of your shared libraries?

If you have a slightly flakey shared library situation it might help, or it might break everything else!

Phil,
Rayxen
Posts: 28
Joined: Thu Nov 25, 2004 7:14 am
Contact:

Post by Rayxen »

Yes, I have tried that. Sorry, I should have mentioned that - but when you are trying so many different things, you forget. :) I tried it again, and unfortunately that didn't help. Any ideas please? Thanks.
Rayxen
Posts: 28
Joined: Thu Nov 25, 2004 7:14 am
Contact:

Post by Rayxen »

Ok, well I think i'm getting a different error now ... now it's looking for libgcc_s_so.1 which is required by libstdc++.so.6. So perhaps the symlinking did work, and I was so tired last night that I didn't realise and just thought it was the same error message.

Error:
[root@localhost root]# zmu
zmu: /lib/libgcc_s.so.1: version `GCC_3.3' not found (required by /usr/local/lib/libstdc++.so.6)
Libraries
[root@localhost root]# locate libgcc_s.so.1
/usr/local/lib/libgcc_s.so.1
/lib/libgcc_s.so.1

[root@localhost root]# locate libstdc++.so.6
/usr/local/lib/gcc/i686-pc-linux-gnu/3.4.3/libstdc++.so.6
/usr/local/lib/libstdc++.so.6.0.3
/usr/local/lib/libstdc++.so.6
I did find this thread helpful:
http://gcc.gnu.org/ml/gcc-help/2003-12/msg00042.html

Now... hopefully I can go from there!
Rayxen
Posts: 28
Joined: Thu Nov 25, 2004 7:14 am
Contact:

Post by Rayxen »

After reading a lot of information about upgrading gcc and it being a bad idea, I nuked the install and tried to install from the ZM LiveCD. Of course, that didn't work did it - well, after much hassle and DiskDruid refusing to launch, and then the setup not detecting my existing partitions, and the set up dropping out after installing (step 4) and just vanishing instead of allowing me to continue to step 5 to do the boot loader.

I finally got it installed, but I've got Windows XP on a partition at the start of the disk, and a boot-loader 100MB partition between XP and Mandrake's root partition. Unfortunately, I don't have the slightest idea how to get GRUB to boot to either of the two of them. Currently I can boot to Windows XP using GRUB (and it shows RedHat as the other option -> previous install), but no luck in booting Mandrake. Out of interest I tried to boot to RedHat, I believe it started to load Mandrake but then gave me a Kernel Panic - not surprising really.

So I really don't know where to go from here - perhaps nuke the Mandrake install and start fresh with something like Gentoo or Fedora Core.
gnuorder
Posts: 35
Joined: Fri Apr 02, 2004 5:38 pm

Post by gnuorder »

It sounds like you have grub on the 100MB boot partition left over from the redhat install. If you mount that partition and edit /path/grub/menu.lst (or it may be grub.cfg), you can point it to the kernel in your mandrake partition. Another option would be to copy the contents of the /boot on your mandrake partition to that boot loader partition and mount that it to /boot from then on. You can boot up the live CD to do either of these.
Rayxen
Posts: 28
Joined: Thu Nov 25, 2004 7:14 am
Contact:

Post by Rayxen »

Thanks for the suggestions. I actually reinstalled from the LiveCD and just used the MBR because I'm pretty much finished with Windows XP. I do have two options now, ZoneMinder or /mnt/win_c, I haven't tried to boot to the latter just yet - might give that a go later on.

If it doesn't work hopefully i'll be able to work with your info, to repair it. Thanks again.
Locked