portability of shared libraries

dave fournier orders@otter-rsch.com
Tue Apr 5 17:34:00 GMT 2005


I have been trying to make a shared library that is portable
between different Linux versions. It is compiled on FC3 and
runs fine on FC2 and Mandrake 9.1. However it crashes on
RH8.  I have compiled it with

    g++  x.c -shared -o nbmm.so -static-libgcc -shared -o $1.so \
      -Xlinker -static -lado

When it crashes in RH8 the gdb stack trace reports

Program received signal SIGSEGV, Segmentation fault.
std::locale::operator=(std::locale const&) (this=0x403c23b8,
No such file or directory.

which is related to the RH8 libraries since FC3 uses gcc3.4.2.

So it appears to me that the shared library nbmm.so is still using
calls to external libraries although ldd reports that it is statically
linked.  What I would like is to produce a shared library that does not
use any external libraries if this is possible. Obviouslu I don't know
what I am doing here.  Any guidance would be appreciated.



Internal Virus Database is out-of-date.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 266.4.0 - Release Date: 2/22/05

More information about the Gcc-help mailing list