public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Zack Weinberg <zack@rabi.columbia.edu>
To: Eric Kidd <eric.kidd@pobox.com>
Cc: otaylor@redhat.com, egcs@egcs.cygnus.com
Subject: Re: __register_frame_info & shared library compatibility
Date: Fri, 30 Apr 1999 23:15:00 -0000	[thread overview]
Message-ID: <199904062115.RAA15222@blastula.phys.columbia.edu> (raw)
Message-ID: <19990430231500.UHXyk8Z_osedMUlnrncYcuys2_PyzjG2QU9uj8YL9Lo@z> (raw)
In-Reply-To: <19990406170202.J29505@moebius.dartmouth.edu>

On Tue, 6 Apr 1999 17:02:02 -0400, Eric Kidd wrote:
>First, some background. I run Red Hat Linux 5.2, and build binaries for a
>couple of projects involving shared libraries. I also maintain and upgrade
>a number of Linux systems with locally compiled software.
>
>egcs is starting to cause problems for me--or more precisely, the way
>people *use* egcs is starting to cause problems for me. Let's start with
>the latest problem I've encountered:
[...]
>In theory, randomapp should still run. After all, ld.so can still find
>libraries with the appropriate sonames. But when I try to run randomapp,
>things get ugly:
>
>  undefined symbol: __register_frame_info
>
>A little bit of research discovers something nasty: egcs and gcc have
>incompatible runtimes, and ld.so can't deal with this gracefully. When you
>compile a program with egcs, it pulls in a runtime providing
>__register_frame_info. When you compile an application with gcc 2.7, it
>pulls in an older runtime that lacks this symbol.

This is a well known problem to which there is, unfortunately, no
clean solution.

The best suggestion I can make is:  Get glibc 2.1 and compile it with
egcs.  When you do that, glibc absorbs and re-exports the runtime
functions that are causing the problem.  Everything else will pick
them up from there instead of libgcc.a.  You'll have to recompile any
libraries which are currently exporting __register_frame_info.  You
will not be able to run binaries built in this environment on
non-glibc-2.1 systems.

You can not do this with glibc 2.0 because then you lose binary
compatibility with glibc 2.0 compiled by gcc 2.7 (exact same problem
as you describe).

