Static linking considered harmful

Olivier Galibert galibert at pobox.com
Tue Nov 28 18:08:42 UTC 2006


On Tue, Nov 28, 2006 at 12:44:53PM -0500, Jakub Jelinek wrote:
> On Tue, Nov 28, 2006 at 06:30:47PM +0100, Olivier Galibert wrote:
> > > For the first category (e.g. glibc, libX11), the rule of thumb is
> > > link dynamically, don't include the libraries with your program,
> > > compile and link against the oldest version you still want to support.
> > 
> > Ah but you see, glibc does not maintain backwards compatilibity.
> > 
> > ./nscube: relocation error: ./nscube: symbol errno, version GLIBC_2.0 not defined in file libc.so.6 with link time reference
> 
> This is a bug in the application for which we just provided workarounds
> for several years, of course the ISV must compile a correct valid program,
> not everything that happens to link is valid.  If you'd require that
> any buggy program keeps working, we'd need to guarantee bug to bug
> compatibility, that's not something any library guarantees.
> POSIX says that errno may be a macro (and since glibc 2.1.0 it is a macro)
> and that <errno.h> must be included when it is used, so programs that
> don't bother with it are out of luck.

Ok, so glibc maintains backwards compatibility only for bug-free
programs.  Show of hands, who has a bug-free program around?

  OG.




More information about the fedora-devel-list mailing list