LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   error while loading.... libstdc++.so.5 (https://www.linuxquestions.org/questions/programming-9/error-while-loading-libstdc-so-5-a-207764/)

HTS 07-21-2004 04:25 AM

error while loading.... libstdc++.so.5
 
Hello,

I am trying to run c++ program (which was compiled in RED-HAT 9.0 under gcc version 3.2.2)
on RED-HAT 7.0 with no gcc compiler (2.4.18 gcc version 2.95.3 20010315 (release)).

THE PROBLEM: After I move the program from RH 9 to RH 7 I got this error message:

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

I tried to compile with -L/usr/lib/gcc-lib/i386-redhat-linux7/2.96/ and the error now:

stam: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory.

What should I do to make it possible to run C++ programs.

thank you, HTS

ToniT 07-27-2004 08:09 AM

By either installing the proper runtime libraries, or compiling against the older runtime libraries. If you can't compile the program in RH7 environment, you can build a chroot jail to your RH9 env having RH7 libraries.

HTS 07-28-2004 12:48 AM

Hi,
cam you tell me more about how to
"build a chroot jail to your RH9 env having RH7 libraries"
Do I need to download RH-7 libraries and compile them.
(I don't want to lose the new libraries....)
thanx.

ToniT 07-28-2004 02:40 AM

Well, while coming from debian world and thinking it is trivial, doing the same thing in RH seems to be somewhat more work. In fact, there is even a readymade program in debian that generates chroot environments for different purposes for building against different debian systems.

Results of some googling:
- http://gnumonks.org/ftp/pub/doc/chroot-howto.html -- for a very old version of RH, doing almost the right thing (well, for wrong reasons and doesn't point out that the chroot environment could be of a differerent version).

- http://leapster.org/linux/redhat/rhel/ -- Builds a chroot environment for other RH installation. Unfortunately not for RH7.3, but for RHEL and it builds it from source, which is not necessary in this case and the document seems to be uncompleted.


All times are GMT -5. The time now is 07:00 PM.