This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Error loading Shared libraries


Folks,

I've referred to the following FAQ but my problem
seems to by quite different given the fact that a i'm
a Linux newbie.

http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#2_6

I had a build env for some Linux apps with gcc version
2.96 (links with shared library libstdc++.so.3). The
build environment was upgraded and I now have gcc
3.2.3 compiler (links with shared library
libstdc++.so.5).

As expected my app fails when I run on a Linux Red Hat
box where libstdc++.so.3 is installed.

# myapp
./os_setup: error while loading shared libraries:
libstdc++.so.5: cannot open shared object file: No
such file or directory

I need a solution where I can have a stable build
environment such that I should not recompile myapp on
any newer versions of Red Hat or Debian or SuSE or any
Linux distribution for that matter.

=================================
I've tried the following options;

Option 1] Creating sym links (a dirty option); ln -s
/usr/lib/libstdc++-3-libc6.2-2-2.10.0.so
libstdc++.so.5

This doesn't help me because there are other shared
lib dependencies ...

# myapp
./os_setup: error while loading shared libraries:
libgcc_s.so.1: cannot open shared object file: No such
file or directory

=================================
Option 2]
I've tried statically linking libstdc++.a and
libgcc.a, which fails ..

relocation error: ./osisetup: symbol
_ZTVN10__cxxabiv117__class_type_infoE, version
GLIBCPP_3.2 not defined in file libstdc++.so.5 with
link time reference

=================================

Option 3]
I'd hate to recompile and generate 'myapp' on all
Linux distributions. This would have to be my last
option.

Thanks for any tip.
- Raghu


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]