Hi again, Jonathan Nieder wrote:
> I think I mentioned this a while ago. It seems like a good time to > give a quick demo. :) Inspired by zlib which uses the same trick for > the same reason. Some details I forgot to mention. References: http://www.usenix.org/publications/library/proceedings/als00/2000papers/papers/full_papers/browndavid/browndavid_html/ http://sourceware.org/binutils/docs/ld/VERSION.html Sadly the symbol versioning mechanism doesn't seem to be documented nicely in the style of a manpage anywhere. Short-term question: would you mind if Debian carries this patch for the time being? In particular, do the version node names > --- /dev/null > +++ b/src/liblzma/Versions > @@ -0,0 +1,101 @@ > +LIBLZMA_5.0 { > +global: > + lzma_alone_decoder; > + lzma_alone_encoder; [...] > +}; > + > +LIBLZMA_5.1 { > + lzma_stream_encoder_mt_memusage; > + lzma_stream_encoder_mt; > +} LIBLZMA_5.0; seem reasonable to standardize on (in environments that will be using symbol versions)? The main unfortunate effect is warnings when running binaries linked against the versioned symbols in an environment not providing them. If XZ Utils with versioned symbols is installed under /usr and without versioned symbols installed under ~/opt/xz: | $ LD_LIBRARY_PATH=~/opt/xz/lib: /usr/bin/xz --version; echo $? | xz: /home/jrn/opt/xz/lib/liblzma.so.5: no version information available (required by xz) | xz: /home/jrn/opt/xz/lib/liblzma.so.5: no version information available (required by xz) | xz (XZ Utils) 5.1.1alpha | liblzma 5.1.1alpha | 0 | $ | $ LD_LIBRARY_PATH=/usr/lib: ~/opt/xz/bin/xz --version; echo $? | xz (XZ Utils) 5.1.1alpha | liblzma 5.1.1alpha | 0 The warnings go to stderr. They're pointless --- I would understand a warning to remind me to rebuild binaries with versioned symbols, but this warning is reminding me to install the library with versioned symbols. But they are harmless. Aside from that caveat, everything works fine. Jonathan