[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Forcing static link of libstdc++
From: |
Ralf Wildenhues |
Subject: |
Re: Forcing static link of libstdc++ |
Date: |
Wed, 20 Sep 2006 20:34:41 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
* Mike Melanson wrote on Wed, Sep 20, 2006 at 04:14:01PM CEST:
> Ralf Wildenhues wrote:
> >* Mike Melanson wrote on Tue, Sep 19, 2006 at 07:22:12PM CEST:
>
> It's possible that I'm chasing after the wrong solution. This is a more
> specific problem:
>
> * I have a proprietary program that I am trying to build to run on a
> wide variety of Linux/x86-based distributions.
>
> * The build process links against libstdc++.so.6 on the build machine.
>
> * The program fails to run on older systems that only have libstdc++.so.5.
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 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).
Hope that helps.
Cheers,
Ralf
- Forcing static link of libstdc++, Mike Melanson, 2006/09/19
- Re: Forcing static link of libstdc++, Ralf Wildenhues, 2006/09/20
- Re: Forcing static link of libstdc++, Mike Melanson, 2006/09/20
- Re: Forcing static link of libstdc++,
Ralf Wildenhues <=
- Re: Forcing static link of libstdc++, Mike Melanson, 2006/09/20
- Re: Forcing static link of libstdc++, Ralf Wildenhues, 2006/09/20
- Re: Forcing static link of libstdc++, Mike Melanson, 2006/09/20
- Re: Forcing static link of libstdc++, Ralf Wildenhues, 2006/09/20
- Re: Forcing static link of libstdc++, Andreas Schwab, 2006/09/20
- Re: Forcing static link of libstdc++, Bob Proulx, 2006/09/22
- Re: Forcing static link of libstdc++, Mike Melanson, 2006/09/22
- Re: Forcing static link of libstdc++, Bob Proulx, 2006/09/25
- Re: Forcing static link of libstdc++, Ralf Wildenhues, 2006/09/26
- Re: Forcing static link of libstdc++, Stefan Puiu, 2006/09/26