automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Forcing static link of libstdc++


From: Mike Melanson
Subject: Re: Forcing static link of libstdc++
Date: Wed, 20 Sep 2006 11:49:47 -0700
User-agent: Thunderbird 1.5.0.5 (X11/20060802)

Ralf Wildenhues wrote:
So grab an old distro and build there, so that you link against
libstdc++.so.5.  You're not only going to have trouble with libstdc++,
but also with newer libc's when trying to run a program on an older
system.  Going the other way should be less painful: even current
systems typically have a libstdc++.so.5 for legacy code (like yours ;-)
(Although, come to think of it, I vaguely remember some issues with the
tls switch, concerning ctype; I don't know whether that applies any
more.)

A coworker suggested this same route this morning and we are planning to try it (we already have the older machines available; that's how we found the problem in the first place). We'll see if v6 is backwards compatible with v5.

A completely static link is another option, given that you don't use any
of those modern features like loadable modules (dlopen), networking/NSS
(gethost* and others) and some other stuff (dunno about threads), as
those features need the dynamic libc at runtime (typically that should
be the same version, I think, for reproducible results).

We recently experimented with this idea (but building the compiler without shared components). So we have a shared library plugin comprised mostly of PIC code but with a few non-PIC components. It works unless you have certain configuration options enabled, such as the secure SELinux stuff.

--
        -Mike Melanson




reply via email to

[Prev in Thread] Current Thread [Next in Thread]