public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Linux g++2.95.2 binaries on egcs 1.1.2 system?
@ 2000-07-31 11:23 jlquinn
  2000-08-04  9:31 ` llewelly
  0 siblings, 1 reply; 2+ messages in thread
From: jlquinn @ 2000-07-31 11:23 UTC (permalink / raw)
  To: gcc-help

I'm having trouble figuring out the best solution to the following
question.  I have a redhat linux system on which I have installed gcc
2.95.2.  Normally when I build a c++ library, I get dependencies on
libstdc++-libc6.1-2.so.3, which is actually
libstdc++-3-libc6.1-2-2.10.0.so.  This makes it appear that using this
library on a stock redhat system (both 6.1 and 6.2) that has only egcs
1.1.2 installed is impossible, as they have libraries with an earlier
soname.

However, perusing the docs and NEWS files in gcc 2.95.2 don't mention any
incompatibility in ABI or lib between egcs 1.1.2 and gcc 2.95.2.  Also, the
nm output for the two stdc++ libs are very similar (although that's a
dangerous test).

So the question remains - can I do this or do I have to downgrade to egcs
if I want people with a stock system to run my stuff without recompile or
obtaining the newer stdc++ lib (I won't be able to distribute it)?

I've looked in the gcc-help archive and FAQ's  for a satisfactory answer to
this but haven't found one.  So either the answer isn't out there yet, or
I'm not recognizing it when I do see it.

Thanks
Jerry Quinn


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Linux g++2.95.2 binaries on egcs 1.1.2 system?
  2000-07-31 11:23 Linux g++2.95.2 binaries on egcs 1.1.2 system? jlquinn
@ 2000-08-04  9:31 ` llewelly
  0 siblings, 0 replies; 2+ messages in thread
From: llewelly @ 2000-08-04  9:31 UTC (permalink / raw)
  To: jlquinn; +Cc: gcc-help

jlquinn@us.ibm.com writes:

> I'm having trouble figuring out the best solution to the following
> question.  I have a redhat linux system on which I have installed gcc
> 2.95.2.  Normally when I build a c++ library, I get dependencies on
> libstdc++-libc6.1-2.so.3, which is actually
> libstdc++-3-libc6.1-2-2.10.0.so.  This makes it appear that using this
> library on a stock redhat system (both 6.1 and 6.2) that has only egcs
> 1.1.2 installed is impossible, as they have libraries with an earlier
> soname.
> 
> However, perusing the docs and NEWS files in gcc 2.95.2 don't mention any
> incompatibility in ABI or lib between egcs 1.1.2 and gcc 2.95.2.  Also, the
> nm output for the two stdc++ libs are very similar (although that's a
> dangerous test).

I could have sworn this was i the docs somewhere, but I looked, and I
  could not find it either ...

> 
> So the question remains - can I do this or do I have to downgrade to egcs
> if I want people with a stock system to run my stuff without recompile or
> obtaining the newer stdc++ lib (I won't be able to distribute it)?
> 
> I've looked in the gcc-help archive and FAQ's  for a satisfactory answer to
> this but haven't found one.  So either the answer isn't out there yet, or
> I'm not recognizing it when I do see it.
[snip]

There are incompatibilities in the C++ ABI between egcs-1.1.x
  and gcc 2.95.x

If you try to link an C++ binary compiled with egcs-1.1.x with a
  C++ binary compiled with gcc 2.95.x, you will encounter
  problems. Unfortunately, I do not remember what the problems are. (I
  vaguely remember getting link errors if libstdc++ from both versions
  was linked in, and runtime bugs if only one was linked in.)

If gcc was configured with --enable-shared, anything compiled with g++
  2.95.x is linked to libstdc++-3-libc6.1-2-2.10.0.so . If you try to
  run such a binary on a machine without that shared lib, you will get
  link errors at runtime.

If gcc was configured without --enable-shared, shared versions of the
  C++ libs are not created, so executables are not linked to them.

(see http://gcc.gnu.org/install/configure.html for details of gcc's
  configure time options.)

In general, you cannot expect a dynamically linked executible
  compilied with g++ 2.95.x to work a stock redhat 6.x
  system. 

If you link with -static, making it staticly linked, all of these
  problems go away (assuming all of your modules are compiled with the
  same compiler, that is.)
  

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-08-04  9:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-31 11:23 Linux g++2.95.2 binaries on egcs 1.1.2 system? jlquinn
2000-08-04  9:31 ` llewelly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).