* 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