If your program and libraries are purely C, you can compile
*everything* with -fno-exceptions, which prevents the offending
functions from being linked in the first place.  You must not do this
if you care about C++.  Even if a library is written in C, it has to
use these functions to be compatible with C++ programs.  [I personally
think it's a mistake to use C++ for anything, but YMMV.]

zw

  reply	other threads:[~1999-04-30 23:15 UTC|newest]

Thread overview: 124+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-04-06 14:00 Eric Kidd
1999-04-06 14:16 ` Zack Weinberg [this message]
1999-04-06 14:52   ` Eric Kidd
1999-04-06 15:16     ` Zack Weinberg
1999-04-06 15:39       ` Eric Kidd
1999-04-06 15:51         ` Zack Weinberg
1999-04-06 16:14           ` Eric Kidd
1999-04-30 23:15             ` Eric Kidd
1999-04-07  1:35           ` Andreas Schwab
1999-04-07  6:32             ` Zack Weinberg
1999-04-30 23:15               ` Zack Weinberg
1999-04-30 23:15             ` Andreas Schwab
1999-04-30 23:15           ` Zack Weinberg
1999-04-30 23:15         ` Eric Kidd
1999-04-30 23:15       ` Zack Weinberg
1999-04-30 23:15     ` Eric Kidd
1999-04-06 16:58   ` Jeffrey A Law
1999-04-06 17:35     ` Zack Weinberg
1999-04-06 17:55       ` H.J. Lu
1999-04-30 23:15         ` H.J. Lu
1999-04-07  2:10       ` Jeffrey A Law
1999-04-07  6:29         ` Zack Weinberg
1999-04-07  6:53           ` alex.buell
1999-04-30 23:15             ` alex.buell
1999-04-30 23:15           ` Zack Weinberg
1999-04-30 23:15         ` Jeffrey A Law
1999-04-30 23:15       ` Zack Weinberg
1999-04-30 23:15     ` Jeffrey A Law
1999-04-30 23:15   ` Zack Weinberg
1999-04-06 17:04 ` Jeffrey A Law
1999-04-30 23:15   ` Jeffrey A Law
1999-04-30 23:15 ` Eric Kidd
1999-04-07  5:14 Mark Kettenis
1999-04-07  5:33 ` Jeffrey A Law
1999-04-07 18:11   ` John Polstra
1999-04-07 23:36     ` Jeffrey A Law
1999-04-08  9:57       ` Jamie Lokier
1999-04-08 10:31         ` H.J. Lu
1999-04-08 12:44           ` Jeffrey A Law
1999-04-08 12:49             ` Jamie Lokier
1999-04-08 12:57               ` H.J. Lu
1999-04-08 13:12                 ` Jeffrey A Law
1999-04-08 13:24                   ` Jamie Lokier
1999-04-08 13:31                     ` Jeffrey A Law
1999-04-08 13:42                       ` Jamie Lokier
1999-04-08 13:54                         ` Jeffrey A Law
1999-04-30 23:15                           ` Jeffrey A Law
1999-04-30 23:15                         ` Jamie Lokier
1999-04-30 23:15                       ` Jeffrey A Law
1999-04-08 14:38                     ` Eric Kidd
1999-04-30 23:15                       ` Eric Kidd
1999-04-30 23:15                     ` Jamie Lokier
1999-04-30 23:15                   ` Jeffrey A Law
1999-04-30 23:15                 ` H.J. Lu
1999-04-08 13:02               ` Jeffrey A Law
1999-04-30 23:15                 ` Jeffrey A Law
1999-04-30 23:15               ` Jamie Lokier
1999-04-08 12:55             ` Jamie Lokier
1999-04-08 13:01               ` H.J. Lu
1999-04-08 13:25                 ` Jeffrey A Law
1999-04-08 13:33                   ` Jamie Lokier
1999-04-08 13:47                     ` Jeffrey A Law
1999-04-30 23:15                       ` Jeffrey A Law
1999-04-30 23:15                     ` Jamie Lokier
1999-04-30 23:15                   ` Jeffrey A Law
1999-04-30 23:15                 ` H.J. Lu
1999-04-08 13:05               ` Jeffrey A Law
1999-04-30 23:15                 ` Jeffrey A Law
1999-04-30 23:15               ` Jamie Lokier
1999-04-30 23:15             ` Jeffrey A Law
1999-04-30 23:15           ` H.J. Lu
1999-04-08 12:28         ` Jeffrey A Law
1999-04-30 23:15           ` Jeffrey A Law
1999-04-21 11:53         ` David O'Brien
1999-04-21 12:00           ` Jamie Lokier
1999-04-21 13:02             ` David O'Brien
1999-04-21 13:20               ` Joe Buck
1999-04-21 13:33                 ` Marc Espie
1999-04-22 22:29                   ` Jeffrey A Law
1999-04-30 23:15                     ` Jeffrey A Law
1999-04-30 23:15                   ` Marc Espie
1999-04-30 23:15                 ` Joe Buck
1999-04-30 23:15               ` David O'Brien
1999-04-30 23:15             ` Jamie Lokier
1999-04-30 23:15           ` David O'Brien
1999-04-30 23:15         ` Jamie Lokier
1999-04-08 14:56       ` John Polstra
1999-04-08 15:58         ` Jeffrey A Law
1999-04-30 23:15           ` Jeffrey A Law
1999-04-09 13:01         ` Philipp Thomas
1999-04-30 23:15           ` Philipp Thomas
1999-04-30 23:15         ` John Polstra
1999-04-30 23:15       ` Jeffrey A Law
1999-04-30 23:15     ` John Polstra
1999-04-30 23:15   ` Jeffrey A Law
1999-04-30 23:15 ` Mark Kettenis
1999-04-09  4:49 Mark Kettenis
1999-04-10  1:41 ` Jeffrey A Law
1999-04-10  6:41   ` Zack Weinberg
1999-04-11 21:21     ` Jeffrey A Law
1999-04-30 23:15       ` Jeffrey A Law
1999-04-30 23:15     ` Zack Weinberg
1999-04-10  8:28   ` Mark Kettenis
1999-04-11 21:25     ` Jeffrey A Law
1999-04-12  6:15       ` Zack Weinberg
1999-04-13 21:05         ` Jeffrey A Law
1999-04-13 23:16           ` Zack Weinberg
1999-04-13 23:38             ` Jeffrey A Law
1999-04-30 23:15               ` Jeffrey A Law
1999-04-30 23:15             ` Zack Weinberg
1999-04-30 23:15           ` Jeffrey A Law
1999-04-30 23:15         ` Zack Weinberg
1999-04-30 23:15       ` Jeffrey A Law
1999-04-30 23:15     ` Mark Kettenis
1999-04-30 23:15   ` Jeffrey A Law
1999-04-30 23:15 ` Mark Kettenis
1999-04-14  5:58 Mark Kettenis
1999-04-14 14:15 ` Jeffrey A Law
1999-04-14 14:57   ` Mark Kettenis
1999-04-30 23:15     ` Mark Kettenis
1999-04-30 23:15   ` Jeffrey A Law
1999-04-30 23:15 ` Mark Kettenis
1999-04-21 19:14 N8TM
1999-04-30 23:15 ` N8TM

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199904062115.RAA15222@blastula.phys.columbia.edu \
    --to=zack@rabi.columbia.edu \
    --cc=egcs@egcs.cygnus.com \
    --cc=eric.kidd@pobox.com \
    --cc=otaylor@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).