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

Re: libX11 is borked (or is it glibc ?)



On Mon, Oct 16, 2000 at 01:10:03AM -0400, James Antill wrote:
> Daniel Jacobowitz <dan@debian.org> writes:
> 
> > On Mon, Oct 16, 2000 at 01:59:11AM +0200, Johannes Zellner wrote:
> > > Hello,
> > > 
> > > I cannot link any more against libX11.so:
> > > 
> > > /usr/X11R6/lib/libX11.so: undefined reference to `getpwnam_r@@GLIBC_2.0'
> > > 
> > > this shows, even if I link a minimal c program.
> > > 
> > > my versions:
> > >     ii  xlib6g      3.3.6-11
> > >     ii  libc6       2.1.94-3  
> > > 
> > > Any comments ?
> > 
> > To compile against a library built under an old glibc, the library
> > needs to be recompiled to the new libc.
> 
>  If this is true then there isn't any binary compatibility.
>  The whole point of the symbols looking like the above is so that
> there can be multiple versions of them. Eg.
> 
> % nm -g /usr/lib/debug/libc-2.1.3.so | egrep GLIB | egrep chown 
> 000913c8 T __chown@@GLIBC_2.1
> 000913c8 T chown@@GLIBC_2.1
> 00091454 T chown@GLIBC_2.0
> % nm -g /usr/lib/debug/libc-2.1.3.so | egrep GLIB | egrep fopen
> 0004b5c4 T _IO_file_fopen@@GLIBC_2.1
> 0004da48 T _IO_file_fopen@GLIBC_2.0
> 000481e0 T _IO_fopen@@GLIBC_2.1
> 0004a9a0 T _IO_fopen@GLIBC_2.0
> 000481e0 T fopen@@GLIBC_2.1
> 0004a9a0 T fopen@GLIBC_2.0
> 
>  So either something bad has happened with the glibc versioning
> upstream or glibc was built badly.

No, you misunderstand symbol versioning.

There is -runtime- compatiblity - the old _IO_file_fopen@GLIBC_2.0 is
still there.  However, there is no compile-time compatibility - a
library referencing that _IO_file_fopen@GLIBC_2.0 can no longer be
linked to.  This is, I believe, deliberate.  Libraries must be
recompiled to be linked to.

Dan

/--------------------------------\  /--------------------------------\
|       Daniel Jacobowitz        |__|        SCS Class of 2002       |
|   Debian GNU/Linux Developer    __    Carnegie Mellon University   |
|         dan@debian.org         |  |       dmj+@andrew.cmu.edu      |
\--------------------------------/  \--------------------------------/



Reply to: