On Wed, Sep 22, 1999 at 12:36:17AM -0400, Camm Maguire wrote: > Greetings! Is there any way to maintain alternate versions of the > same shared library on a Debian system? (i.e. same soname) One can > have two packages which conflict with each other, but I was thinking > about some run-time switching functionality, like in the > 'alternatives' system, so that one could choose between an > experimental but fast shared lib, and the trusted but slower one, at > runtime. I've tried several things, but lintian disallows most of them.
One way to do this is to include a wrapper script with your alternate-library version and place the libs in a package-specific directory. I use the following script under Irix to replace the GLX-dependent libraries with bare-X11 Mesa equivalents when running tools to non-GLX platforms: mesa ---- #!/bin/sh export _RLD_LIST _RLD64_LIST _RLDN32_LIST _RLD_LIST=/usr/lib/libm.so:/usr/local/Mesa/lib/libGL.so:DEFAULT _RLD64_LIST=/usr/lib64/libm.so:/usr/local/Mesa/lib64/libGL.so:DEFAULT _RLDN32_LIST=/usr/lib32/libm.so:/usr/local/Mesa/lib32/libGL.so:DEFAULT exec $* From man ld.so the Linux equivalents would be LD_LIBRARY_PATH and LD_AOUT_LIBRARY_PATH. LD_PRELOAD could also be used to replace just a few routines. The /usr/lib/lib*.so.N could then be placed under alternatives control if the maintainers all cooperated, with the alternatives available in the wrapped environments. This is for libblas?