This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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]

Re: dynamic library version crashes but static version works



I have a few more questions regarding the compatibility of dynamic (and static libraries).


Does the compatibility of the libraries depend solely on the version of Linux? For example,
will libraries be compatible if they are built on the same machine but with different versions of the GNU compiler ?


Aside from versions of Linux, what else (gcc version, glibc version, ld version etc.) determines whether a dynamic (and static)
library are compatible?


Why do the static libraries tend to work more frequently than the dynamic libraries?

As a provider of such libraries to clients, I'd like to try to minimize the # of machines and builds that need to be done.

Thanks for your help.

Ted


At 08:36 PM 01/19/2005, James E Wilson wrote:
Ted Sung wrote:
I build a dynamic library with gcc 3.2 (glibc 2.3.2-4.80.8) running Red Hat Linux 8.0 3.2-7).
I copy this library over to another machine running Red Hat Enterprise Linux ES release 3 (Taroon)
My program crashes in a very strange place in my library code.

This is almost certainly not a gcc problem. There probably isn't much we can do to help, without duplicating your situation, and it wouldn't be worthwhile for us to try.


In general, you shouldn't expect any portability of compiled libraries between two different linux systems. RHL8 and RHES3 are rather different linux systems, even though they have similar gcc/glibc versions, and you should not expect compiled libraries to be portable between them. Generally, statically linked code can be moved between similar linux systems though, as you have already found.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

Ted Sung Intex Solutions, Inc. 110 A Street Needham, MA 02494 tel (781)449-6222 fax (781)444-2318 teds@intex.com www.intex.com





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