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

Re: libjpegv7 transition



On Sun, Jun 14, 2009 at 09:51:29PM +0200, Bill Allombert wrote:
> On Sun, Jun 14, 2009 at 08:01:21PM +0200, Bastian Blank wrote:
> > On Sun, Jun 14, 2009 at 03:48:28PM +0200, Bill Allombert wrote:
> > > This version is ABI-incompatible with libjpeg6b.
> > > However it should be fully API compatible.
> > > To avoid symbol conflicts with libjpeg v6, the symbols are versionned.
> > 
> > In the current version, the symbols are not versioned. So this does not
> > hold as Base symbols match always.
> 
> So what do you suggest ? What is the impact ?

Well, he's just saying that the fact that the new library has symbol
versioning won't help, as adding symbol versioning will not prevent the
soname bump.

There is a way that I hinted in another mail, to avoid the soname bump
at once, but it may be impractical depending on how important the ABI
change is. Like I said, the gnu toolchain let you rename a C function
at the assembly level (look for __REDIRECT in sys/cdefs.h).

Doing that, you can redirect all the functions to a new name e.g. ending
with _abi7x, and version those. It means that those new symbols will
never have been versioned @Base, hence that any binary out-there should
have linked those with versionning enabled, so you're safe wrt ulterior
ABI changes with those symbols.

_But_ at the same time, you should still provide the unversioned
symboles from the libjpeg6b library. Those will probably redirect to the
new ABI ones with the proper abi "fixes", some will just be the old
implementation kept around if it's impractical.

If you do that, you don't need to change the soname anymore, and we're
good. But unless you do that dance, since the old lib has no symbol
versionning, adding symbol versioning is just irrelevant to the SONAME
change, that is what Bastian meant. It doesn't mean symbols shouldn't be
versionned, all the contrary actually. But adding versioning will just
be useful in case of a _future_ ABI Change.

Symbols between libjpeg62 and libjpeg7 won't collide not because of
symbol versionning, but because the SONAME is different in the first
place (which is the old, sucky way to deal with ABI changes).
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Attachment: signature.asc
Description: Digital signature


Reply to: