[tex-live] Re: TeXlive 6 and GNU/Linux binaries

Nelson H. F. Beebe beebe@math.utah.edu
Fri, 26 Oct 2001 07:49:25 -0600 (MDT)

The shared library mismatch problem that Martin Schröder reported for
the TeXlive 6 binaries is rampant on GNU/Linux implementations, and is
due, in my view, to incompetence on the part of the developers.

The whole point of shared libraries is that there is supposed to be a
convention that if a library libfoo.so.x.y.z is needed by an
executable, then any libfoo.so.x.y.* version should work, although
larger values of z may correspond to libraries with more bug fixes.

Incompatibilities are allowed for different y values, but then /lib
should contain versions with all y values from 0 to the current one.

Unfortunately, what has too often happened on GNU/Linux is that
libraries with different z values have different entry point names, or
required symbols, and loading then fails with a shared library version
number mismatch.

I recently hit this on my home system: I downloaded some new
executables, found they needed a newer version of libc,
/lib/libc-2.1.3.so, downloaded that, ran /etc/ldconfig to update the
shared library cache, and voila, ldconfig changed the link for
/lib/libc.so.6 from the old /lib/libc-2.1.1.so to the newer
/lib/libc-2.1.3.so.  The effect of this was immediate: virtually all
executables on the system, including critical ones like mv, rm, ln,
and ls, became unusable.  I had to reboot from a CD-ROM, remove the
new library, correct the symlink for libc.so.6, run ldconfig, and
reboot again.

I've since rebuilt and installed GNU fileutils-4.1 with static linking
so that if this ever happens again, I'll have usable low-level
utilities that do not require any shared libraries.

The reason for using shared libraries is to reduce disk space and RAM
space for running processes, and to make it possible to install
library bug fixes that take effect the next time an executable needing
that library is run.  Shared libraries also isolate executables from
the interface to the operating system kernel.  When we moved from
SunOS to Solaris, executables that used shared libraries continued to
run, but statically linked ones did not.

Unfortunately, with the TeXlive CD-ROM bursting at the seams, I doubt
that we have space to replace the contents of bin/i386-linux with
statically linked executables.  Perhaps someone can make an experiment
with this and report back to the list.

If there isn't space on the CD-ROM, then we could, as I've suggested
in the past, create a texlive-x.y.z/bin tree on ftp.tug.org for people
to download.  That way, we could offer support for less widely used
architectures for which space was not available on CD-ROMs.

- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- Center for Scientific Computing       FAX: +1 801 585 1640, +1 801 581 4148 -
- University of Utah                    Internet e-mail: beebe@math.utah.edu  -
- Department of Mathematics, 322 INSCC      beebe@acm.org  beebe@computer.org -
- 155 S 1400 E RM 233                       beebe@ieee.org                    -
- Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  -